Skip to content

Instantly share code, notes, and snippets.

@javymarmol
Created November 21, 2017 11:53
Show Gist options
  • Save javymarmol/cbf939e414b2429159a34c9801c383c9 to your computer and use it in GitHub Desktop.
Save javymarmol/cbf939e414b2429159a34c9801c383c9 to your computer and use it in GitHub Desktop.
Add Info window on drawingManager 'overlaycomplete'
google.maps.event.addListener(drawingManager, 'overlaycomplete', function(event) {
if (event.type == google.maps.drawing.OverlayType.MARKER) {
//event.overlay.setTitle("Hello");
var infowindow = new google.maps.InfoWindow({
content: '<div id="content" onmouseover="updateContent()">Hello</div>',
maxWidth: 10
});
google.maps.event.addListener(event.overlay,'click',function(){
infowindow.open(map,event.overlay);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment