Building apps at a large company? Check out Ionic Enterprise

Google Maps

Improve this doc

This plugin uses the native Google Maps SDK Note: As of Ionic native 4.0, this using the 2.0 version of the google maps plugin. Please make sure your plugin is updated

Repo: https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
    $ npm install --save @ionic-native/google-maps
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import {
 GoogleMaps,
 GoogleMap,
 GoogleMapsEvent,
 LatLng,
 CameraPosition,
 MarkerOptions,
 Marker
} from '@ionic-native/google-maps';

export class MapPage {
 constructor(private googleMaps: GoogleMaps) {}

// Load map only after view is initialized
ngAfterViewInit() {
 this.loadMap();
}

loadMap() {
 // make sure to create following structure in your view.html file
 // and add a height (for example 100%) to it, else the map won't be visible
 // <ion-content>
 //  <div #map id="map" style="height:100%;"></div>
 // </ion-content>

 // create a new map by passing HTMLElement
 let element: HTMLElement = document.getElementById('map');

 let map: GoogleMap = this.googleMaps.create(element);

 // listen to MAP_READY event
 // You must wait for this event to fire before adding something to the map or modifying it in anyway
 map.one(GoogleMapsEvent.MAP_READY).then(
   () => {
     console.log('Map is ready!');
     // Now you can add elements to the map like the marker
   }
 );

 // create CameraPosition
 let position: CameraPosition = {
   target: {
     lat: 43.0741904,
     lng: -89.3809802
   },
   zoom: 18,
   tilt: 30
 };

 // move the map's camera to position
 map.moveCamera(position);

 // create new marker
 let markerOptions: MarkerOptions = {
   position: ionic,
   title: 'Ionic'
 };

 const marker: Marker = map.addMarker(markerOptions)
   .then((marker: Marker) => {
      marker.showInfoWindow();
    });
 }

}

Instance Members

create(element, options)

Creates a new GoogleMap instance

Param Type Details
element string|HTMLElement

Element ID or reference to attach the map to

options any

Options

Returns: GoogleMap

environment()

Method that returns an instance of Environment class

Returns: Environment

spherical()

Method that returns an instance of Spherical class

Returns: Spherical

encoding()

Method that returns an instance of Encoding class

Returns: Encoding

GoogleMap

Instance Members

setDiv(domNode)

Changes the map div

Param Type Details
domNode

getDiv()

Returns the map HTML element

Returns: HTMLElement

setMapTypeId(mapTypeId)

Changes the map type id

Param Type Details
mapTypeId string

animateCamera()

Moves the camera with animation

Returns: Promise<any>

animateCameraZoomIn()

Zooming in the camera with animation

Returns: Promise<any>

animateCameraZoomOut()

Zooming out the camera with animation

Returns: Promise<any>

moveCamera()

Moves the camera without animation

Returns: Promise<any>

moveCameraZoomIn()

Zooming in the camera without animation

Returns: Promise<any>

moveCameraZoomOut()

Zooming out the camera without animation

Returns: Promise<any>

getCameraPosition()

Get the position of the camera.

Returns: CameraPosition

getCameraTarget()

Get the current camera target position

Returns: Promise<CameraPosition>

getCameraZoom()

Get the current camera zoom level

Returns: number

getCameraBearing()

Get the current camera bearing

Returns: number

getCameraTilt()

Get the current camera tilt (view angle)

Returns: number

setCameraTarget(latLng)

Set the center position of the camera view

Param Type Details
latLng ILatLng|Array.<ILatLng>

setCameraZoom(zoomLevel)

Set zoom level of the camera

Param Type Details
zoomLevel number

Zoom level

setCameraTilt(tiltLevel)

Set the camera view angle

Param Type Details
tiltLevel number

Tilt level

setCameraBearing(bearing)

Set camera bearing

Param Type Details
bearing any

panBy(x, y)

Change the center of the map by the given distance in pixels

Param Type Details
x any
y any

getVisibleRegion()

Get the current visible region (southWest and northEast)

Returns: VisibleRegion

getMyLocation()

Get the current device location

Returns: Promise<MyLocation>

setClickable(isClickable)

Set false to ignore all clicks on the map

Param Type Details
isClickable boolean

remove()

Destroy a map completely

clear()

Remove all overlays, such as marker

Returns: Promise<any>

