Package Exports
- react-input-latlng
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-input-latlng) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Latitude/Longitude masked input
A reactjs masked input for latitude/longitude coordinates.
Accepts degree or decimal coordinates.
Installation
npm install react-input-latlng --save
Usage
import Latlng from 'react-input-latlng';
...
<Latlng lat={this.state.lat} lng={this.state.lng} onChange={(lat, lng) => this.updatePoint(lat, lng)}/>
Props
- lat : number|string: initial latitude (decimal coordinates)
- lng : number|string: initial longitude (decimal coordinates)
- decimal : bool: uses decimal coordinates mask.
- onChange : (lat: number, lng: number): A callback which will be called any time the mask's value changes.
- geolocation : bool: true if user can use html5 geolocation api to get the device gps location
- iconLocateClass : string: class name used when the geolocation icon is displayed
- iconLocatingClass : string: class name used when the geolocation loading icon is displayed
- style : object: style for the input container