@planet/places
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "@planet/places", | ||
"version": "0.1.0", | ||
"bin": { | ||
"explode": "bin/explode" | ||
}, | ||
"version": "0.2.0", | ||
"main": "lib/index.js", | ||
@@ -8,0 +5,0 @@ "scripts": { |
@@ -1,7 +0,17 @@ | ||
Fetch the data and prepare it: | ||
# Planet Places | ||
make exploded | ||
Install with `npm`: | ||
Create `lib/lookup.json`: | ||
npm install @planet/places | ||
make lookup | ||
## `places.match(query)` | ||
Get a list of places that match the given query string. Returns a list of objects sorted by quality. Each place has an `id` and `name` property. For states and regions, the `admin` property gives the country name. | ||
## `places.wikidata(wikidataId)` | ||
Get a place given a [Wikidata](https://www.wikidata.org/) identifier. | ||
## `places.fetch(id)` | ||
Fetch a GeoJSON feature representing the place. Returns a promise that resolves to feature. The `id` should come from a place result returned from the `places.match()` or `places.wikidata()` functions. |
332756
18