Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] How to know number of layers in a map ?

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..

--
Sent from the uDig Developer mailing list archive at Nabble.com.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)


Back to the top