https://github.com/simagix/google-map-api
RESTful API server to look up address by given coordinates
https://github.com/simagix/google-map-api
Last synced: about 1 year ago
JSON representation
RESTful API server to look up address by given coordinates
- Host: GitHub
- URL: https://github.com/simagix/google-map-api
- Owner: simagix
- Created: 2017-01-27T14:47:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T19:40:00.000Z (over 9 years ago)
- Last Synced: 2025-02-15T15:49:30.731Z (over 1 year ago)
- Language: Java
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# google-map-api
RESTful API server to look up address by given coordinates
### Description
### API
```
GET /geocode
URL Params:
Required:
latlng=string coordinates
key=string Google API Key
Response:
Code 200
Code 400 InvalidInputException
Code 500 INTERNAL_SERVER_ERROR
GET /geocode/history
Response:
Code 200
Code 500 INTERNAL_SERVER_ERROR
```
### Demo
##### Checkout the repo
```
$ git clone https://github.com/simagix/google-map-api.git
```
##### Run the app
```
$ cd google-map-api
$ ./gradlew bootRun
```
##### Give it a spin
```
$ curl -XGET -v http://localhost:8080/geocode?latlng=33.969601,-84.100033\&key=
$ curl -XGET -v http://localhost:8080/geocode?latlng=33.979601,-84.100033\&key=
$ curl -XGET -v http://localhost:8080/geocode?latlng=33.989601,-84.100033\&key=
```
##### Print cached history
```
$ curl -XGET -v http://localhost:8080/geocode/history
```
##### Exceptions
```
$ curl -XGET -v http://localhost:8080/geocode?latlng=133.969601,-84.100033\&key=
```
##### Docker
```
$ docker run -d -p 8080:8080 simagix/google-map-api
```