Home

Awesome

phpgeo-demo

Demo of using geo data in PHP web applications

Goals

API

Base URL : {domain} /api/v1/

Authentication

PUT/POST/DELETE requests are required to include a header X-Authorization with it's value set to an API token matching a token found in the api_keys table.

Routes

locations

GET /locations
Params: null
Response

Collection of all of the locations stored in the locations MySQL table.

POST /locations
Params
PUT /locations/{id}
Params
DELETE /locations/{id}
GET /contains
Params:
Response

Collection of all of the locations that contain the point described in the request parameters.

GET /intersects
Params:
Response

Collection of all locations intersected by the geometry described in the request parameter.

GET /within
Params:
Response

Collection of all locations wholly bounded by the geometry described in the request parameter.