ESRI.ArcGIS.Mobile
MapSurface Class
Members  See Also  Send Feedback
ESRI.ArcGIS.Mobile Namespace : MapSurface Class

Wraps a Graphics instance and provide additional methods and properties to draw on the Graphics using Map coordinates.

Object Model


Syntax

Visual Basic (Declaration) 
Public Class MapSurface 
C# 
public class MapSurface 

Remarks

You can get access to MapSurface object through the Map.MapPaint event where it's available as a MapPaintEventArgs.

The MapSurface class allows you to draw graphics, text, or images on map control for displaying purpose or as a way to provide additional information to end users, such as a customized text showing map title, drawing feedback on screen following user's mouse movements, or showing a company logo.

Please note that elements (graphics, texts, images) placed on MapSurface won't persist, which implies that developer needs to take care of keeping these elements and redrawing them again when the map gets re-painted.

Also note that the MapSurface class will draw elements after all other layer drawings had been completed. The Map component will draw layers from mobile cache first, then any MapGraphicsLayer (if available), and lastly the elements drawn by MapSurface class.

The MapSurface class provides a full set of methods to draw various types of elements on MapSurface. Among them, the DrawGeometry method will enable you to draw a geometry with customized pen and brush,. As a commonly used method, DrawText will place a customized text on screen, and the MeasureText method allows for measuring of the specified string when drawn with the Font object you specified.

The following methods draw various types of graphics: DrawPoint, DrawMultipoint, DrawLine, DrawPolyline, DrawPolygon, and DrawEnvelope.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Mobile.MapSurface

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.