Change ZoomToFeature so that it .expand(s) more?
I am wondering if the "ZoomToFeature" command found in many of the configs in the .json files for the GVH can be extended so that instead of zooming to a feature and expanding (maybe 1.1) the way it does now, I could change it to a custom expansion of maybe 1.5?
I am not very Javascript savvy, so I need help at a very basic level.
Thanks!
0
-
Hi Michael,
I’m not aware of the existence of that setting but I can give you a couple of idea/work around:
- If you need to use that command in a specific place or workflow you could think of using SetMapExtent or ZoomToExtent commands and as parameter you could pass something like MyFeature.Geometry.Extent.Expand(1.50)
- If you want ZoomToFeature always zoom out a bit, you might want to create a custom module that does that for you using command above and replace your custom command instead of ZoomToFeature in json.js files where needed
I hope this helps0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar