tasks.search - search arguments - sources
I would like to search multiple sublayers within a map server. I understand in tasks.search command you can specify 'sources' in the search arguments.
Commands, Operations and Events Reference | VertiGIS Studio Developer Center
Can anyone point me to what the syntax looks like for the type specified in the docs: @vertigis.arcgis-extensions.data.FeatureSource.FeatureSource[]
Context: Web Map, with a map server, the map server has a sub-layer which I want to include in the sources, so I can further search its sub-layers.
e.g Web Map > MapServer > Sub-layer (ideally add this as a source) > [more sublayers to be searched within]
Trying to fill in the blank if anyone has done this before {"sources": {........}}
-
I wish the documentation on getting some of these command arguments was a little better, it's challenging to figure out how to take advantage of some of these commands in Workflow (or even in the SDK tbh).
There must be a better way to do this, but I think that I have a roundabout method for you (haven't tested it though). ArcGIS Extension FeatureSources are, among other things I'm sure, a property of Features; so you can probably generate one that in WF by using the results.from-graphics operation and pulling the .source property. That property may not be exposed so you may need to drill into a property's prototype along the way.
If someone has a better method I'd love to hear it. By the way, you might want to take a look at the SDK for this level of question, if you're comfortable in an IDE, or at least install the @vertigis/arcgis-extensions NPM module.
2 -
Hi Nathan and Zack,
I was able to make this work for a layer by using a Get Map activity and using the following parameter for the tasks.identify operation:
"sources": [$map1.map.extension._layerExtensions._collection.items[0].featureSettings.featureSource]
This also works and is a bit shorter:
"sources": [$map1.map.extension._layerExtensions._collection.items[0]]
For a sublayer, it would probably look more like:
"sources": [$map1.map.extension._layerExtensions._collection.items[0]._sublayerExtensions._collection.items[0].featureSettings.featureSource]
or
"sources": [$map1.map.extension._layerExtensions._collection.items[0]._sublayerExtensions._collection.items[0]]
You should also be able to use the item ref, for example:
"sources": ["item://layer-extension/victoria-fire-hydrants"]
I hope that helps!
Alisa
1 -
Did anyone get this to work? I'd like to be able to use the item ref for ease, but it's not working for me. I'm trying to use it in a workflow that happens when clicking on the map. I only want identify results to show up for one layer when clicking. My parameters are looking like this:
={"geometry": $getWorkflowInputs.inputs.context.geometry, "maps":$getWorkflowInputs.inputs.context.maps, "sources": [????]}
Tried tackling again 6 months later and now it works if I just remove the maps part, so the result is:
={"geometry": $getWorkflowInputs.inputs.context.geometry, "sources": ["item://layer-extension/7fc5310b-3d38-47b6-8207-001deddd58af"]}
0 -
Alisa Lindley This does not seem to work. I am using Web 5.31, and using the following command on the Map component's Map Clicked event so that I can populate a Results Summary component nested in a panel to act as a popup:
[ { "name": "tasks.identify", "arguments": { "sources": [ "item://layer-extension/30c72685-b348-426b-9937-a5caa94112df" ] } }, { "name": "results.display-summary", "arguments": { "results": "item://feature-summary/04343570-7bce-452e-b2c4-3356079b9b37" } }, { "name": "ui.activate", "arguments": "panel-b6744c1c" } ]
I tried your suggestion to call “sources”: ["<model_uri_for_layer>"], and all layers are still returned and pushed to the results summary component. I also tried a bunch of item://sublayer-extension… strings because really, I don't want all of a service's layers to be identified; only 3 of the 7. This attempt at using sublayer-extension didn't work either
- Jack C>
0 -
Hi Jack Charde,
I tried testing this and also ran into issues, so it's possible that there's a bug in the tasks.identify arguments. It seems the sources and maps arguments no longer work the way they used to, though some further investigation is necessary.
Could you please create a support ticket so our team can look further into this issue and file a bug report if necessary?
0 -
Hey Alisa,
I actually already have a ticket open that identifies this issue. So we're already on our way :) Thanks!
0 -
Resolution via the support ticket: include
“maps”: []
in the arguments for the tasks.identify operation. This prevents the map extension from being included in the operation via previous context, and forces tasks.identify to only query the layer extensions listed in the sources argument.The reason for this is that if a map extension is included in addition to layer extensions, the results will stack up instead of being narrowed down.
1
Du måste logga in om du vill lämna en kommentar.
Kommentarer
7 kommentarer