1.0.7 • Published 4 years ago

@ffly4u/leaflet-tocoordinates v1.0.7

Weekly downloads
30
License
MIT
Repository
github
Last release
4 years ago

leaflet-toCoordinates

A simple control to center map on specific coordinates to leaflet

Installation

with npm:

npm install --save @ffly4u/leaflet-tocoordinates

or yarn:

yarn add @ffly4u/leaflet-tocoordinates

Usage

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

ParametersTypeDefault
positionStringtopleft
styleStringbutton
retainZoomLevelBooleanfalse
animateZoomBooleantrue
inputLabelStringEnter GPS coordinates
zoomLevelInt18
classNamesObject{ container: 'leaflet-bar leaflet-control leaflet-control-tocoordinates', button: 'leaflet-bar-part fa fa-dot-circle-o', resetButton: 'reset', form: '', input: '' }

License

MIT