Basemap places

ArcGIS navigation style with places integrated with the places service.

What are basemap places?

Basemap places is a feature of the basemap styles service (v2) that allows you to show or hide place locations in a basemap. The places are part of the basemap style and represent businesses, services, landmarks, and other places of interest (POIs) all over the world. No other layers or services are required to display them. When places are active, each is displayed with an icon and a name label. The place features also support attributes that you can use to build interactive applications or integrate further with the places service.

You can use basemap places to:

  • Display nearby businesses and services with a basemap style.
  • Display points of interest (POI) such as important geographic features, parks, and landmarks.
  • Display all places, a filtered subset of places, or hide all places.
  • Access and display place attributes such as name and esri_place_id.
  • Build applications that integrate with the places service to get detailed place information.
  • Build navigation and routing applications.

How to use basemap places

To display basemap places you need to use the basemap styles service (v2) with the arcgis/navigation or arcgis/navigation-night style. To control the type of places displayed or to hide places you use the places parameter. The navigation styles contain a predefined set of places that will display for the current visible extent and zoom level of the map. The most relevant places such as parks, shopping centers, and restaurants will typically appear first. More places will appear as you zoom in.

The steps to display basemap places are:

  1. Reference the basemap styles service.

  2. Specify the style. Currently only arcgis/navigation or arcgis/navigation-night are supported.

  3. Use the places parameter to specify which places to display:

    • places=all: Show all places available.
    • places=none: Hide all places.
    • places=attributed: Show all places that have attributes.

Below is an example request to display all places:

Use dark colors for code blocksCopy
1
https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/navigation?places=all&token=<ACCESS_TOKEN>

Place attributes

The basemap styles service (v2) can return place features with attributes (fields and values) directly in the style. To do so, you need to reference the style and set the following parameter: places=attributed (see below). The main attributes returned are name and esri_place_id. When place attributes are available, you can use mapping APIs to access them and build interactive applications. For example, you can use name to display place names in interactive popups or you can use esri_place_id to get more detailed information about each place with the places service.

Example request to return places with attributes:

Use dark colors for code blocksCopy
1
https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/navigation?places=attributed&token=<ACCESS_TOKEN>

Example of place attributes returned with each place feature:

Use dark colors for code blocksCopy
1
2
3
4
{
  esri_place_id: "e74ccedafb668dd833b5b41c357dbc95"
  name: "J Riley Distillery",
}

Place style categories

Places style categories are groups of places in the style that belong to the same thematic category. Each category is defined by a unique source-layer in the style. All places in each category have the same icon, zoom levels, and other style definitions.

The place style category names include the following:

  • Food and drink place
  • Lodging place
  • Shop or Service place
  • Arts and Entertainment place
  • Government or Public Facility place
  • Residence place
  • Industrial or Infrastructure place
  • Land Feature place
  • Landmark place
  • Water Feature place
  • Sport place
  • Outdoors place
  • Transportation place
  • Medical place
  • Education place
  • Religion place
  • POI Other place

Below are examples of the style category in the basemap style JSON:

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

{
  "filter": [
    "==",
    "_symbol",
    4
  ],
  "id": "Place/Sport/Curling",
  "layout": {
    "icon-image": {
      "stops": [
        [
          16.5,
          "Sport place/Curling_1"
        ],
        [
          16.6,
          "Sport place/Curling"
        ]
      ]
    },

  "minzoom": 11,
  "paint": {
    "text-color": "#698c4d",
    "text-halo-color": "rgba(255,255,255,0.8)",
    "text-halo-width": 1
  },
  "source": "esri",
  "source-layer": "Sport place",
  "type": "symbol"
},
...

URL request

Use dark colors for code blocksCopy
1
https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/{style}?places={}&token=<ACCESS_TOKEN>

Parameters

NameDescriptionExamples
placesThe places displayed with the basemap style: none, all, attributedplaces=attributed
tokenAn API key or OAuth 2.0 access token. Learn how to get an access token in Security and authentication.token=<ACCESS_TOKEN>

Code examples

Show and hide places

This example shows and hides all places with the arcgis/navigation basemap style. The request uses the places=all parameter to show all places and places=none to hide them.

All points of interest displayed with the ArcGIS Navigation basemap style.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptMapLibre GL JSOpenLayers
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
        if (showPlaces.checked) {
          vtl.loadStyle(allPlaces)
        } else {
          vtl.loadStyle(noPlaces)
        }
Expand

Display places with attributes

This example shows how to access place attributes in the basemap the arcgis/navigation style and places=attributed parameter. The name and esri_place_id attributes and the style category name are displayed for each feature as you hover over places.

Points of interest with attributes displayed in the ArcGIS Navigation basemap style.

APIs

MapLibre GL JSMapLibre GL JSOpenLayers
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
  const apiKey = "YOUR_API_KEY";

  const map = new maplibregl.Map({
    container: "map",
    style: `https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/navigation?token=${apiKey}&places=attributed`,
    zoom: 16,
    maxZoom:20,
    minZoom:16,
    center: [-117.182545, 34.055195]
  });
Expand

Filter places by style category

This example shows how to control the visibility of places on the client side by selecting a style category filter. The filter changes the visibility of places based on the active style category. The visibility is changed by setting the visibility property of the source-layer in the style.

Points of interest filtered by source layer style category.
ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptMapLibre GL JS
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
      const filterByCategory = category => {
        const layerStyle = attributedPlaces.currentStyleInfo
        const places = layerStyle.style.layers.filter(
          lyr => lyr.source === "esri-places"
        )
        places.forEach(lyr => {
          const layoutProps = attributedPlaces.getLayoutProperties(lyr.id)
          if (lyr.id.startsWith(category) || category === "All") {
            layoutProps["visibility"] = "visible"
            attributedPlaces.setLayoutProperties(lyr.id, layoutProps)
          } else {
            layoutProps["visibility"] = "none"
            attributedPlaces.setLayoutProperties(lyr.id, layoutProps)
          }
        })
      }
Expand

Get additional place information

This example shows how to access place attributes in the basemap and then request more attributes with the places service. It allows users to click on a place to get the esri_place_id from the basemap place feature and then calls the places service place/placeId operation. Attributes such as description, address:streetAddress, contactInfo:telephone, and rating:user can be returned. To learn more about the attributes you can request, go to Get place details.

Points of interest with details returned from the places service.
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
    map.on("click", function (e) {
      const features = map.queryRenderedFeatures(e.point);
      if (features.length && features[0].properties.esri_place_id) {
        showMarker(features[0].geometry.coordinates);
        panel.hidden = false;
        panel.closed=false;
        map.panTo(features[0].geometry.coordinates);
        showPlaceDetails(features[0]); // Get place info from Places service
      }
    });
Expand

Tutorials

Services

API support

2D Display3D DisplayBasemap layersBasemap placesData layersGraphicsWeb mapsWeb scenes
ArcGIS Maps SDK for JavaScript1
ArcGIS Maps SDK for .NET
ArcGIS Maps SDK for Kotlin
ArcGIS Maps SDK for Swift
ArcGIS Maps SDK for Java
ArcGIS Maps SDK for Qt
ArcGIS API for Python
ArcGIS REST JS22
Esri Leaflet34
MapLibre GL JS34
OpenLayers134
CesiumJS34
Full supportPartial supportNo support
  • 1. Display places only.
  • 2. Access via HTTP request and authentication.
  • 3. Access via Feature layer or Map tile layer.
  • 4. Access via layers.

Tools

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