Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] (no subject)

Hello,

 

Does anyone know if there is an easy way to get a layers geometry type. I am trying to populate a list with the layers that are in the map but I only want to include the polygon layers. So far I have

 

Map map = ApplicationGISInternal.getActiveMap();

           

            List<ILayer> layers = map.getMapLayers();

           

            ILayer layer;

           

            for (i=0; i<layers.size(); i++) {

                 

                  layer = (ILayer)layers.get(i);

 

if (layer IS TYPE OF POLYGON OR MULTIPOLYOGON)) {

                        layerList.add("" + layer.getName());

                  }

            }

 

Thanks
Andy


Back to the top