1.1.2 • Published 2 years ago

mugundhan-googlemap v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

mugundhan-googlemap

Capacitor Google Map for Android and Ios

Install

npm install mugundhan-googlemap
npx cap sync

API

echo(...)

echo(options: { value: string; }) => any
ParamType
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
ParamType
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
ParamType
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

ParamType
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

ParamType
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

ParamType
options{ type: string; }

Returns: any


setIndoorEnabled(...)

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

Allows indoor maps to be enabled or disabled

ParamType
options{ enabled: boolean; }

Returns: any


setTrafficEnabled(...)

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

Allows traffic information to be enabled or disabled

ParamType
options{ enabled: boolean; }

Returns: any


accessibilityElementsHidden(...)

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

iOS Only To hide accessiblity elements

ParamType
options{ hidden: boolean; }

Returns: any


padding(...)

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

Adds padding around the map

ParamType
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

ParamType
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

ParamType
options{ latitude: number; longitude: number; }

Returns: any


enableCurrentLocation(...)

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

Enable user's current location

ParamType
options{ enabled: boolean; }

Returns: any


myLocation(...)

myLocation(options: any) => any

Get user location

ParamType
optionsany

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

ParamType
options{ jsonString: string; }

Returns: any


addPolyline(...)

addPolyline(options: PolylineOptions) => any

Shapes

ParamType
optionsPolylineOptions

Returns: any


addCircle(...)

addCircle(options: CircleOptions) => any
ParamType
optionsCircleOptions

Returns: any


addPolygon(...)

addPolygon(options: PolygonOptions) => any
ParamType
optionsPolygonOptions

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
ParamType
eventName'didTap'
listenerFunc(results: any) => void

Returns: PluginListenerHandle


addListener('dragEnded', ...)

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

Returns: PluginListenerHandle


addListener('didTapAt', ...)

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

Returns: PluginListenerHandle


addListener('didTapPOIWithPlaceID', ...)

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

Returns: PluginListenerHandle


addListener('didChange', ...)

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

Returns: PluginListenerHandle


addListener('onMapReady', ...)

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

Returns: PluginListenerHandle


addListener(string, ...)

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

Returns: any


removeAllListeners()

removeAllListeners() => any

Returns: any


Interfaces

LatLng

PropType
latitudenumber
longitudenumber

PolylineOptions

PropType
idViewID
points{}
tagany
colorstring
widthnumber
zIndexnumber
visibilityboolean

ViewID

PropType
androidIDnumber
iOSIDnumber

CircleOptions

PropType
idViewID
centerLatLng
radiusnumber
strokeColorstring
fillColorstring
strokeWidthnumber
zIndexnumber
visibilityboolean

PolygonOptions

PropType
idViewID
points{}
tagany
strokeColorstring
fillColorstring
strokeWidthnumber
zIndexnumber
visibilityboolean

PluginListenerHandle

PropType
remove() => any
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.1

2 years ago