@unmap/geocoding 0.10.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,17 +18,27 @@ await geocoder.search('Château Frontenac', { lang: 'fr', limit: 5 })
18
18
  await geocoder.autocomplete('rue sainte-cath', { lang: 'fr' })
19
19
  await geocoder.nearby('pharmacy', { near: [-114.07, 51.05], radius: 2000 })
20
20
  await geocoder.reverse(-68.517, 63.749)
21
+ await geocoder.identify({ at: [-114.07, 51.05] })
22
+ await geocoder.queryLayer({ layer: 'energy.wells', bbox: [-114.3, 50.9, -113.8, 51.2] })
21
23
  ```
22
24
 
23
25
  Every method resolves to a `GeocodeResult[]`: `id`, `name`, `layer`, `lng`, `lat`, plus `score`
24
26
  (search and autocomplete), `distance` in metres and `category` (nearby), `names` when the record
25
- carries language-keyed labels, and a structured `address` when one exists.
27
+ carries language-keyed labels, a structured `address` when one exists, and `legal_land` / `bbox`
28
+ on a survey-description hit (`layer: "legal_land"`). Pass `{ geometry: true }` to include the
29
+ polygon when the lookup row has one.
26
30
 
27
31
  `search` and `autocomplete` take `{ limit, lang, bbox, signal }`; `nearby` takes exactly one of
28
32
  `near: [lng, lat]` or `bbox`, plus `{ radius, limit, lang, signal }`; `reverse` takes
29
- `{ lang, signal }`. `category` accepts taxonomy ids (`health.pharmacy`) or plain English or
30
- French words (`pharmacy`, `pharmacie`), one at a time or up to eight as an array. A non-2xx
31
- response throws a `GeocoderError` carrying the HTTP `status`.
33
+ `{ lang, signal }`; `identify` takes `{ at: [lng, lat], layers?, geometry?, signal }` and
34
+ returns `{ at, results }` (default layer `municipalities`; empty until
35
+ `municipalities.copy` is baked into the Land image).
36
+ `queryLayer` takes `{ layer, bbox, limit?, geometry?, signal }` and returns
37
+ `{ layer, bbox, results }` (`GET /data/query`; tile-only catalog ids are a 501).
38
+ The SDK name is `unmap.data.query`.
39
+ `category` accepts taxonomy ids (`health.pharmacy`) or plain English or French words
40
+ (`pharmacy`, `pharmacie`), one at a time or up to eight as an array. A non-2xx response
41
+ throws a `GeocoderError` carrying the HTTP `status`.
32
42
 
33
43
  Parameters, defaults, the category list, and error bodies are documented at
34
44
  [unmap.dev/docs/geocoding-api](https://unmap.dev/docs/geocoding-api).