Skip to main content

Constants

In order to ensure that configuration values are available to your code even if the Google Maps library isn't loaded, we duplicate some of the Google Map configuration values.

They can be accessed under the G variable if you're using this in your browser. Or, you can include them in your import statement.

The values are the same as the Google Maps objects that we reference.

warning

Do not use these constants if you are working directly with google.maps objects. In some cases the values are slightly different from the Google Maps counterpart. Only use these constants when you're working with the @aptuitiv/gmaps library objects.

AutocompleteSearchBoxEvents

Events that can be fired by the Autocomplete search box.

G.AutocompleteSearchBoxEvents.PLACE_CHANGED
ConstantDescription
PLACE_CHANGEDThe event fired when the user selects a Place.

ControlPosition

Identifiers used to specify the placement of controls on the map.

See the Google Maps ControlPosition documentation for more information.

Instead of using google.maps.ControlPosition you can use G.ControlPosition with the @aptuitiv/gmaps library.

G.ControlPosition.BLOCK_END_INLINE_CENTER
G.ControlPosition.BLOCK_END_INLINE_END
G.ControlPosition.BLOCK_END_INLINE_START
G.ControlPosition.BLOCK_START_INLINE_CENTER
G.ControlPosition.BLOCK_START_INLINE_END
G.ControlPosition.BLOCK_START_INLINE_START
G.ControlPosition.BOTTOM_CENTER
G.ControlPosition.BOTTOM_LEFT
G.ControlPosition.BOTTOM_RIGHT
G.ControlPosition.INLINE_END_BLOCK_CENTER
G.ControlPosition.INLINE_END_BLOCK_END
G.ControlPosition.INLINE_END_BLOCK_START
G.ControlPosition.INLINE_START_BLOCK_CENTER
G.ControlPosition.INLINE_START_BLOCK_END
G.ControlPosition.INLINE_START_BLOCK_START
G.ControlPosition.LEFT_BOTTOM
G.ControlPosition.LEFT_CENTER
G.ControlPosition.LEFT_TOP
G.ControlPosition.RIGHT_BOTTOM
G.ControlPosition.RIGHT_CENTER
G.ControlPosition.RIGHT_TOP
G.ControlPosition.TOP_CENTER
G.ControlPosition.TOP_LEFT
G.ControlPosition.TOP_RIGHT

GeocoderErrorStatus

The error status value to identify an error when making a Geocode call.

G.GeocoderErrorStatus.ERROR
G.GeocoderErrorStatus.INVALID_REQUEST
G.GeocoderErrorStatus.OVER_QUERY_LIMIT
G.GeocoderErrorStatus.REQUEST_DENIED
G.GeocoderErrorStatus.UNKNOWN_ERROR
ConstantDescription
ERRORThere was a problem contacting the Google servers.
INVALID_REQUESTThe geocode request was invalid. Most likely a required parameter was missing or an invalid parameter value was used.
OVER_QUERY_LIMITThe webpage has gone over the requests limit in too short a period of time.
REQUEST_DENIEDThe webpage is not allowed to use the Google Maps Geocoding API.
UNKNOWN_ERRORA geocoding request could not be processed due to a server error. The request may succeed if you try again.

GeocoderLocationType

The type of location returned when making a Geocode call.

G.GeocoderLocationType.APPROXIMATE
G.GeocoderLocationType.GEOMETRIC_CENTER
G.GeocoderLocationType.RANGE_INTERPOLATED
G.GeocoderLocationType.ROOFTOP
ConstantDescription
APPROXIMATEThe returned result is an approximate location.
GEOMETRIC_CENTERThe returned result is the geometric center of a result. The result could be something like a line (i.e. a street) or a polygon (i.e. a region).
RANGE_INTERPOLATEDThe returned result is an approximation interpolated between two precise points. This is usually along an road and the precicse points are often intersections. This type of result is returned when a rooftop geocode is unavaiable for a street address.
ROOFTOPThis is the most precise geocode result type.

LoaderEvents

Events that can be fired by the Loader.

