ESRI.ArcGIS.ADF.IMS
MapView Constructor(MapService)
See Also  Example Send Feedback
ESRI.ArcGIS.ADF.IMS.Carto Namespace > MapView Class > MapView Constructor : MapView Constructor(MapService)




mapService
The MapService from which to create the new MapView.
Constructs a MapView object from a MapService.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal mapService As MapService _
)
Visual Basic (Usage)Copy Code
Dim mapService As MapService
 
Dim instance As New MapView(mapService)
C# 
public MapView( 
   MapService 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 BasicCopy 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

Use this method when you need a MapView object and are not working with the Map web control, or need a freshly created MapView unassociated with the web controls.

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.