Map service GetServerInfo method
Gets information about the present state of a map (data frame).
GetServerInfo(string MapName)
Parameter |
Description |
---|---|
MapName |
The name of the map (data frame) from which information will be returned. |
Return Value
A MapServerInfo object containing the present state of a map.
Remarks
In many cases, this method is used as a starting point to get basic information about the contents of a map for eventual modification. For example, the MapServerInfo. DefaultMapDescription references a default MapDescription, which can be used with ExportMapImage to create a dynamic map, change layer visibility, set map extent. MapServerInfo also stores the default and full extents, spatial reference, and background color and transparency settings. Layer names and ids are available via the MapLayerInfos property of a MapServerInfo object.
Examples
C#
MapService_MapServer mapservice = new MapService_MapServer();
mapservice.Url = "http://localhost:6080/arcgis/services/MapFusedCache/MapServer";
string mapname = mapservice.GetDefaultMapName();
MapServerInfo mapinfo = mapservice.GetServerInfo(mapname);
VB.NET
Dim mapservice As MapService_MapServer = New MapService_MapServer()
mapservice.Url = "http://localhost:6080/arcgis/services/MapFusedCache/MapServer"
Dim mapname As String = mapservice.GetDefaultMapName()
Dim mapinfo As MapServerInfo = mapservice.GetServerInfo(mapname)
Java
String serviceURL = "http://localhost:6080/arcgis/services/MapService/MapServer";
MapServerBindingStub mapService = new MapServerBindingStub(serviceURL);
String mapName = mapService.getDefaultMapName();
MapServerInfo mapInfo = mapService.getServerInfo(mapName);
System.out.println("Map Name: " + mapInfo.getName());