javascript - Google maps API convert from V2 to V3 -


i jrying convert following 2 google m aps v2 api events v3 cannot life of me figure out how it, possible give me pointers on this?

    gevent.addlistener(map, "click", function(overlay, point){     if (point != null) {       window.status = "click " + point.lat() + ", "+ point.lng();     }            else if (overlay != null)          {       window.status = "overlay " + lastpoint.lat() + ", "+ lastpoint.lng();     } }); gevent.addlistener(map, "mousemove", function(point){  lastpoint = point; }); 

try this:

google.maps.event.addlistener(map, 'click', function(event) {   console.log(event.latlng); }); 

"no overlay argument exists in v3 event listeners. if register click event on v3 map callback occur when user clicks on base map. can register additional callbacks on clickable overlays if need react clicks. " - https://developers.google.com/maps/articles/v2tov3#events


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -