databc-geocoder

0.2.1 • Public • Published

B.C. Physical Address Geocoder Node Client

This is a simple client for Data BC's geocoding service. It's an unofficial client and not endorsed by the government of British Columbia.

Installation

In your ternminal:

yarn add databc-geocoder
# OR
npm install --save databc-geocoder

Usage

See ./src/index.test.mjs for for examples.

const geocoder = new Geocoder({
  accessToken: 'YOUR-API-KEY',
  outputFormat: 'json' // optional, json is default
})

geocoder.addresses({
  addressString: '1917 Ferndale',
  bbox: '-123.308527, 49.004921, -122.081220, 49.394692'
})
.then((data) => {
  // do what you like with the data. Returns JSON by default.
})

API

Below is a list of supported functions. See the parameters through the interactive console or JSON spec

client.addresses

client.addresses.nearest

client.addresses.near

client.addresses.within

client.intersections.nearest

client.intersections.near

client.intersections.within

client.occupants.nearest

client.occupants.near

client.occupants.within

TODO

Needs support for:

/sites/{siteID}.{outputFormat} /intersections/{intersectionID}.{outputFormat} /occupants/{occupantID}.{outputFormat} /parcels/pids/{siteID}.{outputFormat}

Dependencies (1)

Dev Dependencies (7)

Package Sidebar

Install

npm i databc-geocoder

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

59.4 kB

Total Files

7

Last publish

Collaborators

  • noah-kun