Visual Basic (Declaration) | |
---|---|
Public Class MapSurface |
C# | |
---|---|
public class MapSurface |
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.
ESRI.ArcGIS.Mobile.MapSurface
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