Dynamically Capture Map Service Layer Count
I'm writing a workflow to display all layers to the user, which they will then choose one to completed a selection against. Unfortunatley, I didn't find an easy way to complete this on the Geocortex website/forums so I've come up with a work around. 1) have user select the map service name & add that to a variable. 2) that variable will be inserted into a URL for the workflow tool 'getfeaturelayerinfo'. 3) complete a loop that cycles from (0-last layer) and populate result into a featurelayerinfo data type. 4) from there you can use the .name method to capture the name and use that later to access that particular map service.
However, if there is a map service that has 10 layers in it and I loop it to 11, the code errors out. I was unable to find a property/tool in a workflow that allows you to get a layer.count() to know how many layers in the map service. I would then use this total to go from (0-10) and prevent any errors. Do we have a similar tool/workflow like 'getfeaturelayerinfo' but for mapservices that do this?
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
0 Kommentare