fromLatLngToPoint()

Convert the unit from LatLng to the pixels from the left/top of the map div

Returns: Promise<any>

fromPointToLatLng()

Convert the unit from the pixels from the left/top to the LatLng

Returns: Promise<LatLng>

setMyLocationEnabled(enabled)

Set true if you want to show the MyLocation button

Param Type Details
enabled boolean

getFocusedBuilding()

Get the currently focused building

Returns: Promise<any>

setIndoorEnabled(enabled)

Set true if you want to show the indoor map

Param Type Details
enabled boolean

setTrafficEnabled(enabled)

Set true if you want to show the traffic layer

Param Type Details
enabled boolean

setCompassEnabled(enabled)

Set true if you want to show the compass button

Param Type Details
enabled boolean

setAllGesturesEnabled(enabled)

Sets the preference for whether all gestures should be enabled or disabled

Param Type Details
enabled boolean

setVisible(visible)

Set visibility of the map

Param Type Details
visible boolean

setPadding(top, right, left, bottom)

Adjust the map padding (same as CSS padding rule)

Param Type Details
top number
right number
left number
bottom number

setOptions(options)

Set options

Param Type Details
options

addMarker()

Adds a marker

Returns: Promise<Marker | any>

addCircle()

Adds a circle

Returns: Promise<Circle | any>

addPolygon()

Adds a polygon

Returns: Promise<Polygon | any>

addPolyline()

Returns: Promise<Polyline | any>

addTileOverlay()

Returns: Promise<TileOverlay | any>

addGroundOverlay()

Returns: Promise<GroundOverlay | any>

refreshLayout()

Refreshes layout. You can execute it, but you don’t need to do that. The plugin does this automatically.

toDataURL()

Returns: Promise<any>

Circle

Instance Members

getMap()

Return the map instance.

Returns: GoogleMap

setCenter(latLng)

Change the center position.

Param Type Details
latLng ILatLng

getCenter()

Return the current center position

Returns: ILatLng

getRadius()

Return the current circle radius.

Returns: number

setRadius(radius)

Change the circle radius.

Param Type Details
radius number

setFillColor(color)

Change the filling color (inner color).

Param Type Details
color string

getFillColor()

Return the current circle filling color (inner color).

Returns: string

setStrokeWidth(strokeWidth)

Change the stroke width.

Param Type Details
strokeWidth number

getStrokeWidth()

Return the current circle stroke width (unit: pixel).

Returns: number

setStrokeColor(strokeColor)

Change the stroke color (outter color).

Param Type Details
strokeColor string

getStrokeColor()

Return the current circle stroke color (outer color).

Returns: string

setClickable(clickable)

Change clickablity of the circle.

Param Type Details
clickable boolean

getClickable()

Return true if the circle is clickable.

Returns: boolean

setZIndex(zIndex)

Change the circle zIndex order.

Param Type Details
zIndex number

getZIndex()

Return the current circle zIndex.

Returns: number

remove()

Remove the circle.

getBounds()

Return the latLngBounds (rectangle) that contains the circle.

Returns: LatLngBounds

setVisible(visible)

Set circle visibility

Param Type Details
visible boolean

getVisible()

Returns a boolean that indicates whether the circle is visible

Returns: boolean

Encoding

Instance Members

decodePath(encoded, precision?)

Decodes an encoded path string into a sequence of LatLngs.

Param Type Details
encoded string

an encoded path string

precision? number

default: 5

Returns: LatLng

encodePath(path)

Encodes a sequence of LatLngs into an encoded path string.

Param Type Details
path Array.<ILatLng>|BaseArrayClass.<ILatLng>

a sequence of LatLngs

Returns: string

Environment

Instance Members

getLicenseInfo()

Get the open source software license information for Google Maps Android API v2 and Google Maps SDK for iOS.

Returns: Promise<any>

setBackgroundColor(color)

Specifies the background color of the app.

Param Type Details
color

Geocoder

Instance Members

geocode(request)

Converts position to address and vice versa

Param Type Details
request GeocoderRequest

Request object with either an address or a position

Returns: Promise<GeocoderResult | BaseArrayClass<GeocoderResult>>

GroundOverlay

Instance Members

getMap()

Return the map instance.

Returns: GoogleMap

setBounds(bounds)

Change the bounds of the GroundOverlay

