Static Maps

Static Maps

Static maps are standalone images which may be displayed on web, mobile and other visual displays without the need of a special mapping library. A static map image allows for a combination of base maps, weather and other overlays to generate a single image. This static map looks like an embedded map though without any panning or zooming support. Static maps can be requested by passing a center point and zoom level or using a bounding box.

Map via Center Point

The most common method for generating a map is to center the map on a single location at a specific zoom level:

https://maps.api.xweather.com/[client_id]_[client_secret]/[layers]/[width]x[height]/[place],[zoom]/[offset].[format]

The following variables are required for each static map request:

OptionDescriptionDefault
client_idType: string (required)Unique client ID associated with your API account.
client_secretType: string (required)Unique client secret key associated with one of your API account applications/consumers.
layersType: string (required)One or more overlays to add to the map. Multiple overlays may be comma separated and will be added to the map. The layer will be combined in order, from left to right. Refer to the Layer Usage details and the Layer Types for a list of supported codes.
widthType: string (required)The width of the map image in pixels.
heightType: string (required)The height of the map image in pixels.
placeType: string (required)The location to center the map on. This maybe a latitude,longitude combination, us zip code, Canadian postal code, "City,State" combination or any Supported Places (opens in a new tab) format supported by the Xweather Weather API. Please note, any Canadian or US location will require the city,province format.
zoomType: integer (required)The zoom level of the map. Must be between the minzoom and maxzoom supported by the base map and overlays. Values between 2 and 19 are normally supported. If no provided, a default value of 6 is utilized.
offsetType: integer or string (required)The time offset for the image. Refer to the Time Offsets details for more information.
formatType: string (required)The format of the image to return. See Image Quality.

Examples:

https://maps.api.xweather.com/[client_id]_[client_secret]/radar/300x300/44.96,-93.27,7/current.png
https://maps.api.xweather.com/[client_id]_[client_secret]/flat,radar,admin/300x300/55415,7/current.png
https://maps.api.xweather.com/[client_id]_[client_secret]/sat,radar:75/300x300/minneapolis,mn,7/current.jpg

Map via Bounding Box

You can also request static maps by defining a bounding box of the region you want display. In this case, the map's center coordinate and zoom level will determined automatically so that your requested region appears within the map's bounds. Note that some scaling of the image may occur to produce a map with the exact dimensions requested.

https://maps.api.xweather.com/[client_id]_[client_secret]/[layers]/[width]x[height]/[south],[west],[north],[east]/[offset].[format]

The following variables are required for each static map request:

OptionDescriptionDefault
client_idType: string (required)Unique client ID associated with your API account.
client_secretType: string (required)Unique client secret key associated with one of your API account applications/consumers.
layersType: string (required)One or more overlays to add to the map. Multiple overlays may be comma separated and will be added to the map. The layer will be combined in order, from left to right. Refer to the Layer Usage details and the Layer Types for a list of supported codes.
widthType: string (required)The width of the map image in pixels.
heightType: string (required)The height of the map image in pixels.
southType: integer (required)The southern most (bottom) latitude coordinate of the bounding box, in degrees.
westType: integer (required)The western most (left) longitude coordinate of the bounding box, in degrees.
northType: integer (required)The northern most (top) latitude coordinate of the bounding box, in degrees.
eastType: integer (required)The eastern most (right) longitude coordinate of the bounding box, in degrees.
offsetType: integer or string (required)The time offset for the image. Refer to the Time Offsets details for more information.
formatType: string (required)The format of the image to return. See Image Quality.

Examples:

https://maps.api.xweather.com/[client_id]_[client_secret]/radar/320x320/30.1010,-85.9578,33.0948,-82.4421/current.png
https://maps.api.xweather.com/[client_id]_[client_secret]/flat,radar,admin/320x320/30.1010,-85.9578,33.0948,-82.4421/current.png
https://maps.api.xweather.com/[client_id]_[client_secret]/sat,radar:75/320x320/30.1010,-85.9578,33.0948,-82.4421/current.jpg

Size Limits

With any of our paid Maps subscriptions, you can request any map size up to 5000x5000. Please note, if you're using the free developer trial (opens in a new tab), the current limit is 2000x2000.