You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
I have setup some maps with popup info windows and that works fine. However now that I need to interact with existing markers I am having trouble. I've seen very brief explanations of how to use setMap(null) but they haven't helped me.
Can someone clarify with a fuller example? My setup code is as follows...
var infoWindows = [];
var locations=[
{id:'marker1', position:[51.528308,-0.3817765],content:'test content',icon:'assets/mappointer.png'}
]
var map=$('#mapDiv').gmap3({
mapTypeId: "teststyle",
scrollwheel: true
})
.marker(locations)
.infowindow(locations)
.then(function (infowindow) {
// handle click events for each marker
var map = this.get(0);
var marker = this.get(1);
marker.forEach(function(item,i){
item.addListener('click', function() {
infowindow[i].open(map, item);
infoWindows.push(infowindow[i]);
});
})
})
.styledmaptype("teststyle",mapStyle)
.fit();
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have setup some maps with popup info windows and that works fine. However now that I need to interact with existing markers I am having trouble. I've seen very brief explanations of how to use setMap(null) but they haven't helped me.
Can someone clarify with a fuller example? My setup code is as follows...
The text was updated successfully, but these errors were encountered: