Skip to content

Commit 86aee90

Browse files
authored
update top query
1 parent 9a224b7 commit 86aee90

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Samples/REST Services/Autocomplete/Autocomplete.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
var lastContextSignature = null;
138138

139139
// Note that the typeahead parameter is set to true.
140-
var geocodeServiceUrlTemplate = 'https://{azMapsDomain}/geocode:autocomplete?api-version=2025-06-01-preview&query={query}&coordinates={lon},{lat}&bbox={bbox}&top=10&resultTypeGroups={resultTypeGroups}&countryRegion={countryRegion}';
140+
var geocodeServiceUrlTemplate = 'https://{azMapsDomain}/geocode:autocomplete?api-version=2025-06-01-preview&query={query}&coordinates={lon},{lat}&bbox={bbox}&top={top}&resultTypeGroups={resultTypeGroups}&countryRegion={countryRegion}';
141141

142142
// Geocoding API to get coordinates for selected autocomplete item
143143
var geocodeUrlTemplate = 'https://{azMapsDomain}/geocode?api-version=2025-06-01-preview&query={selectedEntity}';
@@ -263,6 +263,7 @@
263263
.replace('{lon}', center[0]) //Use a lat and lon value of the center the map to bias the results to the current map view.
264264
.replace('{lat}', center[1]) //Use a lat and lon value of the center the map to bias the results to the current map view.
265265
.replace('{bbox}', `${normalizeLongitude(bbox[0])},${bbox[1]},${normalizeLongitude(bbox[2])},${bbox[3]}`) //Use the current map view bounds to bias the results to the current map view.
266+
.replace('{top}', '10')
266267
.replace('{resultTypeGroups}', document.querySelector('input[name="resultTypeGroups"]:checked').value);
267268

268269
// Handle country region parameter - remove it entirely if None is selected

0 commit comments

Comments
 (0)