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
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare