Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

Chapter 3 — The Google Maps API 49


Property Description

mozPrintImage The URL of the foreground icon image you should use for
printed maps in Firefox/Mozilla. It should be the same size as
the main icon image.
printShadow The URL of the shadow image you should use for printed maps.
It should be a GIF image because most browsers cannot print
PNG images.
Transparent The URL of a virtually transparent version of the foreground icon
image used to capture IE click events. This image should be a
24-bit PNG version of the main icon image with 1% opacity, but
the same shape and size as the main icon.
imageMap An array of integers representing the x/y coordinates of the
image map you should use to specify the clickable part of the
icon image in non-IE browsers.

To create a new GIcon, use this:


GIcon()


You can also optionally specify the name of an existing icon from which the properties will be
copied. This is useful if you are creating a suite of icons that are the same dimensions (and can
use the same shadow), but which have different main images.


GEvent


This class creates a new GEventobject for building event objects for your Google Maps. Table
3-9 provides a list of the available methods for this object.


Table 3-9: Methods for GEvent Objects

Method Description

addListener(source, Calls the listener function (listenerFn) when the event is
eventName, listenerFn) triggered on the source instance. An opaque listener token that
can be used with removeListeneris returned.
removeListener Removes the given listener, which should be a listener token
(listener) returned by addListener.
clearListeners(source, Removes all listeners for the given event on the given source.
eventName)

Continued
Free download pdf