How do we display labels from Map Docment in Flex Viewer??

3208
11
Jump to solution
01-19-2012 12:03 PM
MichaelMiller2
Occasional Contributor III
We have a bunch of scale dependent highway shield labels we have set up in the Map Document that we would like to display using the map service in the Flex Viewer 2.5. They do not display when the map service instance is added to the Flex Viewer.  I've tried converting the labels to annotation, but that does not appear to be working either.  Is this possible?

Any help or direction is greatly appreciated.

Michael Miller
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Michael,

   A published map with annotation works fine in a map service when you add the map service as a dynamic layer. You can see this in may flex site including my own.

http://gis.calhouncounty.org/flexviewer2.0/

View solution in original post

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus
Michael,

   A published map with annotation works fine in a map service when you add the map service as a dynamic layer. You can see this in may flex site including my own.

http://gis.calhouncounty.org/flexviewer2.0/
0 Kudos
MichaelMiller2
Occasional Contributor III
Thanks Robert.
0 Kudos
SeanCook
New Contributor
Michael,

   A published map with annotation works fine in a map service when you add the map service as a dynamic layer. You can see this in may flex site including my own.

http://gis.calhouncounty.org/flexviewer2.0/


Could someone clarify this response a bit? Is the word annotation being used to mean normal labeling or labels converted to annotation before being uploaded? I assume the latter but can;t be positive. If I change my layer type from feature to dynamic, will it work as stated or is there more difference to a feature vs. dynamic layer that's not explained? I am about to spend an hour trying things that could be answered in three sentences.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sean,

   Both dynamic labeling and Actual Annotation Feature classes will display in the Map as Long as the layer is specified as other than feature.
0 Kudos
SeanCook
New Contributor
Sean,

   Both dynamic labeling and Actual Annotation Feature classes will display in the Map as Long are the layer is specified as other than feature.


Quick response, thanks! Now I feel bad for being snarky!
0 Kudos
CollinHorace
New Contributor II
Hey Robert,

I had this issue also in the past, but I still can not figure out how to resolve the issue with all of my labels and symbology connected to one layer in the table of contents. For example, I set my anno layer to dynamic, but all of the other layers are there too. I also have a few tools that have to work with feature service layers (search for example), similar to the web map that you posted the example for. I have attached my configuration file. Any quick help would be greatly appreciated. Thanks
0 Kudos
RhettZufelt
MVP Frequent Contributor
I see you are loading all the layers in the dynamic service.  Have you tried setting the visiblelayers in your dynamic service to only show the annotation layer?

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag/01m30000000p000000/

R_
0 Kudos
CollinHorace
New Contributor II
I just gave that a try. The anno layer is only turned on, with all of the other layers off. However, I still have missing symbology and labels. I still have to turn on my parcels under the grouped anno layer to see my parcel pins, for example. I would like it so that in the table of contents, checking a box next to a feature turns off the symbology, as well as the label. Can you provide me with any example? I am pretty new to flex. Thanks for the quick response.
0 Kudos
RhettZufelt
MVP Frequent Contributor
I just gave that a try. The anno layer is only turned on, with all of the other layers off. However, I still have missing symbology and labels. I still have to turn on my parcels under the grouped anno layer to see my parcel pins, for example. I would like it so that in the table of contents, checking a box next to a feature turns off the symbology, as well as the label. Can you provide me with any example? I am pretty new to flex. Thanks for the quick response.


Not sure what you mean here.  How do you know the anno layer is "turned on" if you don't see any labels?  Annotation layer will not show the parcel symbology, so would have to "turn on" the parcel layer to see the pins.  If you just want the anno layer AND parcel pins, set them both as visiblelayers.

You should be able to click a box next to the feature to turn ON the symbology, annotation, etc.  My first attempt would be to "fix" it in ArcMap if possible.  Is the map document you published behaving as you want?

If you want to be able to turn on the parcels and have the pins and labels show, I would try in ArcMap to remove the annotation layer and set the dynamic label properties of the parcel layer.  That way, when you turn on the parcel layer, it will also label as set up in ArcMap (scale dependancies, etc.).  Other option, if you like the anno layer better, would be to group the parcel layer and the anno layer together so that when you "click" the box, it turns both on.

In either case, I'd make sure that it is behaving in ArcMap as you like, then try to get it working in Flex.

Also, sometimes there is weird behavior using msd based services.  As a test, you may want to right click on the mxd in ArcCatalog and select "Publish to ArcGIS server" and try the map using this mxd based service.  this will publish as a mxd based service and will sometimes either fix off behavior or give one a clue as to what is casuing it.

R_
0 Kudos