Query a layer in GVH
I'm trying to query a layer from a workflow in GVH by passing it the result from a Get Layer activity.
The Get Layer has inputs for both layer ID and sublayer ID (i.e. the mapservice ID and the layer ID), and in the browser console I can see that both a layer and a sublayer are returned by Get Layer.
The query activity uses =$getLayer1.layer as input for its layer property, but it uses the wrong URL, and the layer ID is missing. For example: https://server/arcgis/rest/services/MyService/MapServer/query This should be: https://server/arcgis/rest/services/MyService/MapServer/1/query
Is this supposed to work, and if not, is there a workaround?
-
Is this example from the GXWF sample site https://gedemo.geocortex.com/Html5Viewer/index.html?viewer=GXWF_Sample_Site.GVH helpful for you?
https://latitudegeo.maps.arcgis.com/home/item.html?id=f59db74c070a456fb01f27bcc479e674
0 -
Hi Berend,
Depending on the configuration of your map service, you may need to enter these settings slightly differently; see https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/activities/get-layer.htm
Thanks, Stefan
0 -
@Nico Burgerhart? That particular sample just shows information about a mapservice, it doesn't do anything with a single layer
0 -
@Stefan Schweigert? I read that page, and it basically describes what I already do, i.e. use the Mapservice ID as Layer ID, and the Layer ID as Sublayer ID. This mapservice is added to the site as a run-of-the-mill MapServer. It has more than one layer.
When I load the viewer with debug=true in the URL, I can see that the outputs of Get Layer are:
- layer: This seems to be the mapservice, the ID is the one I entered for layer, and its url property ends in .../MapServer?token=blah
- sublayer: The actual layer, its ID is the same as the one I entered for sublayer. The type is returned as Feature Layer
0 -
I wish there was a more elegant way to query a particular layer in a map service with several layers, i.e. get a sublayer as a layer object that can be used by Query Layer. I think you don't achieve anything useful for this context by using the sublayerID with Get Layer. The only way I know about is to use getLayer with Layer set to the map service id to get the url with token to the map service. Then use Parse Url with $layer1.layer.url as input. The url to the particular map service layer can be constructed as layerUrl=$parseUrl.request + "/<sublayerId>" + $parseUrl.queryString. Then, use this url as url input to Query Layer
If someone has a better way to do this, please let me know
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare