google-maps-api-3

Google Maps Mouseout only applied to last infowindow

痴心易碎 提交于 2019-12-30 07:16:42
问题 .Hello I have a random problem I haven't been able to figure out. I have a map with markers that show infowindows when you hover over them which are supposed to close when you move your mouse away. For some reason the second part (closing the infowindow on mouseout) only gets applied to the last marker. If anyone could explain to me where I'm going wrong and how to fix my code so that all of the infowindows will close when the user moves their mouse away from the marker it'd be greatly

Dynamically populated google maps sidebar

时光怂恿深爱的人放手 提交于 2019-12-30 07:15:52
问题 I've been using the code from this V3 example to set up a links bar that dynamically populates when different category filters are selected, but have two problems at the moment. Firstly, I've put the the initial makeSidebar function in the map's idle event, but the sidebar is only created when the map is moved, not on loading of the page. Secondly, I can't seem to get the marker infowindow to open when the corresponding link is clicked in the sidebar. My code is below: var map; var infowindow

Change the value in textbox of a google map autocomplete

天大地大妈咪最大 提交于 2019-12-30 07:08:09
问题 I have the following javascript code which does google map autocomplete on different input textboxes that are parts of an address. function startAutoComplete() { var address = document.getElementById("addressId"); var city = document.getElementById("cityId"); var state = document.getElementById("stateId"); var zip = document.getElementById("zipId"); //option for autocomplete var option = {types: ['geocode'], componentRestrictions: {country: 'us'}}; //autocomplete for address textbox

Change the value in textbox of a google map autocomplete

家住魔仙堡 提交于 2019-12-30 07:07:06
问题 I have the following javascript code which does google map autocomplete on different input textboxes that are parts of an address. function startAutoComplete() { var address = document.getElementById("addressId"); var city = document.getElementById("cityId"); var state = document.getElementById("stateId"); var zip = document.getElementById("zipId"); //option for autocomplete var option = {types: ['geocode'], componentRestrictions: {country: 'us'}}; //autocomplete for address textbox

Google Maps JS API (v3) InfoWindow Script Error - JSON Undefined

倾然丶 夕夏残阳落幕 提交于 2019-12-30 06:20:27
问题 I've been working on quite a nice program for a month or two now. I'm having an odd issue where clicking a marker on my map is giving a very vague script error. Literally just last night everything was working fine and all of a sudden this is happening. First, here's a brief look at my map. As soon as this form (VB) loads, a list of records is pulled from my SQL Server database. A marker with a unique ID is created for each record. An InfoWindow is made for each marker, and the InfoWindow is

Getting pixel coordinates of an image overlay using leaflet map library on click (right click)

可紊 提交于 2019-12-30 06:10:08
问题 I'm trying to get the pixel coordinates of an image overlay on click (right click/contextmenu) using the leaflet map library. Essentially when a user clicks on the image, I need to find the x,y or width,height of where the user clicked on the image. Currently this is what I have. // Using leaflet.js to pan and zoom a big image. // See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html // create the slippy map var map = L.map('image-map', { minZoom: 1, maxZoom: 4, center: [0, 0

Getting pixel coordinates of an image overlay using leaflet map library on click (right click)

荒凉一梦 提交于 2019-12-30 06:09:13
问题 I'm trying to get the pixel coordinates of an image overlay on click (right click/contextmenu) using the leaflet map library. Essentially when a user clicks on the image, I need to find the x,y or width,height of where the user clicked on the image. Currently this is what I have. // Using leaflet.js to pan and zoom a big image. // See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html // create the slippy map var map = L.map('image-map', { minZoom: 1, maxZoom: 4, center: [0, 0

Limit posts from Instagram API on a Google Map based on radius in current window

☆樱花仙子☆ 提交于 2019-12-30 05:31:08
问题 So I have the code below which is the front end on a node.js app which pulls Instagram posts with a certain hashtag. Right now it posts all over the world. Is there a way to limit the radius on the posts and if possible, limit to the window that is currently visible to the user? I'm using the Instagram Real Time tag subscription. function initialize() { var styles = [{ "featureType": "landscape", "stylers": [{ "color": "#808080" }, { "visibility": "simplified" }] }, { "featureType":

Place marker on click google maps javascript api

懵懂的女人 提交于 2019-12-30 05:27:08
问题 I have coded a google map in JS Apis. What I'm trying to achieve is that wherever the user clicks, it places the marker there and outputs its Lat and Lng. What I have achieved is wherever I click, it outputs the Lat and Lng without dragging the marker there. Here the Fiddle - http://jsfiddle.net/sarthakbatra1991/87v0obb4/#&togetherjs=3aTj11AiwO google.maps.event.addListener(map, 'click', function (event) { document.getElementById("lat").value = event.latLng.lat(); document.getElementById(

google maps api marker with label

萝らか妹 提交于 2019-12-30 05:22:27
问题 I have var marker = new MarkerWithLabel({ position: uav.Position, icon: mapStyles.uavSymbolBlack, labelContent: uav.Callsign + '<div style="text-align: center;"><b>Alt: </b>' + uav.Alt + '<br/><b>Bat: </b>' + uav.Battery + '</div>', labelAnchor: new google.maps.Point(95, 20), labelClass: "labels", labelStyle: { opacity: 0.75 }, zIndex: 999999,}) This marker in my JavaScript file, but java console keep giving me an error. Uncaught ReferenceError: MarkerWithLabel is not defined I thought