As I am not satisfied with the default zoom scale that the geocoder address search result provides, then I'm looking for a possibilty to configure it manually.
So, is there a way to do it in the Search widget js json or html configuration files? (or somewhere else)
Solved! Go to Solution.
Oh, by the way, simply adding zoomScale: 2000 to the right place in widgets\Search\Widget.js did the trick in my case
Ramon,
Unfortunately you only have control over the parameters, properties, and method that the JS API exposes for the Search Dijit and I don't think you are going to find the control you are wanting.
Robert,
That is sort of strange, because as I'm using the very same basemap with WAB version 1.1 app, which zooms to 1:9250, and with WAB version 1.2 app, which zooms to 1:1000.
Under properties at the site your referred:
zoomScale | Number | If the result does not have an associated extent, specify this number to use as the zoom scale for the result. |
Ramon,
That states that the zoomScale will only be used is the geometry does not return an extent (i.e. points) all other geometries return an extent and then is not a property to adjust for those other geometries. The fact that the behavior was different in 1.1 is due to that version using the geocoder dijit and 1.2 uses the newer search dijit
So, if I'm searching addresses from a point based geocoding service, then this zoomScale should actually work?
As long as the Geocode service is not configured to return an extent then yes but the geocode service can be setup on ArcGIS Server to return an extent.
Oh, by the way, simply adding zoomScale: 2000 to the right place in widgets\Search\Widget.js did the trick in my case