https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/beta/static-maps/arcgis/{arcgis-style}/with-polylineReturns a static map that displays an ArcGIS Basemap style and a polyline as defined by the polyline parameter.
The geographical extent of the static map is defined by the extent of
the polyline and a padding width. The start and end of the polyline can be
highlighted using startSymbolStyle and endSymbolStyle parameters,
respectively. The static map image width and height can be defined,
along with the image format, which can be png, jpeg, or webp.
Choose this option if you want to:
- display a polyline with up to 10 vertices.
- symbolize the start and end of the line using a simple symbol.
Choose the POST option if you want to:
- display a polyline with up to 5000 vertices.
- display a polyline that has multiple paths.
- symbolize the start and end points with simple or custom symbols.
Please note that the ArcGIS Basemap style attribution statement must be
displayed every time the static map is visible. It must be positioned
very close to the static map, or it can be provided via a popup or menu
if the static map is embedded in an application or website. The relevant
attribution statement for an ArcGIS Basemap style is available from the
/static-maps/arcgis/{arcgis-style}/attribution endpoint. For more
information see the ArcGIS Location Platform Agreement on the
Terms of use.
Query parameters
| Name | Type | Required | Default value | Description |
|---|---|---|---|---|
polyline | PathGeometryGet | | A polyline consists of a paths array, where each path is an array of x,y coordinate pairs (longitude, latitude) in the WGS 84 spatial reference. | |
endSymbolLabel | SymbolLabel | | The label to be displayed on the simple symbol at the end of a polyline. | |
endSymbolColor | string | 007 | The color of the end marker symbol in hexadecimal format. | |
endSymbolStyle | SymbolStyle | none | The marker symbol that will be placed at the end of the last polyline part. | |
lineColor | HexColor | 007 | The color of the line symbol in hexadecimal format. | |
lineStyle | LineStyle | solid | The style, or stroke, of the line symbol. | |
lineWidth | integer | 2 | The width of the line in device-independent pixels. | |
imageFormat | ImageFormat | webp | The format in which the map image is returned. Supported formats include png, jpeg, and webp. | |
imageHeight | ImageDimension | 200 | The height of the requested map image in pixels at 96 DPI between 64 and 1024 pixels. | |
imageWidth | ImageDimension | 200 | The width of the requested map image in pixels at 96 DPI between 64 and 1024 pixels. | |
imagePadding | Padding | 10 | The padding applied to the static map adds extra map content between the static map's extent and the edge of the image. | |
startSymbolLabel | SymbolLabel | | The label to be displayed on the simple symbol at the start of a polyline. | |
startSymbolColor | string | 007 | The color of the start marker symbol in hexadecimal format. | |
startSymbolStyle | SymbolStyle | none | The marker symbol that will be placed at the start of the first polyline part. | |
symbolScale | SymbolScale | 1 | The scale of the marker symbol as a multiplier of the symbol's dimensions. | |
token | string | | The authentication token, used to access the static maps service. | |
mapCenterX | number(double) | | The x-coordinate, or longitude value, of the map center expressed in WGS84 decimal degrees. | |
mapCenterY | number(double) | | The y-coordinate, or latitude value, of the map center expressed in WGS84 decimal degrees. | |
mapZoom | ZoomLevel | | Specifies the map zoom level, which controls the level of detail (LOD) displayed. | |
mapRadius | RadiusDistance | | The radius, in meters, that defines the minimum geographic area shown around the specified point on the static map. |
polyline
A polyline consists of a paths array, where each path is an array of x,y coordinate pairs (longitude, latitude) in the WGS 84 spatial reference.
The first coordinate pair in the array represents the start of the polyline, while the last coordinate pair represents the end.
The array can contain from 2 to 10 coordinate pairs.
endSymbolLabel
The label to be displayed on the simple symbol at the end of a polyline.
The label can be a maximum of two letters or numbers from a-z, A-Z, or 0-9.
- Minimum length
- 1
- Maximum length
- 2
endSymbolColor
The color of the end marker symbol in hexadecimal format.
It has the format RRGGBB or RRGGBBAA.
RRis the red valueGGis the green valueBBis the blue valueAAis the alpha value.00is fully transparent andFFis a solid fill.
For example, a semi-transparent red color is represented as FF000080.
The default color is a medium-dark shade of blue (007AC2).
- Minimum length
- 6
- Maximum length
- 8
- Default
- 007AC2
endSymbolStyle
The marker symbol that will be placed at the end of the last polyline part.
It highlights the end of the polyline or path.
This value can be pin, circle, none or not set.
- Default
- none
Enumerated values
lineColor
The color of the line symbol in hexadecimal format.
A hexadecimal color code takes the form RRGGBB or RRGGBBAA.
RRis the red valueGGis the green valueBBis the blue valueAAis the alpha value.00is fully transparent andFFis a solid fill.
- Minimum length
- 6
- Maximum length
- 8
- Default
- 007AC2
lineStyle
The style, or stroke, of the line symbol.
The default line style is solid.
- Default
- solid
Enumerated values
lineWidth
The width of the line in device-independent pixels.
The minimum width is 1 and the maximum width is 16.
- Minimum
- 1
- Maximum
- 16
- Default
- 2
imageFormat
The format in which the map image is returned. Supported formats include png, jpeg, and webp.
- Default
- webp
Enumerated values
imageHeight
The height of the requested map image in pixels at 96 DPI between 64 and 1024 pixels.
- Minimum
- 64
- Maximum
- 1024
- Default
- 200
imageWidth
The width of the requested map image in pixels at 96 DPI between 64 and 1024 pixels.
- Minimum
- 64
- Maximum
- 1024
- Default
- 200
imagePadding
The padding applied to the static map adds extra map content between the static map's extent and the edge of the image.
Padding value is a % of the static map image's width and/or height. It is applied to the static map image, according to the table below:
| Number of values in the array | Description | Example |
|---|---|---|
| One | The same padding % is applied to all four sides. | [10] |
| Two | The first value applies padding to the top and bottom, the second to the left and right sides. | [10, 5 ] |
| Three | The first value applies padding to the top, the second to the left and right sides, and the third to the bottom. | [10, 20, 10] |
| Four | The four values apply padding to the top, right, bottom, and left in a clockwise order. | [10, 5, 5, 20] |
If padding is not specified, a value of 10% is applied to all sides. The maximum allowed padding value is 25%
- Default
- [10]
startSymbolLabel
The label to be displayed on the simple symbol at the start of a polyline.
The label can be a maximum of two letters or numbers from a-z, A-Z, or 0-9.
- Minimum length
- 1
- Maximum length
- 2
startSymbolColor
The color of the start marker symbol in hexadecimal format.
It has the format RRGGBB or RRGGBBAA.
RRis the red valueGGis the green valueBBis the blue valueAAis the alpha value.00is fully transparent andFFis a solid fill.
For example, a semi-transparent red color is represented as FF000080.
The default color is a medium-dark shade of blue (007AC2).
- Minimum length
- 6
- Maximum length
- 8
- Default
- 007AC2
startSymbolStyle
The marker symbol that will be placed at the start of the first polyline part.
It highlights the beginning of the polyline or path.
This value can be pin, circle, none or not set.
- Default
- none
Enumerated values
symbolScale
The scale of the marker symbol as a multiplier of the symbol's dimensions.
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.
The minimum scale is 0.1 and the maximum scale is 4.0.
- Minimum
- 0.1
- Maximum
- 4
- Default
- 1
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 portal:user:allowBetaAccess privilege to use the static maps service.
Developer guide: To learn more, go to Security and authentication.
mapCenterX
The x-coordinate, or longitude value, of the map center expressed in WGS84 decimal degrees.
The value can be in the range of -179.99 to 179.99, representing the East/West or X-Axis.
Setting this value will override the map extent which may result in you graphics not being visible in the map.
- Minimum
- -179.9
- Maximum
- 179.9
mapCenterY
The y-coordinate, or latitude value, of the map center expressed in WGS84 decimal degrees.
The value can be in the range of -85.05 to 85.05, representing the North/South or Y-Axis.
Setting this value will override the extent of the map, which may result in your graphics not being displayed.
- Minimum
- -85.05
- Maximum
- 85.05
mapZoom
Specifies the map zoom level, which controls the level of detail (LOD) displayed.
Higher values show more detail over a smaller geographic extent, while lower values show larger areas with less detail.
This parameter is typically used to control map rendering scale, tile selection, and feature visibility.
This parameter is typically used to control map rendering scale, tile selection, and feature visibility.
Note: mapZoom and mapRadius are mutually exclusive. Please only choose one or the other.
- Minimum
- 0
- Maximum
- 22
mapRadius
The radius, in meters, that defines the minimum geographic area shown around the specified point on the static map.
Note: mapZoom and mapRadius are mutually exclusive.
Please only choose one or the other.
The mapRadius value is used to define the real world radius of the area
displayed in the map image. The area covered by the radius will always
be displayed on the static map image.
If the image width and height are equal, the static map image will be square and the geographic extent displayed by the static map image will match that defined by the radius. However, if the image width is greater than the height, the geographic extent displayed by the static map image will be wider than that defined by the radius.
As a guide, the following radius values can be used for the following types of static maps.
| Radius (meters) | Approximate extent (diameter) | Typical map usage | Zoom |
|---|---|---|---|
| 10 | ~20 m | Building / site | 22–23 |
| 100 | ~200 m | Street / block | 18–19 |
| 1,000 | ~2 km | Neighborhood / district | 15–16 |
| 10,000 | ~20 km | City | 12–13 |
| 100,000 | ~200 km | Metro / region | 9–10 |
| 1,000,000 | ~2,000 km | State / large region | 6–7 |
The mapRadius has a minimum value of 10 meters and a maximum value of
20,000,000 meters.
- Minimum
- 10
- Maximum
- 20000000
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
arcgis-style | string | The name of a style from the ArcGIS Basemap style family. |
arcgis-style
The name of a style from the ArcGIS Basemap style family.
| Group | Style | Example | Description | Data attribution |
|---|---|---|---|---|
| Streets | navigation | A custom navigation style designed for use during daylight hours | Esri, TomTom, Garmin, FAO, NOAA, USGS, © OpenStreetMap contributors, and the GIS User Community | |
| Streets | navigation-night | A custom navigation style designed for use in hours of darkness | Esri, TomTom, Garmin, FAO, NOAA, USGS, © OpenStreetMap contributors, and the GIS User Community | |
| Streets | streets | A classic Esri street map style designed for use during daylight hours | Esri, TomTom, Garmin, FAO, NOAA, USGS, © OpenStreetMap contributors, and the GIS User Community | |
| Streets | streets-night | A classic Esri street map style designed for use in hours of darkness | Esri, TomTom, Garmin, FAO, NOAA, USGS, © OpenStreetMap contributors, and the GIS User Community | |
| Satellite | imagery | Low-resolution satellite imagery for the world and high-resolution satellite and aerial imagery, typically within 3-5 years of currency, for most of the world. | Esri, Vantor, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, © OpenStreetMap contributors, TomTom, Garmin, FAO, NOAA, and the GIS User Community |
Enumerated values
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/static-maps/arcgis/streets/with-polyline?polyline=-117.247325%2C34.100934%2C-117.247506%2C34.104433%2C-117.247962%2C34.105095&token=YOUR_TOKEN'