[udig-devel] (no subject)

Andy Cox ivyavenue at hotmail.com
Mon Aug 13 04:39:39 PDT 2007


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20070813/d431d1b2/attachment.html


More information about the udig-devel mailing list