POST
|
Martyn, Sure here is the code for that, you are responsible for ensuring that initally only one Op layer is visible: This change goes in the src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as private function onLayerShow(event:FlexEvent):void
{
//Turn all other ops layers off before we switch this one on
var opLayers:Array = ViewerContainer.getInstance().configData.opLayers;
for (var i:int = 0; i < opLayers.length; i++){
if(layer.id != opLayers.label)
ViewerContainer.getInstance().mapManager.map.getLayer(opLayers.label).visible = false;
}
setVisible(layer.visible, true);
} Don't forget to click the top arrow (promote) and to click the Mark as answer check as shown below: Hello, I am jumping in on this because I want to do this also and have a few questions. I am using a layer list widget to display all of my operational layers and would like them all to be able to be turned on at once except a group layer I have. Then I only want to be able to turn on one sublayer at a time. I this possible and if so, how? Eric
... View more
04-11-2013
11:59 AM
|
0
|
0
|
454
|
POST
|
I did not know you could set your symbology using a layer file in the viewer. I have used simple renderers but not a layer file. Do you know how to do this or where I can go to find out? I will start looking too Thanks Eric
... View more
04-08-2013
11:55 AM
|
0
|
0
|
145
|
POST
|
Hello All, Does anybody know if you can pass symbology that is set in you GP Service to your viewer? Eric
... View more
04-08-2013
07:28 AM
|
0
|
2
|
329
|
POST
|
Anthony, The PopUp window is good but I am also looking at putting a link to an external webpage and it only looks like you can only use a larger image and then link that instead of a simple icon. Unless there is a way to do this but I did not see it in the tag references. Eric
... View more
04-03-2013
11:27 AM
|
0
|
0
|
231
|
POST
|
Hello All, I am looking for a popup info window type thing for my layer that just shows some text info about the object and an icon which will take you to an external link. Any help or ideas Eric
... View more
04-03-2013
09:45 AM
|
0
|
3
|
728
|
POST
|
Hopefully this is more specific What I have or what I would like to do is join two strings together to create a new variable. In my model I have the Calculate Value tool testing a string value coming in to model to determine which branch to run. I would like to have two different inputs coming "Year" and "Type" Attached is my model with a graphic representation of the string elements. I hope this helps Eric
... View more
04-02-2013
10:58 AM
|
0
|
0
|
1872
|
POST
|
Hello All, I am just wondering if you can Concatenate two String data elements together in model builder and how you might do that? Thanks Eric
... View more
04-02-2013
10:10 AM
|
0
|
4
|
5991
|
POST
|
Curtis, That is perfect I have now built most of the model but I do still need maybe a little more clarification on the data element for the model. I created a String Variable and then set it to "%Ammonia%" I think this is correct. Then what is the correct way to connect it to the CV tool? Environments Precondition etc. Please let me know if I am way off track Thanks immensely for your help Eric
... View more
04-02-2013
09:20 AM
|
0
|
0
|
1522
|
POST
|
Curtis, That looks like just what I am looking for. I read through the blog but am still unsure about this: Using your attachment as reference I can see you take a string variable and check to see what the string is using the "Calculate Value" tool and then set the data type to Boolean But I am not quite sure what to put in the code block or expression field and string variable a precondition to the "Calculate Value" tool? Thanks Eric
... View more
04-01-2013
11:24 AM
|
0
|
0
|
1522
|
POST
|
Thanks that helps However maybe just a little more help. I export the model into python and it is group a little different then I expected. So if you can help me in where I need to put your suggested text. I attached the file Thanks again Eric
... View more
04-01-2013
08:52 AM
|
0
|
0
|
1522
|
POST
|
Hello All, I have a model that runs a two different processes and I would like to have which process to be run based on a user input. I have done this before by using a feature dataset allowing the user to select a point on the map to run model however, for this I would like to have the user select a text string from a list if possible (i.e. Ammonia, pH, VSS, COD). Then pass that text value to the model and have it run the desired process based on that selection. So I am guessing that somehow I need to have the model take the value and test it and run the right process. But, I am not sure if this can be done or exactly how. I have attached a graphic of the model. Thanks Eric
... View more
04-01-2013
05:59 AM
|
0
|
7
|
2230
|
POST
|
Hello All, I published a service that had a bunch of the same layer in just symbolized differently based on an attribute. It works just fine but was wondering if there is any way to make it so you can only turn on one layer at time (problem being that you can only see the top most layer) or is there a better way all together of doing this? Thanks Eric
... View more
03-22-2013
12:13 PM
|
0
|
0
|
835
|
POST
|
Hello all, I have a custom widget that runs a geoprocess off my server and displays the results in my viewer. I am looking for a way to display some sort of information about the results and/or a legend of the features being displayed. The legend widget displays base layers and operational layers but I am not sure if there is anything for the widgets or their results. I am looking for any suggestion on this topic and maybe some help on implementing those ideas. Thanks Eric
... View more
03-22-2013
11:48 AM
|
0
|
0
|
227
|
POST
|
MXML <viewer:states> <s:State name="input"/> <s:State name="output"/> </viewer:states> <viewer:WidgetTemplate id="wTemplate" width="368" height="225" minWidth="200" minHeight="200" closed="wTemplate_closedHandler(event)" minimized="wTemplate_minimizedHandler(event)" open="wTemplate_openHandler(event)" width.input="401" width.output="400" height.output="400"> <viewer:layout> <s:VerticalLayout/> </viewer:layout> <s:Label id="descriptionText" fontWeight="bold" includeInLayout="false" visible="false"/> <s:Scroller width="100%" height="66" includeIn="input" itemCreationPolicy="immediate"> <supportClasses:InputParamDataGroup id="inputParamsDataGroup" width="100%" height="100%"/> </s:Scroller> <s:Scroller width="100%" height="16" includeIn="output" itemCreationPolicy="immediate"> <supportClasses:OutputParamDataGroup id="outputParamsDataGroup" width="100%" height="100%"/> </s:Scroller> <s:Label id="myLabel" text.input="Click on above icon and then select a location on the map within 
the township. Then click the submit button to display the storm 
drain basin you are in." text.output="The map displays basin boundaries, water features,
underground storm sewer lines and the basin discharge
location. 

