call JavaScript function within Google Maps Listener -
OK, simple question but is it possible to call external javascript function within a Google Map listener?
GEvent.addListener (map, "click", function (overlay, latching) {testfunction (latlng);});
If the test is not run, should I go about it in a special way? I'm new to Maps and Javascript.
Try your listener controller with one parameter first: an object that matches latitude / longitude Is where the user clicked on the map.
Try it one early:
GEvent.addListener (map, "click", function (latlng) {testfunction (latlng);}); If that does not work, then make sure that your testfunction
is handling the GLatLng type correctly (the property's property correctly, etc.) .
Comments
Post a Comment