This class lets you add a control to the map which mimics the context menu of Google Maps. The control supports all of the six items supported by Google Maps: finding directions to/from a location, zooming in/out, centering the map, and finding the address at the clicked location. Any of these items may be suppressed by passing options into the constructor. This control extends the GControl interface.
Note: ContextMenuControl doesn't work in Opera because Opera doesn't support the oncontextmenu event and doesn't give access to right mouse clicks.
For a description and examples of how to use this library, check out the how-to.
Constructor | Description |
---|---|
ContextMenuControl(opt_opts?:ContextMenuControlOptions) |
Creates a control with options specified in ContextMenuControlOptions . |
This class represents optional arguments to ContextMenuControl
. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties | Type | Description |
---|---|---|
centerMap |
Boolean |
"Shows "Center map here" item. The default value is true . |
dirsFrom |
Boolean |
Shows "Directions from here" item. The default value is true . |
dirsTo |
Boolean |
Shows "Directions to here" item. The default value is true . |
whatsHere |
Boolean |
"Shows "What's here?" item. The default value is true . |
zoomIn |
Boolean |
Shows "Zoom in" item. The default value is true . |
zoomOut |
Boolean |
Shows "Zoom out" item. The default value is true . |