Represents the generic functionality of an ArcIMS map service.
Object Model
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As MapService |
Example
The first example creates a new connection to the ArcIMS server and initializes a new MapService object based on the service. It then prints out a property of the map service.
The second example obtains the MapService from a Map web control on the page.
Visual Basic | Copy Code |
---|
' Example 1 (VB)
' Set up a connection to the server
Dim conn As New ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection("localhost", 5300)
conn.ServiceName = "World"
Dim connParams As New InitializationParameters(96, True, False, False, False)
Dim mapService As New MapService(conn, connParams, True)
lblInfo.Text = "MapService MapUnits are " + mapService.Units.ToString() |
C# | Copy Code |
---|
// Example 1 (C#)
// Set up a connection to the server
ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection conn =
new ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection("localhost", 5300);
conn.ServiceName = "World";
InitializationParameters connParams = new InitializationParameters(96, True, False, False, False);
MapService mapService = new MapService(conn, connParams, True);
lblInfo.Text = "MapService MapUnits are " + mapService.Units.ToString(); |
Visual Basic | Copy Code |
---|
' Example 2 (VB)
' Get the MapService via the Map control, and print a property
Dim mapFunct As MapFunctionality = CType(Map1.GetFunctionality(0), MapFunctionality)
Dim mapService As MapService = mapFunct.MapView.MapService
lblInfo.Text = "MapService MapUnits are " + mapService.Units.ToString() |
C# | Copy Code |
---|
// Example 2 (C#)
// Get the MapService via the Map control, and print a property
MapFunctionality mapFunct = (MapFunctionality)Map1.GetFunctionality(0);
MapService mapService = mapFunct.MapView.MapService;
lblInfo.Text = "MapService MapUnits are " + mapService.Units.ToString(); |
Remarks
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