Select to view content in your preferred language

Labels not displaying in ArcGIS Mobile Application

4178
11
02-20-2011 08:41 PM
SimonGurner
Emerging Contributor
Hello ArcGIS Mobile Gurus!

I am building a Desktop ArcGIS Mobile Application using C# Microsoft Vis Studio 2008 for data editing in the field using a tablet PC. I have an mxd that has a layer which I want to label, so in my mxd I have setup to layer on a field using Tahoma font size 8. It shows up in my mxd with my label - good as gold! I extract the data to a map cache using the Create Mobile Map tool in ArcCatalog (I want to create a standalone python script that does this and it does not work but that is a separate issue!). When I connect my map control all my layers display similarly to what they do in ArcMap but my labels do not appear!!! Why? I am NOT using any kind of expression to concatenate strings to form my label - I am just labelling straight off a field. But my labels do not appear. Does anyone have any ideas? This is very annoying and will make it difficult for my application to be a success.

Any help appreciated!

Regards,

Simon
0 Kudos
11 Replies
SimonGurner
Emerging Contributor
I see a reference in the ArcGIS Mobile help to the MapLayer::GetMaplayerLabelClass method. It is supposed to return the label class used by current map layer and allow you to turn the label on or off. But looking at the MapLayer class - the method does not exist??????
0 Kudos
JeffAzevedo
Deactivated User
I couldn't find the reference page for this, but I have read that labeling only supports default placement with no expressions and no Maplex. I had an expression that stacked some labels that didn't work. I removed the expression and used a single offset, and that too didn't work. Using the default placement with a single label however works fine. I hope there's a work around for this, but I believe this is the way it works by default.

If you find a solution please let us know.
0 Kudos
SimonGurner
Emerging Contributor
Hi Jeff,

Thanks for your reply. But I am not using any expression with my label. I am using default placement and no maplex. But my labels still do not display.

I thought it may have to do with my displayexpression on may map layer so I removed it, but still my labels do not display. I have no idea what is going on there! Am I missing some setting somewhere?

Again, any help is appreciated!
0 Kudos
AlvaroNavarro
Occasional Contributor
Hi Guys,

I am sure you have seen the help on what is supported in mobile maps:
http://help.arcgis.com/en/arcgismobile/10.0/help/index.html#//007v00000006000000.htm

I have found that sometimes labeling does not work, and still don't know why. But I think that it could be caused by strange characters in the string, or the field being labelled not being a text field. Having said that, I have managed to lable based on a Date field, for example.

The other alternative would be having an Annotation Feature Class to do the labeling, which at the same time should work much faster??.... as you probably know labeling is one of the trickiest operations in the GIS and I think that for mobile (devices + apps) it might be a bit too much.

Finally, I think that the key to a successful mobile project is simple maps for simple tasks, once it gets too complicated, then you should look at ArcPad, desktop, or engine applications to replace it.

Dont know if this is useful, just thought I'd comment as I have been living this recently.

Regards,

alvaro
0 Kudos
JeffAzevedo
Deactivated User
Try setting your Data Frame Properties specify extent to an outline of a feature.

The custom extent has botched one of my labels (I think) and once I set it to our City Limits feature, the custom extent now shows our labels.

There's some very odd behavior with Mobile, I hesitated even mentioning this as it doesn't seem logical, but it did fix this particular cache I have.
0 Kudos
glennmeister
Emerging Contributor
Hey Folks,

    Not sure on the issue here, but see that you have found a mistake in our documentation for the MapLayer class, since the MapLayerLabelClass were removed at 10.0 release. This was done to simplify the implementation so that labels are now just part of the layer.

As for the labels not displaying, I would suggest trying to zoomin on the features, to see if they will draw at different scales, which is using the ArcMap settings. At certain scales you may see the feature but not the symbol, since the labeling is a bit more complex.
Not if you look at the SDK walkthrough sample the labels do not draw at the intial extent, but will show once you zoom in enough.

If the labels do not appear at different scales perhaps you could attach a small screenshot, to illustrate the data.
0 Kudos
AngieAllison
Emerging Contributor
I found that you need to set the placement properties to Allow overlaps
0 Kudos
CiprianLazar
Deactivated User
I got the same problem with labeling recently and as I found out from this thread, my problem was from the subtypes of the layers (a software defect logged as NIM061212: Labels do not persist in a Mobile Map Cache if there is a subtype field present in the data.)
0 Kudos
DeniseKing
Esri Regular Contributor
If a post provides the answer to your question, then we encourage you to mark the post as "the answer" by activating the green check mark  right of the post. You can also "vote" on posts that you find helpful by clicking the blue caret mark. More information about the ArcGIS Discussion Forums MVP Program found here.

Thank you,
Esri Support
0 Kudos