G.LoaderEvents.LOAD
G.LoaderEvents.MAP_LOAD
ConstantDescription
LOADThe event fired when the API library is loaded.
MAP_LOADThe event fired when the API library is loaded and the map is loaded and visible.

MapEvents

Events that can be fired by the Map.

G.MapEvents.BOUNDS_CHANGED
G.MapEvents.CENTER_CHANGED
G.MapEvents.CLICK
G.MapEvents.CONTEXT_MENU
G.MapEvents.DBLCLICK
G.MapEvents.DRAG
G.MapEvents.DRAG_END
G.MapEvents.DRAG_START
G.MapEvents.HEADING_CHANGED
G.MapEvents.IDLE
G.MapEvents.IS_FRACTIONAL_ZOOM_ENABLED_CHANGED
G.MapEvents.LOCATION_ERROR
G.MapEvents.LOCATION_FOUND
G.MapEvents.MAP_CAPABILITIES_CHANGED
G.MapEvents.MAP_TYPE_ID_CHANGED
G.MapEvents.MOUSE_MOVE
G.MapEvents.MOUSE_OVER
G.MapEvents.MOUSE_OUT
G.MapEvents.PROJECTION_CHANGED
G.MapEvents.READY
G.MapEvents.RENDERING_TYPE_CHANGED
G.MapEvents.TILES_LOADED
G.MapEvents.TILT_CHANGED
G.MapEvents.ZOOM_CHANGED
ConstantDescription
BOUNDS_CHANGEDThe event fired when the viewport bounds have changed.
CENTER_CHANGEDThe event fired when the map center property changes.
CLICKThe event fired when the map is clicked.
CONTEXT_MENUThe event fired when the map DOM contextmenu is fired on the map container.
DBLCLICKThe event fired when the map is double clicked.
DRAGThe event fired when the user drags the map.
DRAG_ENDThe event fired when the user stops dragging the map.
DRAG_STARTThe event fired when the user starts dragging the map.
HEADING_CHANGEDThe event fired when the map heading value changes.
IDLEThe event fired when the map becomes idle after panning or zooming.
IS_FRACTIONAL_ZOOM_ENABLED_CHANGEDThe event fired when the isFractionalZoomEnabled property has changed.
MAP_CAPABILITIES_CHANGEDThe event fired when the map capabilities change.
LOCATION_ERRORThe event fired when there is an error getting the user's location.
LOCATION_FOUNDThe event fired when the user's location has been found.
MAP_TYPE_ID_CHANGEDThe event fired when the mapTypeId property changes.
MOUSE_MOVEThe event fired when the user's mouse moves over the map.
MOUSE_OVERThe event fired when the user's mouse enters the map.
MOUSE_OUTThe event fired when the user's mouse exits the map.
PROJECTION_CHANGEDThe event fired when the map projection has changed.
READYThe event fired when the map is ready and visible.
RENDERING_TYPE_CHANGEDThe event fired when the map renderingType has changed.
TILES_LOADEDThe event fired when the visible tiles have finished loading.
TILT_CHANGEDThe event fired when the map tilt property changes.
ZOOM_CHANGEDThe event fired when the map zoom property changes

MapTypeControlStyle

Style values for common MapTypesControls.

See the Google Maps MapTypeControlStyle documentation for more information.

G.MapTypeControlStyle.DEFAULT
G.MapTypeControlStyle.DROPDOWN_MENU
G.MapTypeControlStyle.HORIZONTAL_BAR

MapTypeId

Identifiers for common MapTypes.

See the Google Maps MapTypeId documentation for more information.

G.MapTypeId.HYBRID;
G.MapTypeId.ROADMAP;
G.MapTypeId.SATELLITE;
G.MapTypeId.TERRAIN;

MarkerEvents

Events that can be fired by the Marker.

