Zum Hauptinhalt gehen

Problem getting a Run Command to work

Kommentare

9 Kommentare

  • Permanently deleted user

    Sorry what I've been trying is

    Command Name: ZoomToAllFeatures

    Command Parameter: =$queryCadastre.features

     

    Parameter is the output from a query layer activity

     

    0
  • Stefan Schweigert

    Hi Greg,

     

    ZoomToAllFeatures uses a Features[] object, while $query.features is an esri.Graphic[]. Try using ZoomToFeatures instead.

     

    An alternative would be to use the extent of the query's features with a ZoomToExtent command.

     

    https://docs.geocortex.com/essentials/gvh/latest/commands-help/index.html#/commands/Navigation/ZoomToFeatures

    0
  • Permanently deleted user

    Hi Stefan

     

    Thanks for that. Sorry about the second posting. I haven't had any success with ZoomToFeatures but got ZoomToExtent to work after using a GetFeatureSetExtent.

     

    What I'm really trying to do however is to zoom to the combined selection of a 'Show Results' where I'm running the 'Query Layer' multiple times and unioning the results. Is there a way to zoom to the 'Collection' from the ShowResults activity ?

     

    0
  • Stefan Schweigert

    Hi Greg,

     

    The unioned results should be usable in the Set Map Extent activity. You could also try using the Get Feature Set Extent on the results and use the obtained extent value as the Geometry input into the Set Map Extent.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Hi Stefan

     

    I haven't been able to use the 'Collection Name' from the Show Results activity in the activities you mentioned above. The unioned results show up in the List view/table view but I can't seem to get a handle on the results to use in the way that a 'Zoom to All' command works from the table or list view. The 'Show results' activity doesn't have any outputs that I can use.

     

     

    Previously in workflow4 I would use a 'Get Selected Features' activity to pick up any existing selections when I ran the workflow a second time which I would then union with the new featureset extent and then set the . can't seem to find an equivalent of 'Get Selected Features' in workflow5.

     

    This isn't a huge drama if I can't get it working but wondering if you can think of a solution

     

    Thanks and regards

     

    Greg

    0
  • Permanently deleted user

    Hi Greg,

    You'll have to work with the results from your Query Layer activities, instead of pulling them back from the viewer. Try either:

    • use multiple Add Items to combine all the features into one featureset. Eg, add =$query2.features, $query3.features, and so on to the =$query1.features collection. Then get the extent from that result. This probably only works if they all have the same geometry type.
    • use Get Feature Set Extent on each Query Layer result. Then Union Geometries to combine them down to one geometry (eg, input =[$getFeatureSetExtent1.extent, $getFeatureSetExtent2.extent, etc] ). This would probably work even if the features aren't all the same geometry type.
    0
  • Permanently deleted user

    Thanks Amanda

    I've managed to do what I need by using the 'oldextent' output from a Set Map Extent activity then a union geometry with oldextent and the extent of the new featureset.

    Regards

    Greg

    0
  • Christopher Wiebke

    Got the union geometries to work. It zooms in really close. Is there some command like expand that can be used with the $union1.geometry output? thanks.

     

    0
  • Christopher Wiebke

    I found the Get Geometry Extent activity to pass into the Set Map Extent activity.

     

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.