Map service GetMapCount method
Gets the number of maps (data frames) in a map service.
GetMapCount()
Return Value
An integer value indicating the number of maps in a map service.
Remarks
The GetMapCount method is often used in conjunction with the GetMapName method to iterate through the maps in a map service and select one based on map (data frame) name.
Examples
C#
MapService_MapServer mapservice = new MapService_MapServer();
mapservice.Url = "http://localhost:6080/arcgis/services/MapService/MapServer";
int mapcount = mapservice.GetMapCount();
VB.NET
Dim mapservice As MapService_MapServer = New MapService_MapServer()
mapservice.Url = "http://localhost:6080/arcgis/services/MapService/MapServer"
Dim mapcount As Integer = mapservice.GetMapCount()
Java
String serviceURL = "http://localhost:6080/arcgis/services/MapService/MapServer";
MapServerBindingStub mapService = new MapServerBindingStub(serviceURL);
int mapCount = mapService.getMapCount();
System.out.println("Map Count: " + mapCount);
10/23/2013