https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/beta/generate-map/arcgis/navigation/centered-atReturns an image of a static map in the ArcGIS Navigation style.
The returned map image is centered at a given WGS84 position, as
defined using the lon and lat parameters. The map scale is
controlled using the zoomLevel parameter. The size of the map image
(in pixels) is defined using the mapImageWidth and mapImageHeight
parameters.
The text "Powered by ESRI" is positioned at the bottom-right of the map image. A data attribution string must also be displayed near the map image or by using an application popup or menu. For more information see Esri and Data Attribution.
Data providers:
Esri, TomTom, Garmin, FAO, NOAA, USGS, © OpenStreetMap contributors and the GIS User Community.
Query parameters
| Name | Type | Required | Default value | Description |
|---|---|---|---|---|
lon | number | | The longitude of the specified point within the WGS84 coordinate system. The longitude can be in the range of | |
lat | number | | The latitude of the specified point within the WGS84 coordinate system. The latitude can be in the range of | |
zoomLevel | number | 15 | The level of detail or zoom level for a map. | |
markerSymbol | string | | The map marker symbol that will be placed on the static map. This value can be a simple map marker symbol (see SimpleMarkerSymbol) ( | |
mapImageFormat | string | webp | Returns the image in the specified format. | |
mapImageWidth | integer | 200 | The width of the requested map image in pixels at 96 DPI between 64 and 1024 pixels. | |
mapImageHeight | integer | 200 | The height of the requested map image in pixels at 96 DPI between 64 and 1024 pixels. | |
markerSymbolScale | number(float) | 1 | The scale of the overlaying map marker symbol as a multiplier of the symbol's dimensions. | |
markerSymbolOffsetX | integer(int32) | 0 | The X offset of the map marker symbol in pixels from the center of the generated map image. | |
markerSymbolOffsetY | integer(int32) | 0 | The Y offset of the map marker symbol in pixels from the center of the generated map image. | |
token | string | | The authentication token, used to access the static maps service. |
lon
The longitude of the specified point within the WGS84 coordinate system. The longitude can be in the range of -179.99 to 179.99, representing the East/West or X-Axis.
- Minimum
- -179.99
- Maximum
- 179.99
lat
The latitude of the specified point within the WGS84 coordinate system. The latitude can be in the range of -85.05 to 85.05, representing the North/South or Y-Axis.
- Minimum
- -85.05
- Maximum
- 85.05
zoomLevel
The level of detail or zoom level for a map.
Supplying a level of 5 returns the smallest scale of the static map
(the Country scale) and a level of 23 returns the largest scale (the
House scale).
The table below shows the scale of each level:
| level | scale | usage |
|---|---|---|
| 5 | 1:9244648.868618 | Countries |
| 6 | 1:4622324.434309 | States / Provinces |
| 7 | 1:2311162.217155 | Counties |
| 8 | 1:1155581.108577 | Counties |
| 9 | 1:577790.554289 | County |
| 10 | 1:288895.277144 | Metropolitan Area |
| 11 | 1:144447.638572 | Cities |
| 12 | 1:72223.819286 | City |
| 13 | 1:36111.909643 | Town |
| 14 | 1:18055.954822 | Neighborhood |
| 15 | 1:9027.977411 | Streets |
| 16 | 1:4513.9887055 | City block |
| 17 | 1:2256.9943525 | Buildings |
| 18 | 1:1128.4971765 | Building |
| 19 | 1:564.248588 | Houses |
| 20 | 1:282.124294 | Houses |
| 21 | 1:141.062147 | Houses |
| 22 | 1:70.5310735 | House Property |
| 23 | 1:35.2655368 | House Property |
For more information on levels of detail see the Zoom levels and scale topic.
- Default
- 15
Enumerated values
markerSymbol
The map marker symbol that will be placed on the static map. This value can be a simple map marker symbol (see SimpleMarkerSymbol) (pin, X, cross, square, circle, triangle) or the data URL encoding of a base64 encoded SVG symbol.
You can create your own SVG symbol or obtain an SVG point symbol from a Github repository such as the Calcite point symbols. To see the full range of SVG point symbols in this repository see Calcite Design System.
Once you have an SVG file, read the file and obtain the its XML string. Next, convert the SVG XML string into a URL safe string as follows:
- Convert the SVG XML string into a base64-encoded string.
- Append the base64-encoded string to the data url prefix
data:/svg+xml;base64,. - URL encode the prefixed string.
- Set the
markerSymbolparameter to the url safe string.
As a Javascript example:
function encodeSVG(svgXMLString) {
const base64EncodedString = btoa(svgXMLString);
const dataURLAppended = "data:/svg+xml;base64," + base64Encoded;
const urlSafeString = encodeURIComponent(dataURLAppended);
return urlSafeString;
}
Enumerated values
mapImageFormat
Returns the image in the specified format.
- Default
- webp
Enumerated values
mapImageWidth
The width of the requested map image in pixels at 96 DPI between 64 and 1024 pixels.
- Minimum
- 64
- Maximum
- 1024
- Default
- 200
mapImageHeight
The height of the requested map image in pixels at 96 DPI between 64 and 1024 pixels.
- Minimum
- 64
- Maximum
- 1024
- Default
- 200
markerSymbolScale
The scale of the overlaying map marker symbol as a multiplier of the symbol's dimensions.
This value increments by 0.1.
A scale value less than 1.0 indicates that the symbol is scaled down, while a value greater than 1.0 indicates that the symbol is scaled up.
For example:
- A scale of 0.5 will reduce the symbol's dimensions to half its original size.
- A scale of 2.0 will double the symbol's dimensions.
- Minimum
- 0.1
- Maximum
- 2
- Default
- 1
markerSymbolOffsetX
The X offset of the map marker symbol in pixels from the center of the generated map image.
- Minimum
- -512
- Maximum
- 512
- Default
- 0
markerSymbolOffsetY
The Y offset of the map marker symbol in pixels from the center of the generated map image.
- Minimum
- -512
- Maximum
- 512
- Default
- 0
token
The authentication token, used to access the static maps service.
The token parameter can be either an API Key or short-lived token.
This parameter is required unless you supply an access token in the request header with one of the following keys using the "Bearer" scheme:
Authorization: Bearer <YOUR_TOKEN>X-Esri-Authorization: Bearer <YOUR_TOKEN>
The provided token must be created from an ArcGIS Location Platform
account and have the necessary premium:user:staticMaps privilege to
use the static maps service.
Developer guide: To learn more, go to Security and authentication.
Response status
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Static map in a desired image format. | string(binary) |
| 400 | Bad Request | Invalid query parameters / Incorrect portal item type / Data URL parse failure. | Error |
| 401 | Unauthorized | Authentication Error. The API key or token is missing, invalid or expired. | Error |
| 403 | Forbidden | The requested resource cannot be accessed because of incorrect sharing permissions. | Error |
| 404 | Not Found | The requested resource cannot be found - this could be due to missing map data at the requested location and zoom level. | Error |
| 5XX | Server Error | An error occurred on the server. | Error |
Examples
Request
# You can also use wget
curl -X GET https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/beta/generate-map/arcgis/navigation/centered-at?lon=-179.99&lat=-85.05&token=YOUR_TOKEN