Skip to content

Commit

Permalink
Merge pull request #10 from jonataswalker/add-pelias-provider
Browse files Browse the repository at this point in the history
Add Pelias provider
  • Loading branch information
jonataswalker committed Dec 3, 2015
2 parents e021f33 + 75f3a11 commit 8eb6fb3
Show file tree
Hide file tree
Showing 8 changed files with 368 additions and 269 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ You can see [here a demo](http://rawgit.com/jonataswalker/ol3-geocoder/master/ex
## Providers
The plugin supports (for now) the following providers:

* [OSM](http://www.openstreetmap.org/)/[Nominatim](http://wiki.openstreetmap.org/wiki/Nominatim)
* [MapQuest Geocoding API](http://open.mapquestapi.com/nominatim/) - requires KEY.
* [Google Maps Geocoding API](https://developers.google.com/maps/documentation/geocoding/intro) - requires KEY.
* [Photon](http://photon.komoot.de/)
* [OSM](http://www.openstreetmap.org/)/[Nominatim](http://wiki.openstreetmap.org/wiki/Nominatim) — `'osm'`.
* [MapQuest Geocoding API](http://open.mapquestapi.com/nominatim/) - requires KEY — `'mapquest'`.
* [Google Maps Geocoding API](https://developers.google.com/maps/documentation/geocoding/intro) - requires KEY — `'google'`.
* [Photon](http://photon.komoot.de/) — `'photon'`.
* [Mapzen Search/Pelias](https://mapzen.com/projects/search) - requires KEY — `'pelias'`.

## How to use it?
##### CDN Hosted - [jsDelivr](http://www.jsdelivr.com/projects/openlayers.geocoder)
Expand Down Expand Up @@ -60,7 +61,7 @@ geocoder.on('addresschosen', function(evt){
Maybe later we will have other types like `'reverse'`. So for now just pass `'nominatim'`.

###### `options` is an object with the following possible properties:
* `provider` : `'osm'` (default), `'mapquest'`, `'google'`, `'photon'`; Your preferable provider;
* `provider` : `'osm'` (default), `'mapquest'`, `'google'`, `'photon'`, `'pelias'`; Your preferable provider;
* `key` : ''; API Key if required;
* `placeholder` : 'Search for an address'; Placeholder for text input;
* `featureStyle`: `ol.style.Style`; Feature style;
Expand Down
4 changes: 4 additions & 0 deletions build/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"laxbreak": true,
"-W002": true
}
Loading

0 comments on commit 8eb6fb3

Please sign in to comment.