@paraboly/react-osm-geocoding
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

react-osm-geocoding

Find address locations via OSM Nominatim

NPM JavaScript Style Guide

alt text alt text

Integration Example

alt text

Install

npm install --save @paraboly/react-osm-geocoding

Usage

import React, { Component } from 'react'

import { ReactOsmGeocoding } from '@paraboly/react-osm-geocoding'
import '@paraboly/react-osm-geocoding/dist/index.css'

class Example extends Component {
  render() {
    return <ReactOsmGeocoding  callback={data => console.log(data)}/>
  }
}

Details

API: https://nominatim.org/release-docs/develop/api/Search/

Props Definition Type Default
placeholder Placeholder for search input string "Enter address"
debounce Debounce duration for the input in ms number 1000
iconUrl Icon image url for the search icon string "https://cdn2.iconfinder.com/data/icons/ios-7-icons/50/search-512.png"
city Check Nominatim search API for details string ""
countrycode Check Nominatim search API for details string "tr"
acceptLanguage Check Nominatim search API for details string "tr"
viewbox Bbox to filter query results, check Nominatim for more information <x1>,<y1>,<x2>,<y2> ""
callback Function returns selected address information Function undefined

License

MIT © SchemeSonic

Package Sidebar

Install

npm i @paraboly/react-osm-geocoding

Weekly Downloads

21

Version

1.0.2

License

MIT

Unpacked Size

30.2 kB

Total Files

9

Last publish

Collaborators

  • parabolynpm