1.0.7 • Published 5 years ago
@ffly4u/leaflet-tocoordinates v1.0.7
leaflet-toCoordinates
A simple control to center map on specific coordinates to leaflet
Installation
with npm:
npm install --save @ffly4u/leaflet-tocoordinatesor yarn:
yarn add @ffly4u/leaflet-tocoordinatesUsage
import L from 'leaflet';
import LeafletToCoordinates from '@ffly4u/leaflet-tocoordinates';
import '@ffly4u/leaflet-tocoordinates/dist/leaflet.css';
const control = new LeafletToCoordinates();
const map = new L.Map('map');
map.addControl(LeafletToCoordinates);Options
| Parameters | Type | Default |
|---|---|---|
| position | String | topleft |
| style | String | button |
| retainZoomLevel | Boolean | false |
| animateZoom | Boolean | true |
| inputLabel | String | Enter GPS coordinates |
| zoomLevel | Int | 18 |
| classNames | Object | { container: 'leaflet-bar leaflet-control leaflet-control-tocoordinates', button: 'leaflet-bar-part fa fa-dot-circle-o', resetButton: 'reset', form: '', input: '' } |