Select to view content in your preferred language

Layer labels won't display in Flex App

3312
7
Jump to solution
03-19-2013 04:27 PM
IgorBalotsky1
Regular Contributor
I am currently using ArcGIS 10.1 Desktop and Server. The MXD I am currently working on is very simple and has shape layers with the Labels feature enabled, and the labels are showing correctly in the MXD. I published this MXD as a service to my ArcGIS Server and then used ArcGIS Viewer for Flex to create a new application and then reference all of the feature layers from the service I just deployed. When I view the Flex App in the browser, the issue I am having is that all of my labels have disappeared and there is no way in ArcGIS Viewer for Flex to enable the label text to display.

I had the same issue with opacity when I made my layers 50% transparent in the MXD but this would not translate over to the Flex App after deployment, but then discovered an easy way to set the transparency of the layers in the Application Builder. So how would I get these layer labels to appear in my Flex App? Any ideas would greatly help.

Thanks,
Igor
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IgorBalotsky1
Regular Contributor
Never mind, I was adding each layer individually into the "Selected Operational Layers" section. When I added the folder to the section, it appeared as a dynamic service and then I could see the labels.

Thanks,
Igor

View solution in original post

0 Kudos
7 Replies
BjornSvensson
Esri Regular Contributor
...then reference all of the feature layers ...


If you add the map service as a one "dynamic", aka ArcGISDynamicMapServiceLayer, instead of as individual feature service, then it will work.  Or is there a specific reason that you are not doing it that way?
0 Kudos
IgorBalotsky1
Regular Contributor
[ATTACH=CONFIG]22796[/ATTACH]

Bjorn,

When I publish the map as a service from ArcMap, when I am in the Service Editor, I am specifying to draw the map "Dynamically from the data" instead of using tiles from a cache, but I get the same results and the label text still doesn't show in the Flex App.

Thanks,
Igor
0 Kudos
IgorBalotsky1
Regular Contributor
Never mind, I was adding each layer individually into the "Selected Operational Layers" section. When I added the folder to the section, it appeared as a dynamic service and then I could see the labels.

Thanks,
Igor
0 Kudos
MatthewGubitosa
Deactivated User
ESRI, it would be nice to fix this problem.  Single-layer map services require two clicks in the layer list to see the symbology, something I'd prefer not to subject end-users to.  It would be preferable to be able to add the individual layers and have the labeling work like it's supposed to.
0 Kudos
BjornSvensson
Esri Regular Contributor
ESRI, it would be nice to fix this problem.  Single-layer map services require two clicks in the layer list to see the symbology, something I'd prefer not to subject end-users to.  It would be preferable to be able to add the individual layers and have the labeling work like it's supposed to.


Hi Matthew, I just want to make sure I understand your problem(s) correct.  In Igor's case, I think there were two issues: transparency and labelling.

Is your concern that you want people to see the symbology in the "More/LayerList" directly without having to first expand the map service, then expand the layer? 

And/or is that the labelling work differently when you add a map service (type=dynamic or tiled) as opposed to a layer within a map service (type=feature)? 
Our main technical challenge here is that in the first case the "image" you see is created on the server (which has more labelling smartness) than in the second case when the "image" is created clientside.
0 Kudos
MatthewGubitosa
Deactivated User
Yes, the main concern is I would like the users to see the symbology in the "More/LayerList" directly without having to first expand the map service, then expand the layer - and I would also like the users to see the labels.

I have replaced the individual layers with the whole services and now the labels do render as intended. But there is now another problem: the layers within these services are not accessible by the Attribute Table Widget.  They simply do not appear in the checkbox dialog for that widget in Application Builder.  Is it possible to coerce them into appearing by directly editing the widget's xml configuration file?  Or, would any of these problems be solved by using ArcGIS Server 10.1 SP1?  I am now using services from a Server 10.0 SP5 install (in Flex 3.2).
0 Kudos
BjornSvensson
Esri Regular Contributor
Yes, the main concern is I would like the users to see the symbology in the "More/LayerList" directly without having to first expand the map service, then expand the layer


You can do this using the <expandlayeritems> tag for both LayerList and MapSwitcher widget.  However, it has a bug and only works sometimes.  This will be fixed for the next release (3.3).
http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_List_widget_tag/01m300000...
https://github.com/Esri/arcgis-viewer-flex/issues/103


- and I would also like the users to see the labels. I have replaced the individual layers with the whole services and now the labels do render as intended.

Good 🙂

But there is now another problem: the layers within these services are not accessible by the Attribute Table Widget.  They simply do not appear in the checkbox dialog for that widget in Application Builder.  Is it possible to coerce them into appearing by directly editing the widget's xml configuration file? 


This will work in the next version (3.3).  (Currently, it only works if your map service have a matching feature service.)
https://github.com/Esri/arcgis-viewer-flex/issues/98

Or, would any of these problems be solved by using ArcGIS Server 10.1 SP1?  I am now using services from a Server 10.0 SP5 install (in Flex 3.2).

No, upgrading will not help in this case.
0 Kudos