Map resources provide access to map data; which includes map images (dynamic and static), feature symbolization and rendering, and feature attributes. The IMapResource interface defines the generic properties used to store display settings, such as transparency of the map image generated by the resource, and map information, such as default extent and spatial reference details. Map resources are available in a Web ADF application via a MapResourceManager control.
Managed by: MapResourceManager control
Implemented by: ArcGIS Server Local, ArcGIS Server Internet, ArcIMS, ArcWeb, OGC\WMS, Microsoft Virtual Earth
Functionality types created : IMapFunctionality, IQueryFunctionality, IMapTocFunctionality, ITileFunctionality, IScalebarFunctionality
The following table lists some important properties and method available for all resources via the IMapResource interface:
| Property or Method | Description |
|---|---|
| DisplaySettings | Access and configure map display settings, such as transparency, transparent background color, and visibility. |
| MapInformation | Access map resource defaults for extent and spatial reference |
| CreateFunctionality() | Available via the IGISResource interface. Often used to create a QueryFunctionality. |
| SupportsFunctionality() | Available via the IGISResource interface. Used to determine if a functionality type is supported by a resource. |
The following code example shows how you can generically access and work with a map resource without knowing the underlying data source. Note that the code is working with the Common API interface IMapResource - no specific data source is mentioned. The first resource in a MapResourceManager control is returned, its visibility set to true, and the transparency for the map image generated by the resource is set to 50% (or 50.0). The variable "MapResourceManager1" references a MapResourceManager control.
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); mapresource.DisplaySettings.Visible = true; mapresource.DisplaySettings.Transparency = 50.0F;Data source specific implementations of IMapResource can provide data source specific references. To get a reference to a data source specific map resource, cast to the appropriate type. Each supported data source, its namespace, and the unique capabilities it provides are discussed below.
ArcGIS Server - ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer
Both ArcGIS Server Local and Internet data sources share some implementation details in an abstract base class, MapResourceBase (map services) and ImageResourceBase (image services). Since both data sources work with services using the ArcGIS Server SOAP API, some properties and methods are shared. See the ArcGIS Server implementation in the Web ADF discussion topic for more information. In general, both work with Value objects in the Web ADF and communicate with the GIS Server using a proxy class. The table below lists some of the shared properties for MapResourceBase and ImageResourceBase:
|
MapResourceBase
Property or Method |
Description |
|---|---|
| MapDescription | Access and modify a reference to a MapDescription Value object. Used by the Web ADF for state management. |
| Service | Name of the map service used by the map resource. |
| MapServerProxy | Access to the MapServerProxy used to manage SOAP requests and responses to an ArcGIS Server service. |
|
ImageResourceBase
Property or Method |
Description |
|---|---|
| ImageServiceInfo | Information about the image service. |
| Service | Name of the image service used by the map resource. |
| ImageServerProxy | Access to the ImageServerProxy used to manage SOAP requests and responses to an ArcGIS Server service. |
| ImageResourceDefinition | Access to the image resource definition which contains the GeoImageDescription used to generate a new map image. |
If you do not need to work with a specific capability of a Local or Internet type of ArcGIS Server resource, a reference to the base class can be used. The following code example shows how you can retrieve the name of an ArcGIS Server service via the MapResourceBase class.
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceBase ags_mapresourcebase = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceBase) mapresource; string ags_servicename = ags_mapresourcebase.Service;
ArcGIS Server Local
All ArcGIS Server Local resources work with ArcGIS Server services via a server object and manage server context. Local implementation is handled within the MapResourceLocal class. As a developer, you do not need to explicitly create and release server context if working with a server object as a Web ADF resource. The Web ADF resource manager control manages server context for you.
| Property or Method | Description |
|---|---|
| ServerContextInfo | Provides access to a ServerContextInfo object, which exposes access to server context, server object name and type. |
| MapServer | Provides access to ArcObjects IMapServer. |
| ApplyMapDescriptionToServer() | Make a stateful change to the server object instance on the GIS Server. Apply the current resource MapDescription to the server object. Usually called once changes to a MapDescription need to be saved to a server object instance. Uses the ESRI.ArcGIS.Carto.IMapServerObjects ApplyMapDescription() method. |
| RefreshServerObjects() | Make a stateful change to the server object instance on the GIS Server. Apply the fine-grained ArcObjects changes to the server object instance. Uses the ESRI.ArcGIS.Carto.IMapServerObjects RefreshServerObjects() method. |
| MapServerProxy | Access to the MapServerDcomProxy used to manage SOAP requests and responses to a server object via the IRequestHandler interface. |
The following code example illustrates how to create a COM object on the GIS Server using server context:
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0);
ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal ags_mapresourcelocal =
(ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal) mapresource;
ESRI.ArcGIS.Server.IServerContext com_servercontext = ags_mapresourcelocal.ServerContextInfo.ServerContext;
ESRI.ArcGIS.Geometry.IPoint com_point = (ESRI.ArcGIS.Geometry.IPoint) com_servercontext.CreateObject("esriGeometry.Point");
ArcGIS Server InternetAll ArcGIS Server Internet resources work with ArcGIS Server services via a Web service endpoint. Internet implementation is handled within the MapResourceInternet class. You do not have access to server context via an ArcGIS Server Web service. Communication with a ArcGIS Server Web service is only available via the ArcGIS Server SOAP API.
| Property or Method | Description |
|---|---|
| MapServerProxy | Access to the MapServerProxy used to manage SOAP requests and responses to a Web service endpoint. |
| Url | Url string to the ArcGIS Server Web service endpoint for the map resource. |
The following code example illustrates how to call a method on the Web service proxy to get the default map name of an ArcGIS Server service associated with an ArcGIS Server Internet map resource:
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceInternet ags_mapresourceinternet = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceInternet) mapresource;
ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy ags_mapserverproxy = ags_mapresourceinternet.MapServerProxy;
string ags_defaultmapname = ags_mapserverproxy.GetDefaultMapName();
ArcIMS - ESRI.ArcGIS.ADF.Web.DataSources.IMS
ArcIMS resources work with ArcIMS ArcMap and image services via HTTP or TCP. The ArcIMS API is the implementation framework for ArcIMS capabilities in the Web ADF. Two classes in the ArcIMS API provide the ability to work with an ArcIMS map service, MapService and MapView. ArcIMS is inherently stateless, but the ArcIMS MapResource has the ability to maintain state on the client (Web-tier). As a result, changes to a MapService or MapView can be maintained for the duration of a session. In most cases, you'll work with the MapView from an ArcIMS MapFunctionality to interact with ArcIMS specific capabilities.
| Property or Method | Description |
|---|---|
| MapService | Access to the ArcIMS API ESRI.ArcGIS.ADF.IMS.Carto.MapService object. Default extent, connection and service information are available. |
| MapView | Access to the ArcIMS API ESRI.ArcGIS.ADF.IMS.Carto.MapView object. The MapView is the primary object for working with an ArcIMS map service. It is designed to generate map images, query features, extract data, etc. |
The following code example illustrates how to use the ArcIMS MapResource's MapService property to get an ArcIMS service name:
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapResource ims_mapresource = (ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapResource) mapresource; ESRI.ArcGIS.ADF.IMS.Carto.MapService ims_mapservice = ims_mapresource.MapService; ESRI.ArcGIS.ADF.Connection.IMS.IMSServerConnection ims_connection = ims_mapservice.Connection; string ims_mapservicename = ims_connection.ServiceName;
ArcWeb - ESRI.ArcGIS.ADF.Web.DataSources.ArcWebService
ArcWeb resources work with ArcWeb map image services available using at the following url: http://www.arcwebservices.com/services/v2006/MapImage.wsdl. ArcWeb services require that a user be authenticated before browsing the available map services. The ArcWeb MapResource manages authentication token creation and renewal. Since ArcWeb can only be accessed via its SOAP interface, the Web ADF includes the MapImage proxy and associated Value objects to work with the Web service - available in the ESRI.ArcGIS.ADF.ArcWebService assembly\namespace. The ArcWeb data source implementation of the Web ADF Common API utilizes the proxy and value object classes.
| Property or Method | Description |
|---|---|
| MapImageProxy | Access to the ArcWeb API ESRI.ArcGIS.ADF.ArcWebService.MapImage proxy object. Manages SOAP serialization\deserialization to communicate with remote ArcWeb MapImage Web service. |
| AuthenticationToken | Access to the ArcWeb API ESRI.ArcGIS.ADF.ArcWebService authentication token string used by the ArcWeb resource. |
The following code example illustrates how to use the ArcWeb MapResource to get a reference to the MapImageProxy and send a SOAP request directly to the MapImage ArcWeb service. The new request can create a new map image outside of the Web ADF. The MapImageOptions Value object included in the code sample (mapImageOptions argument) is part of the ArcWeb API and defines the properties, such as data source, map images size, and style sheet, used to create a map image. Additional developer information on the use of the ArcWeb API for SOAP Web services is available on the EDN documentation Web site.
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); ESRI.ArcGIS.ADF.Web.DataSources.ArcWebService.MapResource arcweb_mapresource = (ESRI.ArcGIS.ADF.Web.DataSources.ArcWebService.MapResource)gisresource; ESRI.ArcGIS.ADF.ArcWebService.MapImage arcweb_mapimageproxy = arcweb_mapresource.MapImageProxy; string arcweb_token = arcweb_mapresource.AuthenticationToken; ESRI.ArcGIS.ADF.ArcWebService.MapImageInfo arcweb_mapimageinfo = arcweb_mapimageproxy.getBestMap(mapImageOptions, 100, arcweb_token); string arcweb_mapurl = arcweb_mapimageinfo.mapURL;
OGC\WMS - ESRI.ArcGIS.ADF.Web.DataSources.OGCWMSService
OGC\WMS map services are based on an open source standard for providing map data over the Web. Each map resource is associated with a unique url defined by a hostname, path, and a set of argument\value pairs. Additional information is provided on the OGC Web site for the Web Mapping Standard (WMS) . Since working with a WMS service is defined by url parameters, a separate API apart from the Common API implementation is not included with the Web ADF.
| Property or Method | Description |
|---|---|
| ServiceDefinition | Access to a string of layer ids in the WMS service |
| Website | Access to the Web site url of the WMS service |
The following code example illustrates how to use the OGC\WMS MapResource's Website property to get the url to the remote WMS service:
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapResource ogc_mapresource = (ESRI.ArcGIS.ADF.Web.DataSources.IMS.MapResource) mapresource;
string ogc_url = ogc_mapresource.Website;
Graphics - ESRI.ArcGIS.ADF.Web.DataSources.Graphics
Graphics resources are maintained in-memory by the Web ADF on the Web-tier. They can be added to MapResourceManager, but are utilized programmatically. A graphics resource is really a standard ADO.NET DataSet extended for use by the Web ADF to store temporary features. An ADO.NET DataSet can contain multiple DataTables. Likewise a Web ADF graphics resource can contain multiple graphics layers. The Web ADF "Graphics" API utilizes numerous classes in the ESRI.ArcGIS.ADF.Web assembly. See the graphics layer discussion for additional information on graphics layer types.
| Property or Method | Description |
|---|---|
| Graphics | Access to the ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsDataSet. The GraphicsDataSet manages rendering one or more graphics layers. |
The following code example illustrates how to add a new, empty ElementGraphicsLayer to a GraphicsDataSet for a graphics map resource:
[C#]
IMapResource mapresource = MapResourceManager1.GetResource(0); ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource graphics_mapresource = (ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource) mapresource; ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer eglayer = new ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer(); graphics_mapresource.GraphicsDataSet.Add(eglayer);
In most cases, you'll work with a map resource from the perspective of an existing Map control - which means you'll access the MapFunctionality first. Map functionalities are discussed in the next section.
MapFunctionality: IMapFunctionality
The Map control is the primary consumer of MapResources. The Map uses each MapResource to generate a MapFunctionality. MapFunctionality provides a Resource property to get a reference to a generic IMapResource and a MapResource property to get a reference to data source specific MapResource class. A Map control provides two methods to get one or more functionality instances: Map.GetFunctionalities() returns a list of IMapFunctionality instances, Map.GetFunctionality(argument) return a single IMapFunctionality instance based on the argument value, an index or resource name.
From a developer perspective, a MapFunctionality is generally used to do to one of three things: 1) get some metadata about a map resource, such as list of layer names and ids, scale or spatialreference 2) draw a map or 3) work with data source specific capabilities of a map resource.
| Property or Method | Description |
|---|---|
| SpatialReference | Provides access to the spatial reference of the map resource |
| DisplaySettings | Provides access to properties and methods used to change the display of a map image generated by the functionality. |
| MaintainsState | Determines if the Web ADF uses the functionality or resource to maintain state. Changes the reference of the business object (if available) and DisplaySettings reference. |
| GetLayers() | Get a array or layer names and ids in the map resource. |
| Get\SetLayerVisibility() | Change layer visibility in the map. |
| GetScale() | Returns the scale (map units per pixel) using the current state of the map functionality |
| DrawExtent() | Creates a map image |
| Supports() |
Determine if an operation is supported by the functionality. The operation is the name of a member (e.g. method, property) on the functionality. For example, to check if the GetScale() method is supported, pass the "GetScale" string as the operation to the Supports() method. True will be returned if the operation is supported and false if unsupported. |
As a Common API interface, IMapFunctionality can be used generically without knowing the data source type. Keep in mind that a map functionality is considered a single layer in a Web ADF Map control - but the map functionality may contain many layers itself. To get a list of layer ids and names for each map functionality in a Map control, use the GetFunctionalities() method on the Map control and use the GetLayers() method on the map functionality. Note that we working completely within the Common API, no specific data source is referenced:
[C#]
IEnumerable func_enum = Map1.GetFunctionalities();
foreach (ESRI.ArcGIS.ADF.Web.DataSources.IGISFunctionality gisfunctionality in func_enum)
{
ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality mf;
mf = (ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality)gisfunctionality;
string[] layerids;
string[] layernames;
mf.GetLayers(out layerids, out layernames);
}
One important aspect of a map functionality is that the Web ADF uses it to maintain state for the duration of a user session. A map functionality stores references to objects associated with map generation, such as visible layers, image properties, and a data source specific business object. The Web ADF utilizes data sources in a stateless manner, meaning no state is stored by the data source. Instead, the Web ADF is designed to be shallowly stateful, which means it stores state on the client (Web-tier). As a result, you can change properties of a map functionality at runtime and have them be maintained for the duration of the current session. For example, when adding server-side graphics to a MapFunctionality (e.g. GraphicElements to MapDescription for ArcGIS Server data sources or an AcetateLayer to a MapView for ArcIMS data sources), they are maintained across requests to the data source, without re-adding or explicitly managing the graphics. Working with data source specific implementations of IMapFunctionality are discussed in the topic Accessing a data source specific API. Of the available functionalities and resources, only MapFunctionality and MapResource are designed to maintain state.
State Management and the MaintainsState Property
Each MapFunctionality may work with one or more business objects that hold state for a specific data source. For ArcGIS Server MapFunctionality it's MapDescription. For ArcIMS MapFunctionality it's MapView. The MapResource should also expose an object of the same type with the sample property reference. MapFunctionality has a MaintainsState property which is a Boolean. If MaintainsState is true, the business object (MapDescription or MapView) exposed by the MapFunctionality is different than the one at the MapResource level. If MaintainsState is false, which is the default, then MapFunctionality.MapDescription is just a pointer to its resources copy of the MapDescription. As a result, modifications to the MapDescription will be reflected in all MapFunctionality instances that share the same resource.
How state is used is dependent on application requirements. The MaintainsState properties allows a MapFunctionality to have control over its own state, if the use case calls for it. Such a use-case might be a magnify window that is accessing the same data as the map, but at a different extent. The MapFunctionality that the magnify window uses would have its MaintainsState property set to true since it needs to use a different extent than the Map’s MapFunctionality object. To maintain state at the map functionality level, programmatically set the map functionalities MaintainsState property to true.
The code provided below illustrates this point:
[C#]
public MapView MapView
{
get
{
if (maintainsState)
{
return mapView;
}
else
{
return MapResource.MapView;
}
}
}
This code indicates how the ArcIMS MapFunctionality implementation for the
MapView property works. If maintainsState is true, it returns
a local MapView instance. However, if it doesn’t maintain its own state, it
returns the MapView exposed by the resource.
ImageMapFunctionality:
IMapFunctionality
ImageMapFunctionality is only implemented for ArcGIS Server data sources that host image services. ArcGIS Server image services are designed to host raster data and generate dynamic map images. ImageMapFunctionality only implements some of the members defined by IMapFunctionality. In most cases you will use the ImageMapFunctionality to gain access to the ImageResource which contains information about the image service, such as band names and ids, and the image resource definition. The definition will contain a reference to the GeoImageDescription, an ArcGIS Server SOAP value object type which contains detailed information about the properties of the map image requested from the service. The GeoImageDescription is defined at design-time as part of a map resource item or modified at runtime via the ImageResource.ImageResourceDefintion property.
The resource definition string for an image resource item (image service) is formatted as follows:
{"type":"ImageServer","service":"<service name>","imageDescription":{"bandIds":"<band ids>",
"compressionQuality":<compression quality>}}
The JSON formatted string consists of three name-value pairs: type, service, and imageDescription. You can add properties to the imageDescription array of values to modify the dynamic map image generated by the image service. Only compression, noData, interpolation, and pixelType are supported. The properties reflect the GeoImageDescription created to generate a new map image. For example, define a NoData value equal to 89 to render pixels with a data value of 89 as transparent.
{"type":"ImageServer","service":"MyImageService","imageDescription":{"bandIds":"0",
"compressionQuality":0, "noData":89}}
QueryFunctionality: IQueryFunctionality
QueryFunctionality is implemented for data sources that provide the
ability to perform spatial and attribute queries on feature data. As a
developer, you will explicitly create a QueryFunctionality using the
MapResource.CreateFunctionality() method. In most cases, you will
only need to work with the Common API reference, IQueryFunctionality,
instead of explicitly casting to a data source implementation type.
| Property or Method | Description |
|---|---|
| GetQueryableLayers() | Return an array of layer names and ids in a map resource that contain feature data and can be queried. |
| GetFields() | Return an array of field names in a layer within a map resource. |
| Find() | Search the attributes of one or more layers in a map resource for the occurrence of a value. Returns a DataTable array. |
| Identify() | Perform a spatial query on one or more layers in a map resource. The spatial component of the query consists of a geometry object and tolerance (or buffer) around the geometry. Returns a DataTable array. How tolerance is used depends on the type of data source. See the ADF .NET library reference for further details. |
| Query() | Perform a spatial or attribute query on one layer in a map resource. Returns a DataTable. |
| Supports() |
Determine if an operation is supported by the functionality. The operation is the name of a member (e.g. method, property) on the functionality. For example, to check if the Identify() method is supported, pass the "Identify" string as the operation to the Supports() method. True will be returned if the operation is supported and false if unsupported. |
The first two methods are used to discover information about the map resource that can be used in a subsequent query. The System.Data.DataTable returned from the final three methods is a standard ADO.NET data object. If Web ADF geometries were returned from a query, it can be used as a Web ADF graphics layer in a graphics resource. The DataTable can also be used to display tabular data in a GridView. The following code example illustrates how to iterate through all the map resources in a map (named "Map1"), query each queryable layer, and add the DataTable returned to a System.Data.Dataset for future use. A few items to note:
- No data source specific classes are used, only Common API interfaces. This is an example of working with the Common API in a data source agnostic manner.
- The IGISResource.SupportsFunctionality() method determines if a map resource supports the ability to query layers by checking whether it supports IQueryFunctionality.
- The IGISResource.CreateFunctionality() method creates an instance of a QueryFunctionality. Although it is an implementation type, the Web ADF can still use the generic interface IQueryFunctionality.
- The Web ADF maintains it's own set of classes to support queries using the Common API. ESRI.ArcGIS.ADF.Web.SpatialFilter and QueryFilter can both be used to define queries using the Query() method. The ReturnADFGeometries property determines if the DataTable returned from a query contains Web ADF geometry. If you want to use the DataTable as a Web ADF graphics layer, this property need to be true.
- When an IQueryFunctionality method requires a map functionality name, a null value can be used. In this case, the resource used to create the query functionality is already associated with the IQueryFunctionality instance.
System.Data.DataSet dataset = new System.Data.DataSet();
IEnumerable func_enum = Map1.GetFunctionalities();
foreach (ESRI.ArcGIS.ADF.Web.DataSources.IGISFunctionality gisfunctionality in func_enum)
{
ESRI.ArcGIS.ADF.Web.DataSources.IGISResource gisresource = gisfunctionality.Resource;
bool supported = gisresource.SupportsFunctionality(typeof(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality));
if (supported) {
ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality qfunc;
qfunc = (ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality)gisresource.CreateFunctionality(
typeof(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality), null);
string[] lids;
string[] lnames;
qfunc.GetQueryableLayers(null, out lids, out lnames);
ESRI.ArcGIS.ADF.Web.Geometry.Envelope env = new ESRI.ArcGIS.ADF.Web.Geometry.Envelope(-120, 30, -100, 40);
ESRI.ArcGIS.ADF.Web.SpatialFilter spatialfilter = new ESRI.ArcGIS.ADF.Web.SpatialFilter();
spatialfilter.Geometry = env;
spatialfilter.ReturnADFGeometries = true;
spatialfilter.MaxRecords = 1000;
for (int i = 0; i < lids.Length; i++)
{
System.Data.DataTable dtable = qfunc.Query(null, lids[i], spatialfilter);
dtable.TableName = gisresource.Name + "_" + lnames[i];
dataset.Tables.Add(dtable);
}
}
}
For more information on working with DataTables and Web ADF graphics
layers, see the Datasets section in
the conversion topic and the Graphics layer
discussion in the Map control topic.
MapTocFunctionality:
IMapTocFunctionality
MapTocFunctionality provides access to toc data frames
representing resources in a Toc control. Each resource has
one TocDataFrame that contains one TocLayer for each layer in a
resource. To change visibility of a layer in the Toc, use the
Get\SetLayerVisibility() methods on the MapFunctionality. You may also
need to refresh the Toc control after a visibility change. See the
Common_Set_Visible_Layers sample for an example.
TileFunctionality: ITileFunctionality
TileFunctionality enables a Map to retrieve a pre-generated map image
tile instead of requiring a new map image be generated
(MapFunctionality). Of data sources supported by the Web ADF
out-of-the-box, only ArcGIS Server and Microsoft Bing Maps data
sources support\implement ITileFunctionality. ArcGIS Server services
have the ability to generate and provide map caches on the server.
Bing Maps imagery is only provided a cache of map tiles.
In most cases, the only time you will need to work with ITileFunctionality is
during the implementation of a custom data source that provides static map
image tiles. See the Creating
custom data source topic for more information.
ScaleBarFunctionality:
IScalebarFunctionality
ScaleBarFunctionality exposes the ability of a map resource to generate a scale
bar image for use within an application. The ScaleBar control uses an
IScalebarFunctionality to generate content.