Select to view content in your preferred language

Setting the zoomScale in Web AppBuilder

3162
6
Jump to solution
11-06-2015 02:10 AM
AveKargaja
Deactivated User

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)

0 Kudos
1 Solution

Accepted Solutions
AveKargaja
Deactivated User

Oh, by the way, simply adding zoomScale: 2000 to the right place in widgets\Search\Widget.js did the trick in my case

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Emeritus

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.

Search | API Reference | ArcGIS API for JavaScript

0 Kudos
AveKargaja
Deactivated User

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:

zoomScaleNumberIf the result does not have an associated extent, specify this number to use as the zoom scale for the result.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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

0 Kudos
AveKargaja
Deactivated User

So, if I'm searching addresses from a point based geocoding service, then this zoomScale should actually work?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

AveKargaja
Deactivated User

Oh, by the way, simply adding zoomScale: 2000 to the right place in widgets\Search\Widget.js did the trick in my case