Constructs a MapView object from a MapService.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim mapService As MapService
Dim instance As New MapView(mapService) |
Parameters
- mapService
- The MapService from which to create the new MapView.
Example
The following example creates a MapView object by initializing a new connection to the ArcIMS server and creating a new MapService object. Note: If using the Map web control, you can retrieve the MapView associated with the Map control; see the
MapView overview.
C# | Copy Code |
---|
// Create a connection to the server
ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection conn =
New ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection("localhost", 5300);
conn.ServiceName = "World";
// Create a MapService object
InitializationParameters connParams = new InitializationParameters(96, false, false, true, false, "#ALL#");
MapService mapService = new MapService(conn, connParams, true);
// Create a MapView with the MapService
MapView mapView = new MapView(mapService); |
Visual Basic | Copy Code |
---|
' Create a connection To the server
Dim conn As New ESRI.ArcGIS.ADF.Connection.IMS.TCPConnection("localhost", 5300)
conn.ServiceName = "World"
' Create a MapService Object
Dim connParams As New InitializationParameters(96, False, False, True, False, "#ALL#")
Dim mapService As New MapService(conn, connParams, True)
' Create a MapView with the MapService
Dim mapView As New MapView(mapService) |
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