How to know number of layers in a map ?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

How to know number of layers in a map ?

This post has NOT been accepted by the mailing list yet.
 I'm working on some GIS based application and i need to know How many layers are in one Map and what is the path for currently selected layer. my code for this is:

String path=ApplicationGIS.getActiveMap().getMapLayers().get(0).getID().getPath();
                System.out.println("path of the given map is :: "+path);

but it is just for '0' indexed layer. i need to know path for selected layer. i.e: currently displaying layer.
please help..