Operational layer / sublayer problems: labels, symbology, raster visibility

4556
5
06-12-2012 12:10 PM
by Anonymous User
Not applicable
Original User: strelolist

Hello all,
I am trying to use the ArcGIS Flex Viewer capability to display a single layer from published mxd that has multiple layers. I used this setup for operational layers:

        <operationallayers>

           <layer label="Land cover, 2006 (NLCD)" imageformat="png24"   type="feature" visible="true" alpha="0.8"
                   url="http://servername.edu/ArcGIS/rest/services/LDM_land_cover/MapServer/19"/>

              <layer label="Populated places"    imageformat="png24" type="feature" visible="true" alpha="0.8"
                   url="http://servername.edu/ArcGIS/rest/services/LDM_Administrative/MapServer/0"/>

              <layer label="Counties"    imageformat="png24" type="feature" visible="true" alpha="0.8"
                   url="http:/servername.edu/ArcGIS/rest/services/LDM_Administrative/MapServer/1"/>

        </operationallayers>

It looks fairly straightforward, however I have the following problems:


  • symbology of vector maps either dosn't appear or altered (eg boundary marked as dotted line with thicker grey line as background in Desktop would appear as simple grey line in online version)

  • labels would not apear at all

  • raster maps are not visible


Layers are still appearing OK in the list. When the same mxd is used with layer type="dynamic" everything works and appears exactly as set in mxd, but I would like to create mashup from different mxds/services. MXD is created in ArcGIS 10.0 and ArcGIS Flex Viewer version is 2.5. I am attaching a screenshot and REST information for layers/sublayer.

Any help is greatly appreciated!


[ATTACH=CONFIG]15146[/ATTACH]
0 Kudos
5 Replies
by Anonymous User
Not applicable
Original User: mehu11111

Symbols get simplified when using FeatureService.
1. You could try using MapService and control the sublayer's visibility by visiblelayers attribute of the layer tag.
2.if you want to show subset of feature sof layer, you could filter that by definitionexpression attribute of the layer tag.
see http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Layer_tag/01m30000000p000000/

3. For clicking on a feature to see its attributes, you could define popup on that layer for type "feature"/and sublayer.for type "dynamic"

hope this helps.

Mehul
0 Kudos
AndreyZhalnin
Emerging Contributor
Mehul, thank you for quick reply.

However, this is not quite what I need. I need to show the subset of layers from mxd/service so the rest of layers should not appear at all in the legend list. Out of curiosity, do you know why symbols get symplified with "feature" option? Still not clear why raster refuses to show. I know that "feature" in config file is not equal "feature" as data type in ArcGIS so raster supposed to be OK.

Symbols get simplified when using FeatureService.
1. You could try using MapService and control the sublayer's visibility by visiblelayers attribute of the layer tag.
2.if you want to show subset of feature sof layer, you could filter that by definitionexpression attribute of the layer tag.
see http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Layer_tag/01m30000000p000000/

3. For clicking on a feature to see its attributes, you could define popup on that layer for type "feature"/and sublayer.for type "dynamic"

hope this helps.

Mehul
0 Kudos
by Anonymous User
Not applicable
Original User: mehu11111

I need to show the subset of layers from mxd/service so the rest of layers should not appear at all in the legend list.


Legend widget honours visiblelayers attribute set on the layers tag  (type dynamic) so the sublayer wont display in the legend widget
in example below, sublayers 2 and 3 will be displayed on the map and legend.
e.g
<layer  type="dynamic" label="Military"  url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer"  visible="true"
             visiblelayers="2,3"/>



Out of curiosity, do you know why symbols get symplified with "feature" option? Still not clear why raster refuses to show. I know that "feature" in config file is not equal "feature" as data type in ArcGIS so raster supposed to be OK.

When the layer is of type dynamic, symbol gets generated serverside.

When layer is type feature, the features are sent to the client machine along with its rendering information.
Flex api then reconstructs symbol from this definition. Rendering information that server sends contains simplified symbology.
See http://resources.arcgis.com/en/help/main/10.1/index.html#/Authoring_feature_services/0154000003nt000... for more info.

hope this helps.
Mehul
0 Kudos
AndreyZhalnin
Emerging Contributor
Mehul,
Thanks again. However this doesn't solve the problem. What you suggesting is just the way of making layers in the layer list visible ("checked") when you first open the map. What I need is to take layers that I don't need out of list completely since with "dynamic" type you see the list of all layers that is coming from mxd. From the AGS Flex Viewer design the appropriate way supposed to be using "feature" type but then I get those problems with symbology and labels. By the way labeling was done without Maplex engine, but all my layers missing them when added as "feature".
What about raster layers? Sample Flex Viewer maps from ESRI do not have raster examples, I assume they should work with "feature" type.

Legend widget honours visiblelayers attribute set on the layers tag  (type dynamic) so the sublayer wont display in the legend widget
in example below, sublayers 2 and 3 will be displayed on the map and legend.
e.g
<layer  type="dynamic" label="Military"  url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer"  visible="true"
             visiblelayers="2,3"/>



0 Kudos
by Anonymous User
Not applicable
Original User: mehu11111

What I need is to take layers that I don't need out of list completely  since with "dynamic" type you see the list of all layers that is coming  from mxd.


May be you could proxy your layer requests and in your proxy modify the response about the layer definition to include only the layer/sublayer that you want.
Other


Not sure if it would be feasible for you to create mxds such that it has multiple layers instead of sublayers with in the layers. in such case you could control visibility of the layers mentioned in previous thread and you could exclude other layers from layerlist/mapswitcher widget.

Mehul
0 Kudos