Feature Labels in Flex Viewer

5508
25
01-17-2011 04:58 PM
NadeemShaukat
New Contributor II
I have scale dependent labels for features in my dynamic service but they are not showing up in the Flex Viewer environment. However, they show up if I use the same service in an application outside the Flex Viewer.

Is anyone else experiencing the same?

If anyone at ESRI knows the reason, please respond.

Thanks

Nadeem
Tags (2)
25 Replies
NadeemShaukat
New Contributor II
I have another issue related with Flex and Flex Viewer that I had posted 2 weeks ago on the Flex Viewer forum but user community did not respond. It's about rotating labels on a chart axis in Flex Viewer environment.

I wonder if ESRI flex team can respond. The link for the post is http://forums.arcgis.com/threads/21011-Labels-Rotation-on-Line-Chart-Axis-in-a-Widget?highlight=Nade...

Nadeem
0 Kudos
DonCopple
Occasional Contributor III
OK, I finally figured out the solution to this question, and yes it will pick up the lablels you have specified on your GIS server.  I encountered this problem until I  changed the type from tiled,or feature, to "dynamic"  and then just specify the mapserver url, not a specific layer number for the layers map server.  So it would look like the following:

<layer label="Your Layer" type="dynamic" visible="false" alpha ="0.7"
               url="http://gis.srh.noaa.gov/ArcGIS/rest/services/SPC_Convective_outlooks/MapServer"/>

Good luck
0 Kudos
JohnTuohy
New Contributor II
Is there a way to have your labels appear in your flex viewer application, much the way that they appear in your ArcGIS map sessions? Where you don't have to click to see a label?
0 Kudos
RhettZufelt
MVP Frequent Contributor
John,

If you publish the service with the labels on in ArcMap, and you load into the flexviewer as dynamic (like above post), you should see the labels as they appear in ArcMap.

It will even honor scale dependant labeling.

If you load as tiled, you would have to re-generate all you tiles after you have turned on the labels and re-published the service.

R_
0 Kudos
DanPrice
New Contributor II
Rhett
Please forgive me as I am brand new in flex viewer (like 2 days old), but how do you load into flex viewer as dynamic?  Is this done wihin the MXD, the publishing process, or within flex viewer itself?  When I add the published map service from my GIS Server into the flex viewer into the map from the Operational Layers, there is no option for dynamic.  Do I have to add the script somewhere (like in Don' post)?

Basically I want to add my address points (with the house number labeled on top of the point) & our city govermental district polygons (and label them as "District 1"... "District 2"... etc) to our flex viewer map.  When I started my flex viewer map it showed the address labels, but when I added the district polygons with labels, nothing is showing up now.

Thanks
Dan
0 Kudos
MatthewMalone
Occasional Contributor
I'd also like to follow up on cub_fan_dan's post about the labeling capabilities.  Basically, I'm in the same boat.  We're trying to transition from the .NET interface to Flex using the Flex Builder application.  We're also running into the issue of dynamic labels.  I've published my MXD from ArcGIS for Desktop 10.1 with the labels turned on with scale dependencies, but they don't draw in the Flex app.  Based on this thread, I altered the config.xml and set my layer type to "dynamic" which is recognized when you re-open the app in Flex Builder, but then it locks up the Builder when you attempt to edit this reclassified dynamic layer.

I'm really impressed with the Flex Builder, but somewhat shocked that such a rudimentary and critical function such as labeling isn't simplified in this tool.  Hopefully this thread will shed some more light on adding these functions directly into the Flex Builder interface.

Thanks!
-Matt
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

    Your issue is not the App Builder program it is your use and understanding of how to add operational layers. If you look in my attached graphic you will see when I choose a map service and chick on a map service (represented by the folder icon, number one in the image) and then click the Include button. It will add the Whole map service as a dynamic layer (that supports the drawing of label that are setup in ArcMap). You you double click the folder then you get a list of individual layers of that map service and when you choose one of those layers and click include that LAYER of the Map Service gets add and is added to the map as a feature layer (which does not support labeling). So just click the map service folder (not choosing individual layers) and you will be able to add dynamic layers to the map.

[ATTACH=CONFIG]22959[/ATTACH]
0 Kudos
GISDev1
Occasional Contributor III
I'd also like to follow up on cub_fan_dan's post about the labeling capabilities.  Basically, I'm in the same boat.  We're trying to transition from the .NET interface to Flex using the Flex Builder application.  We're also running into the issue of dynamic labels.  I've published my MXD from ArcGIS for Desktop 10.1 with the labels turned on with scale dependencies, but they don't draw in the Flex app.  Based on this thread, I altered the config.xml and set my layer type to "dynamic" which is recognized when you re-open the app in Flex Builder, but then it locks up the Builder when you attempt to edit this reclassified dynamic layer.

I'm really impressed with the Flex Builder, but somewhat shocked that such a rudimentary and critical function such as labeling isn't simplified in this tool.  Hopefully this thread will shed some more light on adding these functions directly into the Flex Builder interface.

Thanks!
-Matt


Hey Matt, I'd recommend just go with editing the .xml. The App. Builder is really for people that are not comfortable with editing the .xml, and given that you're a GIS Coordinator and GISP, you should have no issue with that. Your life will be much better just getting the job done in the .xml vs. using a GUI.
0 Kudos
DanPrice
New Contributor II
Robert
Thank you.  That helps & I have a greater understanding of this.

GISDev01
Thank you as well.  I'd like to get into xml more & more but they got me bogged down creating pretty maps & drawings rather than actually advancing our organizations GIS...sigh.
0 Kudos
ElizabethDonahue
New Contributor III
OK, I finally figured out the solution to this question, and yes it will pick up the lablels you have specified on your GIS server.  I encountered this problem until I  changed the type from tiled,or feature, to "dynamic"  and then just specify the mapserver url, not a specific layer number for the layers map server.  So it would look like the following:

<layer label="Your Layer" type="dynamic" visible="false" alpha ="0.7"
               url="http://gis.srh.noaa.gov/ArcGIS/rest/services/SPC_Convective_outlooks/MapServer"/>

Good luck


This worked perfectly Thanks!
0 Kudos