mugundhan-googlemap
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

mugundhan-googlemap

Capacitor Google Map for Android and Ios

Install

npm install mugundhan-googlemap
npx cap sync

API

echo(...)

echo(options: { value: string; }) => any
Param Type
options { value: string; }

Returns: any


create(...)

create(options: { width: number; height: number; x: number; y: number; latitude?: number; longitude?: number; zoom?: number; liteMode?: boolean; }) => any
Param Type
options { width: number; height: number; x: number; y: number; latitude?: number; longitude?: number; zoom?: number; liteMode?: boolean; }

Returns: any


initialize(...)

initialize(options: { key: string; }) => any
Param Type
options { key: string; }

Returns: any


addMarker(...)

addMarker(options: { latitude: number; longitude: number; opacity?: number; title?: string; snippet?: string; isFlat?: boolean; url?: string; rotation?: number; key?: string; }) => any

Adds a marker on the map

Param Type
options { latitude: number; longitude: number; opacity?: number; title?: string; snippet?: string; isFlat?: boolean; url?: string; rotation?: number; key?: string; }

Returns: any


setCamera(...)

setCamera(options: { viewingAngle?: number; bearing?: number; zoom?: number; latitude?: number; longitude?: number; animate?: boolean; animationDuration?: number; coordinates?: LatLng[]; }) => any

Repositions the camera

Param Type
options { viewingAngle?: number; bearing?: number; zoom?: number; latitude?: number; longitude?: number; animate?: boolean; animationDuration?: number; coordinates?: {}; }

Returns: any


setMapType(...)

setMapType(options: { type: string; }) => any

Sets the map type

Param Type
options { type: string; }

Returns: any


setIndoorEnabled(...)

setIndoorEnabled(options: { enabled: boolean; }) => any

Allows indoor maps to be enabled or disabled

Param Type
options { enabled: boolean; }

Returns: any


setTrafficEnabled(...)

setTrafficEnabled(options: { enabled: boolean; }) => any

Allows traffic information to be enabled or disabled

Param Type
options { enabled: boolean; }

Returns: any


accessibilityElementsHidden(...)

accessibilityElementsHidden(options: { hidden: boolean; }) => any

[iOS Only] To hide accessiblity elements

Param Type
options { hidden: boolean; }

Returns: any


padding(...)

padding(options: { top: number; left: number; right: number; bottom: number; }) => any

Adds padding around the map

Param Type
options { top: number; left: number; right: number; bottom: number; }

Returns: any


clear()

clear() => any

Clear any views like Marker, Shapes from the map

Returns: any


close()

close() => any

Destroy the mapView, use in ionViewDidLeave and similar

Returns: any


hide()

hide() => any

Hide the mapView, use when preventing any overlapping on other views

Returns: any


show()

show() => any

Show the hidden mapView

Returns: any


settings(...)

settings(options: { allowScrollGesturesDuringRotateOrZoom?: boolean; compassButton?: boolean; consumesGesturesInView?: boolean; indoorPicker?: boolean; myLocationButton?: boolean; rotateGestures?: boolean; scrollGestures?: boolean; tiltGestures?: boolean; zoomGestures?: boolean; }) => any

Map UI Settings

Param Type
options { allowScrollGesturesDuringRotateOrZoom?: boolean; compassButton?: boolean; consumesGesturesInView?: boolean; indoorPicker?: boolean; myLocationButton?: boolean; rotateGestures?: boolean; scrollGestures?: boolean; tiltGestures?: boolean; zoomGestures?: boolean; }

Returns: any


reverseGeocodeCoordinate(...)

reverseGeocodeCoordinate(options: { latitude: number; longitude: number; }) => any

Get Google Map address for a set of lat lng

Param Type
options { latitude: number; longitude: number; }

Returns: any


enableCurrentLocation(...)

enableCurrentLocation(options: { enabled: boolean; }) => any

Enable user's current location

Param Type
options { enabled: boolean; }

Returns: any


myLocation(...)

myLocation(options: any) => any

Get user location