Param Type Details
bounds ILatLng[]

setBearing(bearing)

Change the bearing of the ground overlay

Param Type Details
bearing number

getBearing()

Return the current bearing value

setImage(image)

Change the image of the ground overlay

Param Type Details
image string

URL of image

setOpacity(opacity)

Change the opacity of the ground overlay from 0.0 to 1.0

Param Type Details
opacity number

getOpacity()

Return the current opacity

Returns: number

setClickable(clickable)

Change clickablity of the ground overlay

Param Type Details
clickable boolean

getClickable()

Return true if the ground overlay is clickable

Returns: boolean

setVisible(visible)

Change visibility of the ground overlay

Param Type Details
visible boolean

getVisible()

Return true if the ground overlay is visible

Returns: boolean

setZIndex(index)

Change the ground overlay zIndex order

Param Type Details
index number

getZIndex()

Return the current ground overlay zIndex

Returns: number

remove()

Remove the ground overlay

HtmlInfoWindow

Instance Members

setBackgroundColor(color)

Change the backgroundColor

Param Type Details
color string

setContent(content)

Set your HTML contents.

Param Type Details
content any

String containing text or HTML element

open(marker)

Open the htmlInfoWindow

Param Type Details
marker Marker

close()

Close the htmlInfoWindow

Geocoder

Instance Members

geocode(request)

Converts position to address and vice versa

Param Type Details
request GeocoderRequest

Request object with either an address or a position

Returns: Promise<GeocoderResult | BaseArrayClass<GeocoderResult>>

LatLng

Instance Members

lat()

lng()

equals()

toString()

toUrlValue()

LatLngBounds

Instance Members

northeast()

southwest()

type()

toString()

Converts to string

Returns: string

toUrlValue(precision)

Returns a string of the form “lat_sw,lng_sw,lat_ne,lng_ne” for this bounds, where “sw” corresponds to the southwest corner of the bounding box, while “ne” corresponds to the northeast corner of that box.

Param Type Details
precision number

Returns: string

extend(LatLng)

Extends this bounds to contain the given point.

Param Type Details
LatLng ILatLng

contains(LatLng)

Returns true if the given lat/lng is in this bounds.

Param Type Details
LatLng ILatLng

getCenter()

Computes the center of this LatLngBounds

Returns: LatLng

Marker

Instance Members

getMap()

Return the map instance.

Returns: GoogleMap

setPosition(latLng)

Set the marker position.

Param Type Details
latLng ILatLng

getPosition()

Return the marker position.

Returns: ILatLng

showInfoWindow()

Show the normal infoWindow of the marker.

hideInfoWindow()

Hide the normal infoWindow of the marker.

setAnimation(animation)

Specify the animation either DROP or BOUNCE

Param Type Details
animation string

setDisableAutoPan(disableAutoPan)

Set true if you do not want to move the map when you click on the marker.

Param Type Details
disableAutoPan boolean

setVisible(visible)

Set false if you want to hide the marker.

Param Type Details
visible

isVisible()

Return true if the marker is visible

setTitle(title)

Change title of the normal infoWindow.

Param Type Details
title string

getTitle()

Return the title strings.

Returns: string

setSnippet(snippet)

Change snippet of the normal infoWindow.

Param Type Details
snippet string

getSnippet()

Return the snippet strings.

Returns: string

setOpacity(alpha)

Change the marker opacity from 0.0 to 1.0.

Param Type Details
alpha number

Opacity

getOpacity()

Return the marker opacity.

Returns: number Opacity

remove()

Remove the marker.

setIconAnchor(x, y)

Change the info window anchor. This defaults to 50% from the left of the image and at the bottom of the image.

Param Type Details
x number

Distance from left of the icon image in pixels.

y number

Distance from top of the icon image in pixels.

setInfoWindowAnchor(x, y)

Change the info window anchor. This defaults to 50% from the left of the image and at the top of the image.

Param Type Details
x number

Distance from left of the icon image in pixels.

y number

Distance from top of the icon image in pixels.

isInfoWindowShown()

Return true if the infoWindow is shown on the marker

Returns: boolean

getHashCode()

Return the marker hash code.

Returns: string Marker hash code

setZIndex(y)

Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.

Param Type Details
y number

z-index

getZIndex()

Get z-index

Returns: number

setDraggable(draggable)

