I have a map application using Maps API v2. I am integrating a few more features to the application and want to add a overlay to the map using javascript.
For, that I would like to use the same map object already there, and so added this JSNI function
var GoogleMap = [email protected]::mapWidget;
$wnd.alert(GoogleMap);
But, the object is coming as 'undefined', so my question is how do I get a reference to the mapObject from a JSNI method so that I can use it further.
I don't want to create a new map instead use the existing one.