From: Michael B. <mic...@gm...> - 2010-03-07 23:45:13
|
Hi Ziad, You could do something like this for each of the layers in your map context... // if the layer has a title, use it String layerName = layer.getTitle(); // no title; use feature source name if there is one if (layerName == null || layerName.length() == 0) { layerName = layer.getFeatureSource().getName().getLocalPart(); } // no feature source name; use feature type name if (layerName == null || layerName.length() == 0) { layerName = layer.getFeatureSource().getSchema().getName().getLocalPart(); } Hope this helps, Michael |