For additional information on the storm drain basin you are in, 
left click within displayed basin."/> <s:Label id="missingRequiredFieldsText" color="0xFF0000" includeIn="input" includeInLayout="false" visible="false"/> <s:HGroup width="100%" verticalAlign="middle" height.output="11"> <s:RichEditableText id="helpLink" editable="false" selectable="false"/> <mx:Spacer width="100%"/> <mx:Image id="busyAnimation" source="assets/images/loader.swf" visible="false"/> <s:Button id="clearOutputFeaturesButton" click="clearAllOutputFeatures()" includeIn="output" includeInLayout="false" label="{clearFeatureLabel}" visible="false"/> <s:Button click="runGPIfRequiredParamsComplete()" excludeFrom="output" label="{submitLabel}"/> </s:HGroup> <s:Label includeIn="output" paddingLeft="0" text="The basin discharge location
is displayed by the icon below:" verticalAlign="top"/> <s:Image includeIn="output" width="32" height="30" source="assets/images/i_hydro.png"/> <s:Label includeIn="output" paddingLeft="0" text="The underground storm sewer lines
are displayed by the icon below:" verticalAlign="top"/> <s:Image includeIn="output" width="32" height="30" source="assets/LineIconOrange.png"/> <s:Label includeIn="output" paddingLeft="0" text="The basin water features
are displayed by the icon below:" verticalAlign="top"/> <s:Image includeIn="output" width="32" height="30" source="assets/lake_iconBlue.png"/> </viewer:WidgetTemplate> </viewer:BaseWidget>
... View more
03-18-2013
11:52 AM
|
0
|
0
|
202
|
POST
|
Here are my mxl and mxml file for the widget. Not sure what my problem is. It displays results however does not show any of the Information that I put into the output "Results Tab". Eric <?xml version="1.0"?> <configuration label="Storm Basin"> <description/> <taskurl>http://gis.delhitownship.com/arcgis/rest/services/DPS/StormDrainService/GPServer/BasinService</taskurl> <inputparams> <param name="Input_point" geometrytype="point" label="Select location" required="true" type="featurerecordset" visible="true"> <renderer type="simple"> <defaultsymbol color="0x9ACD32" size="10" type="simplemarker"> <outline width="1" color="0x0000FF"/> </defaultsymbol> </renderer> </param> </inputparams> <outputparams> <param name="Selected_Basin" geometrytype="polygon" label="Basin" required="true" type="featurerecordset" visible="true"> <!--popup visible="true"> <title>{Name}</title> <description> <![CDATA[This basin drains into the <b>{River}</b> which is a part of the <b>{RiverShed}</b> Watershed and is contained in the <b>{Watershed}</b> Watershed which flows into Lake Michigan.]]> </description> </popup--> <renderer type="simple"> <defaultsymbol alpha="0.0" type="simplefill"> <outline width="4" color="0x00FF00"/> </defaultsymbol> </renderer> </param> <param name="Selected_Hydropoly" geometrytype="polygon" label="Lakes & Ponds" required="true" type="featurerecordset" visible="true"> <renderer type="simple"> <defaultsymbol alpha="0.5" color="0x0000FF" type="simplefill"> <outline width="1" color="0x0000FF"/> </defaultsymbol> </renderer> </param> <param name="Selected_Storm" geometrytype="polyline" label="Storm Drain" required="false" type="featurerecordset" visible="true"> <renderer type="simple"> <defaultsymbol alpha="0.5" color="0xFF4500" type="simpleline"> <outline width="2" color="0xFF4500"/> </defaultsymbol> </renderer> </param> <param name="Selected_Drain" geometrytype="polyline" label="Storm Drains" required="false" type="featurerecordset" visible="true"> <renderer type="simple"> <defaultsymbol alpha="0.5" color="0x0000FF" type="simpleline"> <outline width="2" color="0x0000FF"/> </defaultsymbol> </renderer> </param> <param name="Selected_Outfall" geometrytype="point" label="Selected Outfall" required="true" type="featurerecordset" visible="true"> <renderer type="simple"> <defaultsymbol url="assets/images/i_hydro.png" height="25" width="25" type="picturemarker">/> </defaultsymbol> </renderer> </param> </outputparams> <layerorder>Input_point,Selected_Outfall,Selected_Storm,Selected_Drain,Selected_Hydropoly,Selected_Basin</layerorder> <!--popups> <fields> <field name="Name"/> </fields> </popups--> </configuration> <!-- See Geoprocessing widget tag reference at http://links.esri.com/geoprocessingwidget
... View more
03-18-2013
11:51 AM
|
0
|
0
|
202
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|