ESRI.ArcGIS.ADF.Web.UI.WebControls
Draw(Map,Int32,Envelope,Int32,Int32,ScaleBarUnits) Method
See Also  Send Feedback
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > ScaleBar Class > Draw Method : Draw(Map,Int32,Envelope,Int32,Int32,ScaleBarUnits) Method




map
Map control to define scale.
dpi
DPI to use while rendering image.
extent
Envelope used to determine proper scale.
mapWidth
Width in pixels used to determine proper scale.
mapHeight
Height in pixels used to determine proper scale.
sbUnits
Scalebar units to be used when computing scale bar values/distances.
Draws the scalebar at the desired DPI and stores the result in a cartographic image object.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Draw( _
   ByVal map As Map, _
   ByVal dpi As Integer, _
   ByVal extent As ESRI.ArcGIS.ADF.Web.Geometry.Envelope, _
   ByVal mapWidth As Integer, _
   ByVal mapHeight As Integer, _
   ByVal sbUnits As ESRI.ArcGIS.ADF.Web.ScaleBarUnits _
) As ESRI.ArcGIS.ADF.Web.CartoImage
Visual Basic (Usage)Copy Code
Dim map As Map
Dim dpi As Integer
Dim extent As ESRI.ArcGIS.ADF.Web.Geometry.Envelope
Dim mapWidth As Integer
Dim mapHeight As Integer
Dim sbUnits As ESRI.ArcGIS.ADF.Web.ScaleBarUnits
Dim value As ESRI.ArcGIS.ADF.Web.CartoImage
 
value = ScaleBar.Draw(map, dpi, extent, mapWidth, mapHeight, sbUnits)
C# 
public static ESRI.ArcGIS.ADF.Web.CartoImage Draw( 
   Map map,
   int dpi,
   ESRI.ArcGIS.ADF.Web.Geometry.Envelope extent,
   int mapWidth,
   int mapHeight,
   ESRI.ArcGIS.ADF.Web.ScaleBarUnits sbUnits
)

Parameters

map
Map control to define scale.
dpi
DPI to use while rendering image.
extent
Envelope used to determine proper scale.
mapWidth
Width in pixels used to determine proper scale.
mapHeight
Height in pixels used to determine proper scale.
sbUnits
Scalebar units to be used when computing scale bar values/distances.

Return Value

Cartographic object that encapsulates the scalebar image.

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

© 2011 All Rights Reserved.