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 displays a polyline, as defined by the paths type.
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 startSymbol and endSymbol parameters,
respectively. The static map image width and height can be defined,
along with the image format, which can be png, jpeg, or webp.
To use a custom SVG symbol, store the base64‑encoded data URL string
representing the SVG image in the customSymbols property. This
property is a dictionary, where the key is a unique string, such as
campground, and the value is a base64‑encoded data URL string
representing the SVG image. To symbolize a specific geometry with a
custom symbol, pass the key to the customSymbolId.
The Post Body content type must be either:
- JSON with content type of
application/json, or - form URL encoded key-value pairs with content type
application/x-www-form-urlencoded.
You must supply an access token in the header for POST endpoints.
Choose this 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.
Choose the GET 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.
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.
Body parameters
Supported content types: application/json, application/x-www-form-urlencoded
| Name | Type | Required | Description |
|---|---|---|---|
graphics | GraphicPolyline | The polyline geometry and polyline style with its associated symbol. The symbol can be a simple marker symbol or a custom marker symbol. | |
image | Image | Define the width, height and format of the requested static map image. | |
map | Map | Represents the visible extent of the map. |
graphics
The polyline geometry and polyline style with its associated symbol. The symbol can be a simple marker symbol or a custom marker symbol.
map
Represents the visible extent of the map.
This object specifies:
radius: The distance from the center point that determines the coverage area.
zoom: The map zoom level controlling the scale and detail of the map.
center: The geographic coordinates (latitude and longitude) of the focal point for the map.
Note: zoom and radius are mutually exclusive.
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 POST 'https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/beta/static-maps/arcgis/streets/with-polyline' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
--data '{"graphics":{"customSymbols":{"parkEntrance":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMSAyMSI+PHBhdGggZD0iTTE4IDkuOTk4di0xbC03LjUtNi03LjUgNnYxaDF2NkgzdjFoMTV2LTFoLTF2LTZoMXptLTEyIDBoM3YzSDZ2LTN6bTYgNnYtNmgzdjZoLTN6Ii8+PC9zdmc+","campground":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMSAyMSI+PHBhdGggZD0iTTEyLjQwMiAxNi45NzZIMTlMMTAuNTAzIDIuOTk4IDIgMTYuOTc2aDYuNjI2bDEuODg4LTguOTR6Ii8+PC9zdmc+"},"polyline":{"paths":[[[-117.247325,34.100934],[-117.247506,34.104433],[-117.247962,34.105095]],[[-117.247962,34.105095],[-117.244321,34.106745],[-117.209646,34.106204],[-117.208757,34.105251]]],"spatialReference":{"wkid":4326}},"polylineStyle":{"startSymbol":{"customSymbolId":"campground","scale":1,"offsetX":0,"offsetY":0},"endSymbol":{"customSymbolId":"campground","scale":1,"offsetX":0,"offsetY":0},"lineSymbol":{"style":"solid","color":"007AC2","width":2}}},"image":{"width":500,"height":500,"format":"png","padding":[10,0,10,20]},"map":{"radius":1000,"zoom":12,"center":{"x":-117.1957,"y":34.0561,"spatialReference":{"wkid":4326}}}}'