I would like to change the zoomScale parameters for the selected search item. The widget currently zooms in to far for the area I need to focus on.


Usually I make this sort of thing configurable in my widgets but did not in this case. I will correct that so you can adjust it for each search. I will edit my answer when that is completed.

In the meantime, you can edit the source code to modify one or two values that are currently hard-coded.

For a single point, it builds an extent around the point with using 250 meters (or feet) around the point. Change it to a larger value to zoom out further. That is modified here: https://github.com/tmcgee/cmv-widgets/blob/master/widgets/AttributesTable/_GraphicsMixin.js#L619

If you want the map to zoom further for all features, you can modify the scale passed to the expand method of the extent. Change the 1.5 to 2 or 3 or whatever fits best. That is modified here: https://github.com/tmcgee/cmv-widgets/blob/master/widgets/AttributesTable/_GraphicsMixin.js#L597

  • I changed this.pointExtentSize = 5000; & this.map.setExtent(extent.expand(1.0));. It works perfectly. Thank you once again. – cmccullough Apr 29 '16 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.