Select to view content in your preferred language

Modify the Zoom level/scale of a searched item

809
5
09-06-2023 08:00 PM
Labels (2)
Ed_
by MVP Regular Contributor
MVP Regular Contributor

So in Experience Builder, the user has the ability to turn on the search option/tool on the map (not talking about the search widget). This search tool is linked to a geocoder(s). Currently when you search for an address it zooms to a scale shown below in the screenshot.

Now my question is, is there a way to modify the zoom level when using this search in Experience Builder?

Current output:

SaadullahBaloch_0-1694055602275.png

 

Question | Analyze | Visualize
0 Kudos
5 Replies
TonghuiMing
Esri Regular Contributor

@Ed_ 

In the map search, this is controlled by API goTo property - https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo 

However, there seems to be no way for customization of this search (telling from the screenshot it is a locator search). I believe the only workaround is to customize it in dev edition to change the scale

https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#goToOverride 

Ed_
by MVP Regular Contributor
MVP Regular Contributor

Good morning @TonghuiMing and happy Friday,

Thank you for your response and for providing a possible solution.

Yes, it's the search widget that becomes visible when you turn on the search option under tools.

SaadullahBaloch_0-1694176578579.png

 

So, does that mean if I have to override the default scale, I would have to create the entire web map in ArcGIS Maps SDK for JavaScript?

Question | Analyze | Visualize
0 Kudos
TonghuiMing
Esri Regular Contributor

@Ed_ If you want to use the search tool, unfortunately yes. But another workaround is to use the OOTB Search widget. The message action Zoom to allows you to configure a custom zoom level.

Ed_
by MVP Regular Contributor
MVP Regular Contributor

Good morning @TonghuiMing, nice, thank you for pointing that out, cheers 🙂

Question | Analyze | Visualize
Ed_
by MVP Regular Contributor
MVP Regular Contributor

It turns you can actually edit the Zoom level of the map search tool in Experience Builder which is actually tied to the extent set in Map Viewer. This can be done by changing the extent box size under item details page settings.

SaadullahBaloch_0-1694607594896.png

 

 

Question | Analyze | Visualize
0 Kudos