[ Whereis® API Home ] [ JSON API Home ] [ Services ] [ Map Services ]

Use this service to obtain a static map when you know the area you want to include. Returns a map in one of three formats (see Map Services), based on the requested bounds.

The map by bounds service calculates centre point and zoom level as a best-fit to accommodate the request.

URL

HTTP Post to <ENDPOINT>service/map/by_bounds

Request format

{
"height":<int>,    
"width":<int>,        
"layers": ["STREET", "PHOTO", "HYBRID"],        
"bounds":<bounds>,
"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

<bounds>

Y

The map will be centred on the midpoint of the requested bounds. It will be at the maximum zoom that can contain the specified bounds, given the map height and width.

<mapData>

N

A list of <mapData> arrays, which may include markers, routes, and other geometry. The map will include all <mapData> that falls within the specified bounds.

Sample request

{
"height":400,
"width":600,
"layers":["HYBRID"],
"bounds":{
   "top":-37.813389,
   "left":138.601685,
   "bottom":-34.928605, 
   "right":144.962832
   }
}

Sample response (returned as JSON with URL)

{
    "viewPort": {
    "bounds": {
    "left": 135.190462,
    "top": -32.767192,
    "right": 148.374055,
    "bottom": -39.840817
    },
    "centre": {
    "lon": 141.782258,
    "lat": -36.304005
    },
    "resolution": 2445.9849047851562,
    "x_distance": 1231052.585742,
    "y_distance": 786021.239415,
    "zoom": 4
    },
    "url": "http://ems-devx-web-vip.in.sensis.com.au/v2/service/map/337150906" 
}

NOTES

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

Icon

This request uses the following objects: