0.1.0 • Published 2 years ago

capacitor-openstreetmap v0.1.0

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

Capacitor Openstreetmap Plugin

This plugin allows you to easily use Openstreetmap in your Capacitor app.

Install

npm install capacitor-openstreetmap
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


initialize(...)

initialize(options: InitializeOptions) => Promise<void>
ParamType
optionsInitializeOptions

resize()

resize() => Promise<void>

onDidMapClick(...)

onDidMapClick(callback: DidMapClickResult) => Promise<void>
ParamType
callbackDidMapClickResult

addMarker(...)

addMarker(options: AddMarkerOptions) => Promise<OpenstreetmapMarker>
ParamType
optionsAddMarkerOptions

Returns: Promise<OpenstreetmapMarker>


listMarkers()

listMarkers() => Promise<any>

Returns: Promise<any>


addCircle(...)

addCircle(options: AddCircleOptions) => Promise<void>
ParamType
optionsAddCircleOptions

Interfaces

InitializeOptions

PropTypeDescription
mapIdstringThe id of the div element where the map should be rendered
latitudenumberThe map's initial center latitude.
longitudenumberThe map's initial center longitude.
zoomnumberThe map's initial zoom level.

LatLng

PropType
latnumber
lngnumber

AddMarkerOptions

PropType
idstring
locationLatLng

AddCircleOptions

PropType
idstring
latitudenumber
longitudenumber
colorstring
fillColorstring
fillOpacitynumber
radiusnumber

Type Aliases

DidMapClickResult

(location: LatLng): void

Maintainers

@Phil0xFF

Leaflet Copyright

Copyright (c) 2010-2022, Volodymyr Agafonkin Copyright (c) 2010-2011, CloudMade All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.