Set true if you allow all users to drag the marker.

Param Type Details
draggable boolean

isDraggable()

Return true if the marker drag is enabled.

Returns: boolean

setFlat(flat)

Set true if you want to be flat marker.

Param Type Details
flat boolean

setIcon(icon)

Change icon url and/or size

Param Type Details
icon

setRotation(rotation)

Set the marker rotation angle.

Param Type Details
rotation number

getRotation()

Return the marker rotation angle.

Returns: number

Polygon

Instance Members

getMap()

Return the map instance.

Returns: GoogleMap

setPoints(points)

Change the polygon points.

Param Type Details
points ILatLng[]

getPoints()

Return an instance of the BaseArrayClass. You can modify the points.

Returns: BaseArrayClass<ILatLng>

setHoles(holes)

Change the polygon holes.

Param Type Details
holes ILatLng[][]

getHoles()

Return an instance of the BaseArrayClass. You can modify the holes.

Returns: BaseArrayClass<ILatLng[]>

setFillColor(fillColor)

Change the filling color (inner color)

Param Type Details
fillColor string

getFillColor()

Return the current polygon filling color (inner color).

Returns: string

setStrokeColor(strokeColor)

Change the stroke color (outer color)

Param Type Details
strokeColor string

getStrokeColor()

Return the current polygon stroke color (outer color)

Returns: string

setClickable(clickable)

Change clickablity of the polygon

Param Type Details
clickable boolean

getClickable()

Return true if the polygon is clickable

setVisible(visible)

Change visibility of the polygon

Param Type Details
visible boolean

getVisible()

Return true if the polygon is visible

Returns: boolean

setZIndex(zIndex)

Change the polygon zIndex order.

Param Type Details
zIndex number

getZIndex()

Return the current polygon zIndex

Returns: number

remove()

Remove the polygon.

setStrokeWidth()

Change the polygon stroke width

getStrokeWidth()

Return the polygon stroke width

setGeodesic(geodesic)

When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth.

Param Type Details
geodesic boolean

getGeodesic()

Return true if the polylgon is geodesic.

Returns: boolean

Polyline

Instance Members

getMap()

Return the map instance.

Returns: GoogleMap

setPoints(points)

Change the polyline points.

Param Type Details
points ILatLng[]

getPoints()

Return an instance of the BaseArrayClass You can modify the points.

setGeoDesic(geoDesic)

When true, edges of the polyline are interpreted as geodesic and will follow the curvature of the Earth.

Param Type Details
geoDesic boolean

getGeodesic()

Return true if the polyline is geodesic

setVisible(visible)

Change visibility of the polyline

Param Type Details
visible boolean

getVisible()

Return true if the polyline is visible

Returns: boolean

setClickable(clickable)

Change clickablity of the polyline

Param Type Details
clickable boolean

getClickable()

Return true if the polyline is clickable

Returns: boolean

setStrokeColor(strokeColor)

Change the polyline color

Param Type Details
strokeColor string

getStrokeColor()

Return the current polyline color

Returns: string

setStrokeWidth(strokeWidth)

Change the polyline stroke width

Param Type Details
strokeWidth number

getStrokeWidth()

Return the current stroke width (unit: pixel).

Returns: number

setZIndex(index)

Change the polyline zIndex order.

Param Type Details
index number

getZIndex()

Return the current polyline zIndex

Returns: number

remove()

Remove the polyline

Spherical

Instance Members

computeDistanceBetween(locationA, locationB)

Returns the distance, in meters, between two LatLngs.

Param Type Details
locationA ILatLng
locationB ILatLng

Returns: number

computeOffset(from, distance, heading)

Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north)

Param Type Details
from ILatLng
distance number
heading number

Returns: LatLng

computeOffsetOrigin(to, distance, heading)

Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available.

Param Type Details
to ILatLng

The destination LatLng.

distance number

The distance travelled, in meters.

heading number

The heading in degrees clockwise from north.

Returns: LatLng

computeLength(path)

Returns the length of the given path.

Param Type Details
path Array.<ILatLng>|BaseArrayClass.<ILatLng>

Returns: number

computeArea(path)

Returns the area of a closed path. The computed area uses the same units as the radius.

Param Type Details
path Array.<ILatLng>|BaseArrayClass.<ILatLng>

.

Returns: number

computeSignedArea(path)

