Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathieuancelin/search-postal-address
https://github.com/mathieuancelin/search-postal-address
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mathieuancelin/search-postal-address
- Owner: mathieuancelin
- Created: 2020-02-07T13:42:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T06:41:17.000Z (almost 2 years ago)
- Last Synced: 2023-03-11T09:56:47.371Z (over 1 year ago)
- Language: JavaScript
- Size: 3.5 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
#
## Install
```sh
yarn add https://github.com/mathieuancelin/search-postal-address
```## Usage
```js
import { SearchPostalAddress } from 'search-postal-address';function App(props) {
return (
Recherchez une adresse
);
}
```## Storybook
```sh
yarn install
yarn storybook
```## API
proptypes:
s
* `address: string` - plain text address that will be filled at first render
* `onAddressSelected: function` - a function that will be called when an address is selected. The adress object will be passed ass unique parameteraddress type:
```json
{
"type":"Feature",
"geometry":{
"type":"Point",
"coordinates":[
2.290084,
49.897443
]
},
"properties":{
"label":"8 Boulevard du Port 80000 Amiens",
"score":0.49159121588068583,
"housenumber":"8",
"id":"80021_6590_00008",
"type":"housenumber",
"name":"8 Boulevard du Port",
"postcode":"80000",
"citycode":"80021",
"x":648952.58,
"y":6977867.25,
"city":"Amiens",
"context":"80, Somme, Hauts-de-France",
"importance":0.6706612694243868,
"street":"Boulevard du Port"
}
}
```