laptop and a wrench

Bug

The Search widget result does not always have an appropriate extent to zoom to for the size of the searched location.

Last Published: November 7, 2019 ArcGIS API for JavaScript
Bug ID Number BUG-000126072
SubmittedOctober 16, 2019
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.13
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusNon-Reproducible

Additional Information

This is not a bug with ArcGIS API for JavaScript, rather the documentation is updated to include a better explanation of how this works. By default, the Search widget sets the view on the Search result. The level of detail (LOD) at the center of the view depends on the data source, with higher quality data sources returning extents closer to the feature obtained from the search.

Workaround

let pt = new Point({

                    latitude: event.result.feature.geometry.latitude,

                    longitude: event.result.feature.geometry.longitude

});

 

if (view.zoom < 14) {

       view.goTo({

                        target: pt,

zoom: 14

}

Steps to Reproduce

Bug ID: BUG-000126072

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options