Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

46 Part I — Basics


Table 3-6(continued)

Event Arguments Description

Movestart none Triggered at the beginning of a continuous
pan/drag movement. This event is not
triggered when the map moves discretely.
Moveend none Triggered at the end of a discrete or
continuous map movement. This event is
triggered once at the end of a continuous
pan.
Zoom oldZoomLevel, Triggered after the map zoom level
newZoomLevel changes.
maptypechanged none Triggered after the map type (map, hybrid,
or satellite) changes.
infowindowopen none Triggered after the info window is displayed.
infowindowclose none Triggered after the info window is closed.
addoverlay overlay Triggered after an overlay is added to the
map.
removeoverlay overlay Triggered after an overlay is removed
from the map. Not triggered if
clearOverlaysis called — see the
clearoverlaysevent.
clearoverlays None Triggered after all overlays are cleared from
the map.

Don’t worry if the information presented here seems daunting. Chapter 4 provides more
specific examples of how you use the API and the classes, methods, and objects.

GMarker


This class creates a new GMarkerobject based on the supplied GPointreference.GMarkers
are used to highlight points on a map. All GMarkers are displayed using an icon, either the
default icon supplied by Google Maps or a special icon (previously defined through a GIcon
object) specified as the optional argument to the function:
GMarker(point, icon)
Free download pdf