1.1.5 • Published 3 months ago
geoplete v1.1.5
geoplete
Autocompletion for places and addresses. Checkout the demo. Uses awesomplete for UI, and furkot-geocode as a geocoder backend.
Install
$ npm install --save geoplete
Usage
var geoplete = require('geoplete');
var input = document.querySelection('.input-field');
geoplete(input, { // input element to which geoplete attaches
type: 'address', // 'address' or 'place'
minChars: 4, // min number of characters before we query for matches
lang: 'en', // language - if not specified document.lang is used
bounds: [[W,S],[E,N]], // location hint - array of 2 [longitude, latitude] points
item: function () {}, // generate list item (see [awesomplete][awesomplete-extend])
geocoder: {
// see [furkot-geocode] for details
}
});
When one of the values is selected input
will event.
The detail
field of the event contain place information:
place
- place name (may be absent if address doesn't correspond to a named place)type
- place typeaddress
- formated addresshouse
- building numberstreet
- street namecommunity
- neighborhood or villagetown
- town or citycounty
- administrative area more general than townprovince
- state or province (usually abbreviated)country
- country (short form but not abbreviated)
License
ISC © Damian Krzeminski
1.1.5
3 months ago
1.1.4
3 months ago
1.1.3
3 months ago
1.1.1
2 years ago
1.1.2
2 years ago
1.1.0
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.2.6
6 years ago
0.2.5
6 years ago
0.2.4
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.0
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago
0.0.0
6 years ago