[ Whereis® API Home ] [ JSON API Home ] [ Services ] [ Map Services ]
Use this service to obtain a static map when you know what markers or other artefacts you need to display. Returns a map in one of three formats (see Map Services), based on <mapData>.
The map service calculates the bounds and zoom level as a best-fit to accommodate the request.
URL
HTTP Post to <ENDPOINT>/service/map
Request format
{
"height":<int>,
"width":<int>,
"layers": ["STREET", "PHOTO", "HYBRID"]
"mapData":[<mapData>]
}
Rules
Parameter | Mandatory? | Description |
height | Y | Image height in pixels. Min = 1, max = 1600 |
width | Y | Image width in pixels. Min = 1, Max = 1600 |
layers | N | Array containing one or more of: "STREET" = conventional map "PHOTO" = aerial view "HYBRID" = semi-transparent layer with street names and labels |
<mapData> | Y | A list of <mapData> arrays, which may include markers, routes, and other geometry |
Examples
Ellipse
Sample request
{
"height":"300",
"width":"400",
"layers": ["STREET"],
"mapData":[{
"type":"ellipse",
"values":
[{"centre":
{"lon":145.159665,"lat":-37.959788},
"radiusX":100,
"radiusY":50
}]
}]
}
Sample response

Polyline
Sample request
{
"layers":["PHOTO","HYBRID"],
"height":"1200",
"width":"1600",
"mapData":[
{"values":[
{"points":[
{"lat":-37.81563,"lon":144.95817},
{"lat":-37.81561,"lon":144.95825},
{"lat":-37.81571,"lon":144.9583},
{"lat":-37.81627,"lon":144.95856},
{"lat":-37.81646,"lon":144.95865},
{"lat":-37.81665,"lon":144.95872},
{"lat":-37.81722,"lon":144.95901},
{"lat":-37.81737,"lon":144.95909},
{"lat":-37.81753,"lon":144.95917}
]}],
"type":"polyline",
"style":{
"fillColour":"#380EB5",
"strokeColour":"#000080",
"strokeWidth":"10",
"fillOpacity":"0.3",
"strokeOpacity":"1.0"}}
]
}
Sample response

Multiple layers may be requested, but if they are opaque only the top layer (the last in the list) will be visible.