capacitor-openstreetmap v0.1.0
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(...)
initialize(...)
resize()
onDidMapClick(...)
addMarker(...)
listMarkers()
addCircle(...)
- Interfaces
- Type Aliases
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
initialize(...)
initialize(options: InitializeOptions) => Promise<void>
Param | Type |
---|---|
options | InitializeOptions |
resize()
resize() => Promise<void>
onDidMapClick(...)
onDidMapClick(callback: DidMapClickResult) => Promise<void>
Param | Type |
---|---|
callback | DidMapClickResult |
addMarker(...)
addMarker(options: AddMarkerOptions) => Promise<OpenstreetmapMarker>
Param | Type |
---|---|
options | AddMarkerOptions |
Returns: Promise<OpenstreetmapMarker>
listMarkers()
listMarkers() => Promise<any>
Returns: Promise<any>
addCircle(...)
addCircle(options: AddCircleOptions) => Promise<void>
Param | Type |
---|---|
options | AddCircleOptions |
Interfaces
InitializeOptions
Prop | Type | Description |
---|---|---|
mapId | string | The id of the div element where the map should be rendered |
latitude | number | The map's initial center latitude. |
longitude | number | The map's initial center longitude. |
zoom | number | The map's initial zoom level. |
LatLng
Prop | Type |
---|---|
lat | number |
lng | number |
AddMarkerOptions
Prop | Type |
---|---|
id | string |
location | LatLng |
AddCircleOptions
Prop | Type |
---|---|
id | string |
latitude | number |
longitude | number |
color | string |
fillColor | string |
fillOpacity | number |
radius | number |
Type Aliases
DidMapClickResult
(location: LatLng): void
Maintainers
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:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
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.
2 years ago