Mapserver rewrite

APIs

Old API (v1)

Example:

/api/map/?bbox=-180,-90,180,90&split=1048576000&part=0

New API (v2)

The new API is a HTTP-GET API (you can probably call it RESTfull)

All URLs which are supported:

URL

Description

Example

/api/v2/areas

Defaults to json output of all areas

/api/v2/a reas/:responseformat

Defaults to json output of all areas

/api/v2/areas/json

|

/api/ v2/download/bbox/:xm in/:xmax/:ymin/:ymax

/api/v2/downl oad/bbox/:xmin/:xmax /:ymin/:ymax/:format

/api/v2/d ownload/area/id/:id/

/api/v2/download /area/id/:id/:format

/api/v2/download /area/name/:areaname

/api /v2/download/area/na me/:areaname/:format

|

/api/v 2/filesize/bbox/:xmi n/:xmax/:ymin/:ymax/

/api/v2/filesize/b box/-180/180/-90/90/

/api/v2/files ize/bbox/:xmin/:xmax /:ymin/:ymax/:format

/api/v2/ filesize/bbox/-180/1 80/-90/90/planet.bin

/api/v2/filesize /area/name/:areaname

Outputs the filesize of the downloadable area given by its area name. Defaults to json

/api/v2/file size/area/name/:area name/:responseformat

Outputs the filesize of the downloadable area given by its area name in the supplied response format

/api/v2/ filesize/area/id/:id

Outputs the filesize of the downloadable area given by its id. Defaults to json

/api /v2/filesize/area/id /:id/:responseformat

Outputs the filesize of the downloadable area given by its id in the supplied response format

Parameter:

Parameter

Value

:responseformat

json | xml

:format

bin | bin2 | a UTF-8 filename ending with “.bin|.bin2”

:areaname

The name of an area from the area list (names should be static but can change so if a name does not work anymore look into the area list -> /api/v2/areas)

:id

The ID of an area from the area list. IDs will change on every map update so make sure to look them up before you download a map in order to get the newest available map.

:xmin | :xmax

Any value between -180 and 180

:ymin | :ymax

Any value between -90 and 90