<s:DropDownList id="serviceDdl" change="serviceChanged(event)"> <s:ArrayList> <fx:Object data="Tenements" label="Tenements" url="http://xyz/arcgis/rest/services/Tenements/MapServer"/> <fx:Object data="Drilling" label="Drilling" url="http://xyz/arcgis/rest/services/Drilling/MapServer"/> </s:ArrayList> </s:DropDownList>
if (serviceDdl.selectedItem.data == "Drilling") { cboLayerText.dataProvider.removeItemAt(0); cboLayerText.dataProvider.removeItemAt(0); }
else if (serviceDdl.selectedItem.data == "Tenements") { cboLayerText.dataProvider.removeItemAt(3); cboLayerText.dataProvider.removeItemAt(2); }
I would imagine that you will need to either program a widget yourself via the API for Flex, or create a Python script and run it through the model builder, then publish it as a GeoProcessing service. Which in turn you would use to create a basic shelled widget in the Viewer for Flex app.I've created a couple of widgets this way. They don't look fancy as you cannot control the look and feel of the GUI if you go the later route.However, if you go the first route, via the API, then you can tweak the heck out of it.Haskett
It would depend on how big your data is. I have implemented a similiar ability to the eSearch widget.I have a drop down box that contains a list of my map services. Once the map service is selected, I have a drop down box populate with only the layers that relate to that specific selected Service. Its not doing a query but instead since I only have 3 services, I simply creating an if statement that removes layers from the dropdown that dont relate to my selected service.And then I can create an SQL statement for that layer, inside that service.Not a solution to this problem but might be relevant to you.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.