infowindow

Google Maps Mouseout only applied to last infowindow

大兔子大兔子 提交于 2019-11-30 23:18:57
.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 appreciated! Thanks! Here is my setMarkers snippet function setMarkers(map, locations) { for (var i = 0; i <

Bring GoogleMaps InfoWindow to front

 ̄綄美尐妖づ 提交于 2019-11-30 21:25:34
I have a GoogleMaps APIv3 application in which multiple InfoWindows can be open at any one time. I would like to be able to bring an obscured InfoWindow to the front of all other InfoWindows if any part of it is clicked - similar to the behaviour of windows in MS Windows OS. I had thought to add an onclick event handler which increases the z-index of the InfoWindow, but the event handler does not appear to be firing. ZIndex is a global variable that keeps increasing as InfoWindows are clicked - or thats the theory anyway. Can anyone help ? Here is my code:- var ZIndex=1; var iw = new google

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

人走茶凉 提交于 2019-11-30 19:46:34
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 filled with details from the columns for that record. I seriously had this part working flawlessly. I

Add an image for Android marker info window

China☆狼群 提交于 2019-11-30 19:09:01
问题 I'm making an android app. In this app, there are markers of some hotels and when user click on the marker info window appears and it should be like following image. (This is a web application) I have a list view in my navigation drawer fragment and map fragment has the markers. This is my code before I try to load image for the info window in MainActivity.java . // Load Hotels private class GetHotelTask extends AsyncTask<String, String, String> { @Override protected String doInBackground

Change the margin color of InfoWindow view of marker in google maps api v2

倖福魔咒の 提交于 2019-11-30 18:59:00
Hello I try to change the default color that have (white) to black, this in the google maps api v2, anyone know how I can do this? PD: is the margin of infowindow this is my code where I change the content of infowindow but need change the margin :S GoogleMap map = .... map.setInfoWindowAdapter(new InfoWindowAdapter() { @Override public View getInfoContents(Marker marker) { View v = getLayoutInflater().inflate( R.layout.info_window_layout, null); v.setBackgroundColor(Color.BLACK); return v; } }); thanks for reply Use getInfoWindow instead of getInfoContents to provide full info window. Make

Open InfoWindow for each polygon google maps V3

喜你入骨 提交于 2019-11-30 13:54:38
问题 Hope someone can help me with this issue. I'm trying to open an info windows on click for each polygon that my users created. I used the same code for a marker and works well but i couldn't make it work for each polygon. Any thoughts on how to solve this problem? var contentString = '<div id="content">'+ '<div id="siteNotice">'+ '</div>'+ '<h2>Test</h2>'+ '</div>'; var infowindow = new google.maps.InfoWindow({ content: contentString }); // Show Areas <?php foreach ($field->result() as $f):?>

Google Maps : open InfoWindow on mouseover, close & reopen on click

不想你离开。 提交于 2019-11-30 09:37:27
I've a page with markers with InfoWindows that I opened on Click. I decided to rather open the InfoWindows on MouseOver which is working. But I find that having to move the mouse to the cross of the InfoWindow to close it is a bit demanding for these lazy visitors of the internet. So I added a Close event on Click of the Marker which is also working. What I can't figure out to work is to be able to re-open the InfoWindow on Marker Click instead of having to mouseout in order to be able to re-mouseover on the marker. My code : google.maps.event.addListener(CalMarker, 'mouseover', function() {

Creating Infowindows on features loaded via loadGeoJson()

青春壹個敷衍的年華 提交于 2019-11-30 06:56:33
I apologize if this is basic, but I have very limited javascript knowledge. I'm making a map that loads GeoJSON data that I created in ArcGIS reformatted to GeoJSON using ogr2ogr. I've got the map loading and showing the point markers from my GeoJSON file, and I've even got a styleFeature() function to set styling on the features based on their properties. The problem I'm having is trying to have infowindows pop up when a point feature is clicked on. I have successfully used the code to set a event listener and update the contents of a div with the information from a clicked feature: map.data

google maps v3 adding an info window to a circle

主宰稳场 提交于 2019-11-30 06:28:40
Is there a way to add a infoWindow to a circle created by google.maps.Circle something like this var circ = new google.maps.Circle({ center:latlng, clickable:false, fillColor:colors[count], fillOpacity:0.3, map:map, radius:radius, strokeColor:colors[count], strokeOpacity:0.3}); and //create info window var infoWindow= new google.maps.InfoWindow({ content: "Your info here" }); //add a click event to the circle google.maps.event.addListener(circ, 'click', function(){ //call the infoWindow infoWindow.open(map, circ); }); or alternatively is there a way to create an invisible marker at the center

Check if infowindow is opened Google Maps v3

雨燕双飞 提交于 2019-11-30 04:18:58
Please, I need a help. I want to check if my infowindow is opened. For example: if (infowindow.isOpened) { doSomething() } or if (infowindow.close) { doAnotherthing(); } I dont have any idea, how to do this doublesharp This is an undocumented feature, and is therefore subject to change without notice, however the infoWindow.close() method sets the map on the object to null (this is why infoWindow.open(map, [anchor]) requires that you pass in a Map ), so you can check this property to tell if it is currently being displayed: function isInfoWindowOpen(infoWindow){ var map = infoWindow.getMap();