Skip to content

Commit

Permalink
Separate wms and wfs layer name
Browse files Browse the repository at this point in the history
this fixes #111
  • Loading branch information
pierrejego committed Nov 20, 2015
1 parent 4ac5215 commit 059369a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderCon
@Value("${cadastre.wfs.url}")
protected String wfsUrl;

@Value("${cadastre.layer.name}")
protected String cadastreLayerName;
@Value("${cadastre.wms.layer.name}")
protected String cadastreWMSLayerName;

@Value("${cadastre.wfs.layer.name}")
protected String cadastreWFSLayerName;

@Value("${cadastre.format}")
protected String cadastreFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public Map<String, Object> getConfiguration(){

configuration.put("cadastreWFSURL", wfsUrl );
configuration.put("cadastreWMSURL", wmsUrl );
configuration.put("cadastreLayerName", cadastreLayerName);

configuration.put("cadastreWMSLayerName", cadastreWMSLayerName);
configuration.put("cadastreWFSLayerName", cadastreWFSLayerName);
configuration.put("cadastreLayerIdParcelle", cadastreLayerIdParcelle);

configuration.put("cnil1RoleName", cnil1RoleName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public Response createImageBordereauParcellaire(@QueryParam("parcelle") String p

SimpleFeatureSource source;

source = dataStore.getFeatureSource(cadastreLayerName);
source = dataStore.getFeatureSource(cadastreWFSLayerName);

// Make sure source have been found before making request filter
if (source != null) {
Expand Down Expand Up @@ -192,7 +192,7 @@ public Response createImageBordereauParcellaire(@QueryParam("parcelle") String p
// Add layer see to set this in configuration parameters
// Or use getCapatibilities
Layer layerParcelle = new Layer("Parcelle cadastrapp");
layerParcelle.setName(cadastreLayerName);
layerParcelle.setName(cadastreWMSLayerName);
requestParcelle.addLayer(layerParcelle);

// sets the dimensions check with PDF size available
Expand Down
6 changes: 5 additions & 1 deletion cadastrapp/src/main/resources/cadastrapp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ baseMap.SRS=EPSG:3857
## information about WMS and WFS service
# Here you can configure the layer name and with field contains the parcelle Id depending if you are on Qgis or Arcopole model
cadastre.wms.url=http://gd-cms-crai-001.fasgfi.fr/geoserver/wms
cadastre.wms.layer.name=qgis:geo_parcelle

cadastre.wfs.url=http://gd-cms-crai-001.fasgfi.fr/geoserver/wfs
cadastre.layer.name=qgis:geo_parcelle
cadastre.wfs.layer.name=qgis:geo_parcelle

## use in the addon to add name in the display layer column
cadastre.layer.idParcelle=geo_parcelle
cadastre.format=image/png
cadastre.SRS=EPSG:3857
Expand Down

3 comments on commit 059369a

@landryb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Au passage, vu que la v1 a été tagguée, c'est pas mal de poser le tag sur le commit mettant a jour la version dans pom.xml et cadastrapp/pom.xml... et d'enlever le suffixe -SNAPSHOT :p

@landryb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le commentaire ligne 31 n'a pas l'air de correspondre a cette clef, vu que layernameinpanel est dans la conf de l'addon uniquement

@pierrejego
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui pour la release, je vais refaire une release depuis maven ça sera plus propre.

Et effectivement le commentaire est pas bon, ce champ est utiliser pour les requêtes WFS, c'est l'idfield pour le filtre de recherche.
Je change le commentaire maintenant, je vais aussi changer le nom de la variable dans un deuxième temps

Please sign in to comment.