Returns the signed area of a closed path. The signed area may be used to determine the orientation of the path.

Param Type Details
path Array.<ILatLng>|BaseArrayClass.<ILatLng>

.

Returns: number

computeHeading(from, to)

Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range (-180,180).

Param Type Details
from ILatLng
to ILatLng

Returns: number

interpolate(from, to, fraction)

Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.

Param Type Details
from ILatLng

The LatLng from which to start.

to ILatLng

The LatLng toward which to travel.

fraction number

A fraction of the distance to travel from 0.0 to 1.0 .

Returns: LatLng

TileOverlay

Instance Members

getMap()

Return the map instance.

Returns: GoogleMap

setFadeIn(fadeIn)

Set whether the tiles should fade in.

Param Type Details
fadeIn boolean

getFadeIn()

Get whether the tiles should fade in

Returns: boolean

setZIndex(zIndex)

Set the zIndex of the tile overlay

Param Type Details
zIndex number

getZIndex()

Return the zIndex of the tile overlay

Returns: number

setOpacity(opacity)

Set the opacity of the tile overlay

Param Type Details
opacity number

getOpacity()

Return the opacity of the tile overlay

Returns: number

setVisible(visible)

Set false if you want to hide

Param Type Details
visible boolean

getVisible()

Return true if the tile overlay is visible

Returns: boolean

getTileSize()

Get tile size

remove()

Remove the tile overlay

BaseClass

Instance Members

addEventListener()

Adds an event listener.

Returns: Observable<any>

addListenerOnce()

Adds an event listener that works once.

Returns: Promise<any>

get(key)

Gets a value

Param Type Details
key

set(key, value)

Sets a value

Param Type Details
key
value

bindTo(key, target, targetKey?, noNotify?)

Bind a key to another object

Param Type Details
key string
target any
targetKey? string
noNotify? boolean

on()

Listen to a map event.

Returns: Observable<any>

one()

Listen to a map event only once.

Returns: Promise<any>

empty()

Clears all stored values

trigger()

Dispatch event.

BaseArrayClass

Instance Members

on(event)

Add an event listener

Param Type Details
event string

name of the event. Can be insert_at, remove_at, set_at, or finish.

Returns: Observable<any> returns an Observable

empty(noNotify?)

Removes all elements from the array.

Param Type Details
noNotify? boolean

Set true to prevent remove_at events.

forEach(fn, callback?)

Iterate over each element, calling the provided callback.

Param Type Details
fn Function
callback? Function

map(fn, callback?)

Iterate over each element, calling the provided callback. Then you can get the results of each callback.

Param Type Details
fn Function
callback? Function

Returns: Array<Object> returns a new array with the results

filter(fn, callback?)

The filter() method creates a new array with all elements that pass the test implemented by the provided function.

Param Type Details
fn Function
callback? Function

Returns: Array<Object> returns a new array with the results

getArray()

Returns a reference to the underlying Array.

Returns: Array<Object>

getAt(index)

Returns the element at the specified index.

Param Type Details
index number

Returns: Object

getLength()

Returns the number of the elements.

Returns: number

indexOf(element)

The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.

Param Type Details
element Object

Returns: number

reverse()

The reverse() method reverses an array in place.

sort()

The sort() method sorts the elements of an array in place and returns the array.

insertAt(index, element, noNotify?)

Inserts an element at the specified index.

Param Type Details
index number
element Object
noNotify? boolean

Set true to prevent insert_at events.

Returns: Object

pop(noNotify?)

Removes the last element of the array and returns that element.

Param Type Details
noNotify? boolean

Set true to prevent remove_at events.

Returns: Object

push(element, noNotify?)

Adds one element to the end of the array and returns the new length of the array.

Param Type Details
element object
noNotify? boolean

Set true to prevent insert_at events.

removeAt(index, noNotify?)

Removes an element from the specified index.

Param Type Details
index number
noNotify? boolean

Set true to prevent insert_at events.

setAt(index, element, noNotify?)

Sets an element at the specified index.

Param Type Details
index number
element object
noNotify? boolean

Set true to prevent set_at events.

GoogleMapOptions

Param Type Details
mapType MapType (optional)
controls */ mapToolbar?: boolean } (optional)
gestures { scroll?: boolean; tilt?: boolean; zoom?: boolean; rotate?: boolean; } (optional)
styles any[]

