Build a URL to create a static map with multiple points.

To display multiple points on a static map, use the /with-many-points endpoint from the ArcGIS Static Maps service. Provide an array of up to 10 x,y coordinate pairs in the points parameter. All points use the same pin, square, or circle marker style. You can also specify the image width and height in pixels, along with the output format (png, jpeg, or webp).

How to display a static map with multiple points

The typical workflow to display a static map with multiple points is:

  1. Map: Define the basemapStyle and map area with centerX andcenterY, and zoom or radius.
  2. Geometry: Define the points array containing the point coordinates and symbolStyle for the symbol style.
  3. Image: Specify the image height and width in pixels, format, and attribution style.
  4. Request: Send a GET request to the /with-many-points endpoint to generate the static map.

Service URL

Use dark colors for code blocksCopy
1
https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/v1/static-maps

Path parameters

These are required parameters to specify the style to access.

Use dark colors for code blocksCopy
1
https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/v1/static-maps/{basemapStyle}/with-many-points
NameDescriptionExample
{version}Required: The API version.v1
{basemapStyle}Required: The basemap style for the static map.arcgis/navigation, arcgis/navigation-night, arcgis/imagery, arcgis/streets-night, or arcgis/streets

Query parameters

NameTypeRequiredDefault valueDescription
tokenstring

An access token with the static maps service privilege. To pass the token as an authorization header, see HTTP authorization headers.

pointsManyPointsGet

An array of x,y coordinate pairs in the WGS84 spatial reference. X values range from -179.99 to 179.99 and Y values range from -85.05 to 85.05. Accepts up to 10 coordinate pairs.

labelOptionstringnone

Type of label displayed on point symbols, such as letters or numbers. Supported values include none, letter, and number.

formatImageFormatwebp

Output image format of the map. Supported formats include png, jpeg, and webp.

heightImageDimensionHeight400

Height of the map image in pixels. Values must be between 128 and 1024.

widthImageDimensionWidth400

Width of the map image in pixels. Values must be between 128 and 1024.

paddingImagePadding10

Padding percentages around the map extent. Accepts an array of 1–4 values; default is 10 on all sides, maximum is 25.

symbolColorHexColor007AC2

Point symbol color in hexadecimal format with an optional alpha value.

symbolScaleSymbolScale1

Scale factor applied to the point symbol size. Values range from 0.1 to 4.0.

symbolStyleSymbolStylepin

Style applied to the point symbol. Supported values include pin, circle, square, and none.

centerXnumber(double)

X-coordinate of the map center in WGS84 decimal degrees. Values range from -179.99 to 179.99.

centerYnumber(double)

Y-coordinate of the map center in WGS84 decimal degrees. Values range from -85.05 to 85.05.

zoomZoomLevel

A number that defines the level of detail of the map. Values range from 0 to 22.

radiusRadiusDistance

A number (in meters) that defines the minimum geographic area around a center point of the map. If no center point is supplied, the radius is applied to the geometry. Values range from 10 to 20,000,000.

attributionstringauto

Attribution footer style. To learn more about attribution requirements for static maps, see Esri and data attribution.

referenceDetailsstringall

A basemap option that controls the visibility of labels and feature symbology. This parameter is currently supported only for the arcgis/imagery style. Supported values include all and none.

Code examples

Display a map with default symbols

Use the Static Maps service to display properties for sale in Texas. Each property is represented as a point geometry using the default pin symbol. A panel on the left provides additional information about each property. The map uses the ArcGIS Imagery basemap style.

Steps

  1. Reference the service.
  2. Set the API key in the Authorization request header using the Bearer authentication scheme.
  3. Define the coordinates, symbol style, and other parameters for the request.
JavaScript
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
      fetch(
        `https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/v1/static-maps/${basemapStyle}/with-many-points?points=${JSON.stringify(points)}&symbolStyle=pin&labelOption=number&symbolScale=1&symbolColor=007AC2&width=${width}&height=${height}&padding=[15]`,
        {
          headers: {
            Authorization: `Bearer ${accessToken}`,
          },
        }
      )
        .then((response) => response.blob())
        .then((blob) => {
          const img = document.createElement("img");
          img.src = URL.createObjectURL(blob);
          img.alt = "Real estate map showing multiple properties";

          mapEl.innerHTML = "";
          mapEl.appendChild(img);
        });

      const legendDiv = document.getElementById("legend");
      properties.forEach((p, i) => {
        const item = document.createElement("div");
        item.className = "legend-item";
        item.innerHTML = `
        <div class="legend-number">${i + 1}</div>
        <div>
          <b>House for sale</b> <br />
          ${p.address} <br />
          <em>${p.bedrooms} bed, ${p.bathrooms} bath</em> | ${p.sqft} sqft <br />
          ${p.price}
        </div>
      `;
        legendDiv.appendChild(item);
      });
Expand

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
curl -X GET "https://static-maps-api.arcgis.com/arcgis/rest/services/static-maps-service/v1/static-maps/arcgis/imagery/with-many-points?points=[[-98.426,29.364],[-98.4296,29.3632],[-98.4276,29.359],[-98.4226,29.3607]]&symbolColor=007AC2&labelOption=number&symbolScale=1&symbolColor=ffffff&width=600&height=400&padding=[10]&token=<ACCESS_TOKEN>"

Tutorials

Display a simple static map

Display a static map with a point, polyline, or polygon.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.