G.MarkerEvents.ANIMATION_CHANGED
G.MarkerEvents.CLICK
G.MarkerEvents.CLICKABLE_CHANGED
G.MarkerEvents.CONTEXT_MENU
G.MarkerEvents.CURSOR_CHANGED
G.MarkerEvents.DBLCLICK
G.MarkerEvents.DRAG
G.MarkerEvents.DRAG_END
G.MarkerEvents.DRAGGABLE_CHANGED
G.MarkerEvents.DRAG_START
G.MarkerEvents.FLAT_CHANGED
G.MarkerEvents.ICON_CHANGED
G.MarkerEvents.MOUSE_DOWN
G.MarkerEvents.MOUSE_MOVE
G.MarkerEvents.MOUSE_OVER
G.MarkerEvents.MOUSE_OUT
G.MarkerEvents.MOUSE_UP
G.MarkerEvents.POSITION_CHANGED
G.MarkerEvents.READY
G.MarkerEvents.SHAPE_CHANGED
G.MarkerEvents.TITLE_CHANGED
G.MarkerEvents.VISIBLE_CHANGED
G.MarkerEvents.ZINDEX_CHANGED
ConstantDescription
ANIMATION_CHANGEDThe event fired when the marker's animation changes.
CLICKThe event fired when the marker is clicked.
CLICKABLE_CHANGEDThe event fired when the marker clickable property changes.
CONTEXT_MENUThe event fired when the DOM contextmenu is fired on the marker.
CURSOR_CHANGEDThe event fired when the marker cursor property changes.
DBLCLICKThe event fired when the marker is double clicked.
DRAGThe event fired when the user drags the marker.
DRAG_ENDThe event fired when the user stops dragging the marker.
DRAGGABLE_CHANGEDThe event fired when the marker draggable property changes.
DRAG_STARTThe event fired when the user starts dragging the marker.
FLAT_CHANGEDThe event fired when themarker flat property changes.
ICON_CHANGEDThe event fired when the marker icon property changes.
MOUSE_DOWNThe event fired when the user's mouse is pressed down on the marker.
MOUSE_MOVEThe event fired when the user's mouse moves over the map.
MOUSE_OVERThe event fired when the user's mouse enters the map.
MOUSE_OUTThe event fired when the user's mouse exits the map.
MOUSE_UPThe event fired for the mouseup event on the marker.
POSITION_CHANGEDThe event fired when the marker's position property has changed.
READYThe event fired when the marker is loaded and ready for use.
SHAPE_CHANGEDThe event fired when the marker's shape property changes.
TITLE_CHANGEDThe event fired when the marker's title property changes.
VISIBLE_CHANGEDThe event fired when the marker's visible property changes.
ZINDEX_CHANGEDThe event fired when the marker's zindex property changes.

OverlayEvents

Events that can be fired by the Overlay.

G.OverlayEvents.OPEN
ConstantDescription
OPENThe event fired when the overlay is opened.

PlacesSearchBoxEvents

Events that can be fired by the PlacesSearchBox.

G.PlacesSearchBoxEvents.PLACES_CHANGED
ConstantDescription
PLACES_CHANGEDThe event fired when the user selects a place.

PopupEvents

Events that can be fired by the Popup. (Where the popup object extends the overlay object, these are the same events that the overlay object has.)

G.PopupEvents.OPEN
ConstantDescription
OPENThe event fired when the popup is opened.

RenderingType

The rendering type of the map.

See the Google Maps RenderingType documentation for more information.

G.RenderingType.RASTER
G.RenderingType.UNINITIALIZED
G.RenderingType.VECTOR

StreetViewSource

The source for the street view.

See the Google Maps StreetViewSource documentation for more information.

G.StreetViewSource.DEFAULT
G.StreetViewSource.GOOGLE
G.StreetViewSource.OUTDOOR

SymbolPath

Built-in symbol paths for certain shapes. These can be used as the icon for a PolylineIcon.

See the Google maps SymbolPath documentation for more information.

// A backward-pointing closed arrow.
G.SymbolPath.BACKWARD_CLOSED_ARROW;
// A backward-pointing open arrow.
G.SymbolPath.BACKWARD_OPEN_ARROW;
// A circle with a radius of 1.
G.SymbolPath.CIRCLE;
// A forward-pointing closed arrow.
G.SymbolPath.FORWARD_CLOSED_ARROW;
// A forward-pointing open arrow.
G.SymbolPath.FORWARD_OPEN_ARROW;