Just finished building my first mobile map in ArcGIS mobile project center and opened it in ArcGIS for windows mobile but quickly realized there is no way to turn on a legend to show what the symbology represents?

Is there a way to display a legend?

  • Does MapPage not have a "Layer visibility..." item in the menu? resources.arcgis.com/en/help/windows-mobile-sdk/concepts/… – Thomas Oct 19 '15 at 16:54
  • Layer visibility allows you to turn on and off layers - it doesn't show what symbols represent which layers. I'm looking for something like the following: Legend Road ====== River ~~~~~~~~ Commercial Land ///// – Greg Rodger Oct 19 '15 at 17:26

If you're looking for a properly symbolized legend in ArcGIS for Windows Mobile, you will unfortunately have to write your own implementation using the LegendItem class to render the swatches.

As a start, you would do something similar to this...

size = new Size(25, 25);  
IList<LegendItem> legendList = layer.Renderer.GetLegendSwatches(YOUR_PANEL.BackColor, size.Width, size.Height);  
if (legendList != null)  
  foreach (LegendItem legendSwatch in legendList)  
    PictureBox picture = new PictureBox();  
    picture.Size =  size;   
    picture.Image = legendSwatch.Image;  
    picture.Location = // .......
  • I trust Thomas' answer but will never have the time to implement. Unfortunate that the off the shelf app doesn't have a legend. – Greg Rodger Oct 20 '15 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.