Exemplo n.º 1
0
 /**
  * It adds a editor layer in the map.
  *
  * @param layerName layer name
  * @param layerTitle layer title
  * @param geometryType geometry type for this layer
  * @param styleResource the resource name .xml in the location of resources for layer styles. This
  *     resource location is added in the path decided in SLD_RESOURCES {
  * @see org.sola.clients.geotools.ui.layers.SolaFeatureLayer}.
  * @return
  */
 public ExtendedLayerEditor addLayerEditor(
     String layerName,
     String layerTitle,
     Geometries geometryType,
     String styleResource,
     String extraFieldsFormat) {
   ExtendedLayerEditor layer = null;
   try {
     layer = new ExtendedLayerEditor(layerName, geometryType, styleResource, extraFieldsFormat);
     layer.setTitle(layerTitle);
     this.addLayer(layer);
   } catch (InitializeLayerException ex) {
     Messaging.getInstance().show(ex.getMessage());
   }
   return layer;
 }