Mapserver rewrite
From Navit's Wiki
WIP |
This feature does not exist in the current Mapserver |
APIs[edit]
Old API (v1)[edit]
Example:
/api/map/?bbox=-180,-90,180,90&split=1048576000&part=0
New API (v2)[edit]
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/areas/:responseformat | Defaults to json output of all areas | /api/v2/areas/json |
/api/v2/download/bbox/:xmin/:xmax/:ymin/:ymax | ||
/api/v2/download/bbox/:xmin/:xmax/:ymin/:ymax/:format | ||
/api/v2/download/area/id/:id/ | ||
/api/v2/download/area/id/:id/:format | ||
/api/v2/download/area/name/:areaname | ||
/api/v2/download/area/name/:areaname/:format | ||
/api/v2/filesize/bbox/:xmin/:xmax/:ymin/:ymax/ | /api/v2/filesize/bbox/-180/180/-90/90/ | |
/api/v2/filesize/bbox/:xmin/:xmax/:ymin/:ymax/:format | /api/v2/filesize/bbox/-180/180/-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/filesize/area/name/:areaname/: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 |