The EditManger holds on to the currently selected layer. You should just be
able to use indeOf method on getMapLayers() to figure out what "index" it is
in.
Actually you may just be able to read the z order right out of the layer; since
that is why getMapLayers() a list. It is a list of the layers in display order.
--
Jody Garnett
On Wednesday, 18 April 2012 at 10:20 PM, nanithehaddock wrote:
> 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..
>
> --
> View this message in context:
> http://gis.19327.n5.nabble.com/How-to-know-number-of-layers-in-a-map-tp5648910p5648910.html
> Sent from the uDig Developer mailing list archive at Nabble.com
> (http://Nabble.com).
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel