Skip to content

GmapsContextMenu

Matthew Wright edited this page Jan 2, 2021 · 4 revisions

Description

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

GmapsContextMenu class

An overlay that looks like a bubble and is often connected to the map or a marker.

Constructor

Constructor Detail
GmapsContextMenu GmapsContextMenu([map, opts])

Parameters:
  • map: google.maps.Map required
  • opts: GmapsContextMenu options optional

Methods

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

GmapsContextMenu options

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.

Clone this wiki locally