This class represents optional arguments to the GMap2 constructor. It has no constructor, but is instantiated as an object literal.
Properties
Properties
Type
Description
size
GSize
Sets the size in pixels of the map. The container that is passed to the map constructor will be resized to the given size. By default, the map will assume the size of its container.
mapTypes
Array of GMapType
Array of map types to be used by this map. By default, G_DEFAULT_MAP_TYPES is used. You can use this option to restrict the set of predefined map types that is displayed on the map, or to pass your own map types to the map. See also GMap2.addMapType().
draggableCursor
String
The cursor to display when the map is draggable. (Since 2.59)
draggingCursor
String
The cursor to display while dragging the map. (Since 2.59)
enum GMapPane
These constants define the layering system that is used by overlay to display themselves on the map. There are different layers for icons, shadows, the info window, the shadow on the info window, and transparent mouse event catching objects.
You need to use this type if you subclass from GOverlay.
Constants
Constants
Description
G_MAP_MAP_PANE
This pane is still below the shadows of the markers, directly on top of the map. It contains for instance the polylines.
G_MAP_MARKER_SHADOW_PANE
This pane contains the shadows of the markers. It is below the markers.
G_MAP_MARKER_PANE
This pane contains the markers.
G_MAP_FLOAT_SHADOW_PANE
This pane contains the shadow of the info window. It is above the G_MAP_MARKER_PANE, so that markers can be in the shadow of the info window.
G_MAP_MARKER_MOUSE_TARGET_PANE
This pane contains transparent elements that receive DOM mouse events for the markers. Is is above the G_MAP_FLOAT_SHADOW_PANE, so that markers in the shadow of the info window can be clickable.
G_MAP_FLOAT_PANE
This pane contains the info window. It is above everything else on the map.
class GKeyboardHandler
Instantiate this class to add keyboard bindings to a map. The key bindings are the same as for the maps application.
Key(s)
Action
up, down, left, right
Moves the map continuously while the key is pressed. Two keys can be pressed simultaneously in order to move diagonally.
page down, page up, home, end
Pans the map by 3/4 its size in the corresponding direction, with a nice animation. This corresponds to the arrow buttons in the GLargeMapControl and the GSmallMapControl.
+, -
Zooms one level in or out, respectively. This corresponds to the + and - buttons in the GLargeMapControl and the GSmallMapControl.
Constructor
Constructor
Description
GKeyboardHandler(map)
Installs keyboard event handler for the map passed as argument.
interface GOverlay
This interface is implemented by the GMarker, GPolyline, GTileLayerOverlay and GInfoWindow classes in the maps API library. You can implement it if you want to display custom types of overlay objects on the map. An instance of GOverlay can be put on the map with the method GMap2.addOverlay(). The map will then call the method GOverlay.initialize() on the overlay instance to display itself on the map initially. Whenever the map display changes, the map will call GOverlay.redraw() so that the overlay can reposition itself if necessary. The overlay instance can use the method GMap2.getPane() to get hold of one or more DOM container elements to attach itself to.
Constructor
Constructor
Description
GOverlay()
This constructor creates dummy implementations for the methods. Still, when inheriting from this class, your derived class constructor should call this constructor for completeness.
Static Methods
Static Methods
Return Value
Description
getZIndex(latitude)
Number
Returns a CSS z-index value for a given latitude. It computes a z index such that overlays further south are on top of overlays further north, thus creating the 3D appearance of marker overlays.
Abstract Methods
Abstract Methods
Return Value
Description
initialize(map)
none
Called by the map after the overlay is added to the map using GMap2.addOverlay(). The overlay object can draw itself into the d
class GMapOptionsThis class represents optional arguments to the GMap2 constructor. It has no constructor, but is instantiated as an object literal.Properties Pr