-
Notifications
You must be signed in to change notification settings - Fork 1
GmapsContextMenu
Matthew Wright edited this page Jan 2, 2021
·
4 revisions
A GmapsContextMenu
displays clickable text options in a popup window above the mouse right click location. The content area (options) is configured with JSON. While it is based on an InfoWindow, it does not have a tapered stem.
Typically you will attach a context menu to a map, but you can also attach context menus to circles, markers, and other shapes.
GmapsContextMenu
class
An overlay that looks like a bubble and is often connected to the map or a marker.
Constructor | Detail |
---|---|
GmapsContextMenu | GmapsContextMenu([map, opts]) Parameters:
|
Method | Detail |
---|---|
registerFor | Registers the element for both opening and closing the context menu |
registerOpenFor | Registers the element to open the context menu on rightclick
|
registerCloseFor | Registers the element to close the context menu on click
|
updateOptions | Rebuilds the context menu content |
close | Closes the context menu |
Object used to define the properties that can be set on a GmapsContextMenu.
Property | Detail |
---|---|
registerOpenForMap optional |
Type: boolean optional Default: true Whether this context menu should be opened by the map on rightclick . |
registerCloseForMap optional |
Type: boolean optional Default: true Whether this context menu should be closed by the map on click . |
Meta object that stores each of the GmapsContextMenu
s and provides additional option(s).
GmapsContext.setSetting("setting", "value");
Setting | Detail |
---|---|
registerCloseForEverything |
Type: boolean optional Default: true Registers every GmapsContextMenu made to be closed on click by every map, marker, shape referenced in every other GmapsContextMenu . When enabled, this allows every open context menu to close when a click occurs outside every open context menu. |