Google Maps API Tutorial© 2007 Mike Williams |
Tweaking GOverviewMapControl in v2.93In v2.93, the code for the map controls is moved into a separate module which doesn't get loaded until you create the first map control. All the documented map control Methods work correctly [except that control.printable() and control.selectable() return "undefined" instead of "false"] but some undocumented features of GOverviewMapControl are not available until after the conrol_api module has finished loading.
In previous versions of the API you could write The event that is triggered when the code module has been loaded doesn't appear to be accessible, and waiting for a fixed time period carries the risk that it might fail for a user with slower Internet connectivity or when the Google server is busy.
What you could do is wait for a short while, and check to see if the feature is active, and wait again if it isn't.
Like this: This example performs the same teaks as described here for the earlier versions of the API. |