Param Type
options any

Returns: any


viewBounds()

viewBounds() => any

Get view bounds in latlng. This polygon can be a trapezoid instead of a rectangle, because a camera can have tilt. If the camera is directly over the center of the camera, the shape is rectangular, but if the camera is tilted, the shape will appear to be a trapezoid whose smallest side is closest to the point of view.

Returns: any


setMapStyle(...)

setMapStyle(options: { jsonString: string; }) => any

Add styles to map with a style JSON string format specific by Google

Param Type
options { jsonString: string; }

Returns: any


addPolyline(...)

addPolyline(options: PolylineOptions) => any

Shapes

Param Type
options PolylineOptions

Returns: any


addCircle(...)

addCircle(options: CircleOptions) => any
Param Type
options CircleOptions

Returns: any


addPolygon(...)

addPolygon(options: PolygonOptions) => any
Param Type
options PolygonOptions

Returns: any


setOnMarkerClickListener()

setOnMarkerClickListener() => any

Map click listeners

Returns: any


setOnMapClickListener()

setOnMapClickListener() => any

Returns: any


setOnPoiClickListener()

setOnPoiClickListener() => any

Returns: any


requestLocationPermission()

requestLocationPermission() => any

Returns: any


setOnMyLocationClickListener()

setOnMyLocationClickListener() => any

Returns: any


setOnMyLocationButtonClickListener()

setOnMyLocationButtonClickListener() => any

Returns: any


addListener('didTap', ...)

addListener(eventName: 'didTap', listenerFunc: (results: any) => void) => PluginListenerHandle
Param Type
eventName 'didTap'
listenerFunc (results: any) => void

Returns: PluginListenerHandle


addListener('dragEnded', ...)

addListener(eventName: 'dragEnded', listenerFunc: (results: any) => void) => PluginListenerHandle
Param Type
eventName 'dragEnded'
listenerFunc (results: any) => void

Returns: PluginListenerHandle


addListener('didTapAt', ...)

addListener(eventName: 'didTapAt', listenerFunc: (results: any) => void) => PluginListenerHandle
Param Type
eventName 'didTapAt'
listenerFunc (results: any) => void

Returns: PluginListenerHandle


addListener('didTapPOIWithPlaceID', ...)

addListener(eventName: 'didTapPOIWithPlaceID', listenerFunc: (results: any) => void) => PluginListenerHandle
Param Type
eventName 'didTapPOIWithPlaceID'
listenerFunc (results: any) => void

Returns: PluginListenerHandle


addListener('didChange', ...)

addListener(eventName: 'didChange', listenerFunc: (results: any) => void) => PluginListenerHandle
Param Type
eventName 'didChange'
listenerFunc (results: any) => void

Returns: PluginListenerHandle


addListener('onMapReady', ...)

addListener(eventName: 'onMapReady', listenerFunc: (results: any) => void) => PluginListenerHandle
Param Type
eventName 'onMapReady'
listenerFunc (results: any) => void

Returns: PluginListenerHandle


addListener(string, ...)

addListener(eventName: string, listenerFunc: (...args: any[]) => any) => any
Param Type
eventName string
listenerFunc (...args: {}) => any

Returns: any


removeAllListeners()

removeAllListeners() => any

Returns: any


Interfaces

LatLng

Prop Type
latitude number
longitude number

PolylineOptions

Prop Type
id ViewID
points {}
tag any
color string
width number
zIndex number
visibility boolean

ViewID

Prop Type
androidID number
iOSID number

CircleOptions

Prop Type
id ViewID
center LatLng
radius number
strokeColor string
fillColor string
strokeWidth number
zIndex number
visibility boolean

PolygonOptions

Prop Type
id ViewID
points {}
tag any
strokeColor string
fillColor string
strokeWidth number
zIndex number
visibility boolean

PluginListenerHandle

Prop Type
remove () => any

Readme

Keywords

Package Sidebar

Install

npm i mugundhan-googlemap

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

204 kB

Total Files

50

Last publish

Collaborators

  • mugundhan2603