Sign inSign up

calbertts/geocode-service

By calbertts

Updated about 9 years ago

https://github.com/calbertts/geocode-service

Image
0

436

calbertts/geocode-service repository overview

Geocode Service

Geocode service with Google Maps and PhantomJS

This is a very small service to transform an address text into a valid spatial representation. Due to the limitations of using Google Maps API from server side, this service mocks a client with PhantomJS.

How to run it:

docker run -it -d -p 80:80 calbertts/geocode-service

Usage:

Example:

Result:

{
  "bounds":{
    "south":40.3120639,
    "west":-3.834161799999947,
    "north":40.5638447,
    "east":-3.52491150000003
  },
  "location":{
    "lat":40.4167754,
    "lng":-3.7037901999999576
  },
  "location_type":"APPROXIMATE",
  "viewport":{
    "south":40.3120639,
    "west":-3.834161799999947,
    "north":40.5638447,
    "east":-3.52491150000003
  }
}

Error codes:

// With an empty address
{
  "error":"INVALID_REQUEST"
}

// With a non-sense address
{
  "error":"ZERO_RESULTS"
}

Tag summary

Content type

Image

Digest

Size

276.1 MB

Last updated

about 9 years ago

docker pull calbertts/geocode-service