Get geometry extent, set map extent
Good day,
I would like to ask about the get geometry extent tool.
I tried to call the selected geometry after running query layer tool on a particular feature set. I'm able to check the query and it is returning the correct record from that feature. I can then run the Get Geometry Extent tool and if I drop some alerts in after I can see the x-max, x-min, y-max, y-min and other geometry details are called.
However when I then run the Set Map Extent tool the process runs but does not "zoom" to the area that was queried. To further test the Set Map Extent tool I called the geometry at the beginning of the workflow and using the output =$mapExtent1.extent the tool then does set the extent correctly to the original map extent.
Is there a reason why it works with the Get map extend but not the Get Geometry extent?
Thanks
-
Good day Greg,
When using the Set Map Extent or Get Map Extent activities, assuming that you are using the Features input with '=$query1.features' as an input for the Set activity, make sure that you've set the Query Layer activity to Return Geometry as '=true'. Both activities should function the same if a geometry is available.
Would you be able to upload your workflow so that I can take a look at what might be happening?
Thanks, Stefan
0 -
Hi Greg,
One possibility I can think of is that the geometry from the query might have a different spatial reference than the viewer, so the viewer isn't able to use it to set an extent. If that's the case, there are two options:
- Use the Out Spatial Reference property for the Query Layer activity to specify the WKID of your viewer (based on your lowest basemap). You would use this option if you don't need to use the original geometry for anything else in the workflow
- Use the Project activity on the extent from Get Geometry Extent to specify the WKID of your viewer (based on your lowest basemap). Then use that result in Set Map Extent (eg =$projectGeometry1.geometry)
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
2 commentaires