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.
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
Constant | Description |
---|---|
PLACE_CHANGED | The 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
Constant | Description |
---|---|
ERROR | There was a problem contacting the Google servers. |
INVALID_REQUEST | The geocode request was invalid. Most likely a required parameter was missing or an invalid parameter value was used. |
OVER_QUERY_LIMIT | The webpage has gone over the requests limit in too short a period of time. |
REQUEST_DENIED | The webpage is not allowed to use the Google Maps Geocoding API. |
UNKNOWN_ERROR | A 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
Constant | Description |
---|---|
APPROXIMATE | The returned result is an approximate location. |
GEOMETRIC_CENTER | The 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_INTERPOLATED | The 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. |
ROOFTOP | This is the most precise geocode result type. |
LoaderEvents
Events that can be fired by the Loader.
G.LoaderEvents.LOAD
G.LoaderEvents.MAP_LOAD
Constant | Description |
---|---|
LOAD | The event fired when the API library is loaded. |
MAP_LOAD | The 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
Constant | Description |
---|---|
BOUNDS_CHANGED | The event fired when the viewport bounds have changed. |
CENTER_CHANGED | The event fired when the map center property changes. |
CLICK | The event fired when the map is clicked. |
CONTEXT_MENU | The event fired when the map DOM contextmenu is fired on the map container. |
DBLCLICK | The event fired when the map is double clicked. |
DRAG | The event fired when the user drags the map. |
DRAG_END | The event fired when the user stops dragging the map. |
DRAG_START | The event fired when the user starts dragging the map. |
HEADING_CHANGED | The event fired when the map heading value changes. |
IDLE | The event fired when the map becomes idle after panning or zooming. |
IS_FRACTIONAL_ZOOM_ENABLED_CHANGED | The event fired when the isFractionalZoomEnabled property has changed. |
MAP_CAPABILITIES_CHANGED | The event fired when the map capabilities change. |
LOCATION_ERROR | The event fired when there is an error getting the user's location. |
LOCATION_FOUND | The event fired when the user's location has been found. |
MAP_TYPE_ID_CHANGED | The event fired when the mapTypeId property changes. |
MOUSE_MOVE | The event fired when the user's mouse moves over the map. |
MOUSE_OVER | The event fired when the user's mouse enters the map. |
MOUSE_OUT | The event fired when the user's mouse exits the map. |
PROJECTION_CHANGED | The event fired when the map projection has changed. |
READY | The event fired when the map is ready and visible. |
RENDERING_TYPE_CHANGED | The event fired when the map renderingType has changed. |
TILES_LOADED | The event fired when the visible tiles have finished loading. |
TILT_CHANGED | The event fired when the map tilt property changes. |
ZOOM_CHANGED | The 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
Constant | Description |
---|---|
ANIMATION_CHANGED | The event fired when the marker's animation changes. |
CLICK | The event fired when the marker is clicked. |
CLICKABLE_CHANGED | The event fired when the marker clickable property changes. |
CONTEXT_MENU | The event fired when the DOM contextmenu is fired on the marker. |
CURSOR_CHANGED | The event fired when the marker cursor property changes. |
DBLCLICK | The event fired when the marker is double clicked. |
DRAG | The event fired when the user drags the marker. |
DRAG_END | The event fired when the user stops dragging the marker. |
DRAGGABLE_CHANGED | The event fired when the marker draggable property changes. |
DRAG_START | The event fired when the user starts dragging the marker. |
FLAT_CHANGED | The event fired when themarker flat property changes. |
ICON_CHANGED | The event fired when the marker icon property changes. |
MOUSE_DOWN | The event fired when the user's mouse is pressed down on the marker. |
MOUSE_MOVE | The event fired when the user's mouse moves over the map. |
MOUSE_OVER | The event fired when the user's mouse enters the map. |
MOUSE_OUT | The event fired when the user's mouse exits the map. |
MOUSE_UP | The event fired for the mouseup event on the marker. |
POSITION_CHANGED | The event fired when the marker's position property has changed. |
READY | The event fired when the marker is loaded and ready for use. |
SHAPE_CHANGED | The event fired when the marker's shape property changes. |
TITLE_CHANGED | The event fired when the marker's title property changes. |
VISIBLE_CHANGED | The event fired when the marker's visible property changes. |
ZINDEX_CHANGED | The event fired when the marker's zindex property changes. |
OverlayEvents
Events that can be fired by the Overlay.
G.OverlayEvents.OPEN
Constant | Description |
---|---|
OPEN | The event fired when the overlay is opened. |
PlacesSearchBoxEvents
Events that can be fired by the PlacesSearchBox.
G.PlacesSearchBoxEvents.PLACES_CHANGED
Constant | Description |
---|---|
PLACES_CHANGED | The 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
Constant | Description |
---|---|
OPEN | The 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;