Map styles

(optional)
camera CameraPosition

Initial camera position

(optional)
preferences */ building?: boolean } (optional)

AnimateCameraOptions

Param Type Details
target ILatLng | Array<ILatLng> | LatLngBounds

Center position of the camera target.

(optional)
tilt number

View angle of camera from 0 to 90

(optional)
zoom number

Zoom level from 0 to 20

(optional)
bearing number

Heading from 0 to 359

(optional)
duration number

Duration of camera animation in milli seconds

(optional)

CameraPosition

Param Type Details
target ILatLng | LatLngBounds | ILatLng[]

The center location of the camera view.

(optional)
tilt number

View angle

(optional)
zoom number

Zoom level

(optional)
bearing number

Map orientation

(optional)
duration number

The duration of animation in milliseconds

(optional)

CircleOptions

Param Type Details
center ILatLng (optional)
radius number (optional)
strokeColor string (optional)
strokeWidth number (optional)
fillColor string (optional)
clickable boolean (optional)
visible boolean (optional)
zIndex number (optional)

GeocoderRequest

Param Type Details
address string | string[] (optional)
position ILatLng | ILatLng[] (optional)

GeocoderResult

Param Type Details
adminArea string (optional)
country string (optional)
countryCode string (optional)
extra { featureName?: string; lines?: Array<string>; permises?: string; phone?: string; url?: string } (optional)
locale string (optional)
locality string (optional)
position { lat: number; lng: number } (optional)
postalCode string (optional)
subAdminArea string (optional)
subLocality string (optional)
subThoroughfare string (optional)
thoroughfare string (optional)

GroundOverlayOptions

Param Type Details
url string

URL of overlay

(optional)
bounds Array<ILatLng>

Bounds, array of ILatLng

(optional)
clickable boolean

Set to false to ignore click event

(optional)
visible boolean

Set to false to hide

(optional)
opacity number

Opacity. From 0.0 to 1.0 .

(optional)
bearing number

Bearing

(optional)
zIndex number

Z-index

(optional)

ILatLng

Param Type Details
lat number
lng number

MarkerIcon

Param Type Details
url string (optional)
size { width?: number; height?: number; } (optional)

MarkerOptions

Param Type Details
icon any

The icon image url or properties. Also you can specify HTML Color values. Alternatively you can specify the image as Base64

(optional)
title string

The content of the infoWindow.

(optional)
snippet string

The snippet of the infoWindow.

(optional)
position ILatLng

The position of the marker.

(optional)
infoWindowAnchor number[]

Specify the anchor of the InfoWindow

(optional)
draggable boolean

Set true if you want to enable to drag the marker. (Default: false) Important! Drag starts after long pressed on the marker.

(optional)
flat boolean

Set true if you want to use a flat marker. (Default: false)

(optional)
rotation number

Set rotation angle. (Default: 0)

(optional)
visible boolean

Set false if you want to hide. (Default: true)

(optional)
styles any

Specify the options for title. This property work for normal InfoWindow.

(optional)
animation string

Which animation to play when marker is added to a map.

(optional)
zIndex number

Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.

(optional)
disableAutoPan boolean

Set to true to disable auto panning when the marker is clicked.

(optional)

MyLocation

Param Type Details
latLng LatLng (optional)
elapsedRealtimeNanos any (optional)
time string (optional)
accuracy any (optional)
bearing number (optional)
altitude any (optional)
speed number (optional)
provider any (optional)
hashCode any (optional)

MyLocationOptions

Param Type Details
enableHighAccuracy boolean (optional)

PolygonOptions

Param Type Details
points Array<ILatLng> (optional)
geodesic boolean (optional)
strokeColor string (optional)
strokeWidth number (optional)
fillColor string (optional)
visible boolean (optional)
zIndex number (optional)
addHole Array<LatLng> (optional)

PolylineOptions

Param Type Details
points Array<ILatLng> (optional)
visible boolean (optional)
geodesic boolean (optional)
color string (optional)
width number (optional)
zIndex number (optional)

TileOverlayOptions

Param Type Details
getTile (x: number, y: number, zoom: number) => string
visible boolean (optional)
zIndex number (optional)
tileSize number (optional)
opacity number (optional)

VisibleRegion

Param Type Details
northeast any (optional)
southwest any (optional)

API

Native

General