0.2.2 • Published 10 years ago

express-geocoding-api v0.2.2

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

express-geocoding-api Build Status

This module sets up express middleware to expose geocoding endpoints for your app using node-geocoder.

Getting Started

Install the module with: npm install express-geocoding-api

var express_geocoding_api = require('express-geocoding-api'),
    app = require('express')();

// See `[node-geocoder](https://github.com/nchaulet/node-geocoder)` documentation for all configuration options
app.use(express_geocoding_api({ 
  geocoder: {
    provider: 'google'
  }
});

This exposes a couple routes to your app.

  • GET /geocode/location?address=<string>
  • GET /geocode/point?latitude=<float>&longitude=<float>

By default, each of these routes returns a JSON object containing locations.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2014 Garrett Murphey
Licensed under the MIT license.