-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put only example layers in the update scaffold
- Loading branch information
Showing
3 changed files
with
56 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,6 @@ MAP | |
END | ||
END | ||
|
||
INCLUDE "example.map" | ||
INCLUDE "demo.map" | ||
|
||
END |
55 changes: 1 addition & 54 deletions
55
...ds/update/mapserver/example.map.mako_tmpl → ...folds/create/mapserver/demo.map.mako_tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
c2cgeoportal/scaffolds/update/mapserver/CONST_example.map.mako_tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# restricted access layer | ||
LAYER | ||
NAME 'layer_name' | ||
TYPE POLYGON | ||
TEMPLATE fooOnlyForWMSGetFeatureInfo # For GetFeatureInfo | ||
EXTENT 420000 30000 900000 350000 | ||
CONNECTIONTYPE postgis | ||
PROCESSING "CLOSE_CONNECTION=DEFER" # For performance | ||
CONNECTION "${mapserver_connection}" | ||
# Example data for secured layer by restriction area | ||
DATA "geometrie FROM (SELECT geo.* FROM geodata.table AS geo WHERE ST_Contains((${mapfile_data_subselect} 'layer_name'), ST_SetSRID(geo.geometrie, {{srid}}))) as foo using unique id using srid={{srid}}" | ||
# Example data for secured layer by role (without any area) | ||
#DATA "geometrie FROM (SELECT geo.geom as geom FROM geodata.table AS geo WHERE %role_id% IN (${mapfile_data_noarea_subselect} 'layer_name')) as foo USING UNIQUE gid USING srid={{srid}}" | ||
# Example data for public layer | ||
#DATA "geometrie FROM (SELECT geo.geom as geom FROM geodata.table AS geo) AS foo USING UNIQUE gid USING srid={{srid}}" | ||
METADATA | ||
"wms_title" "layer_name" # For WMS | ||
"wms_srs" "EPSG:{{srid}}" # For WMS | ||
|
||
"wfs_enable_request" "*" # Enable WFS for this layer | ||
"gml_include_items" "all" # For GetFeatureInfo and WFS GetFeature (QueryBuilder) | ||
"ows_geom_type" "polygon" # For returning geometries in GetFeatureInfo | ||
"ows_geometries" "geom" # For returning geometries in GetFeatureInfo | ||
|
||
"wms_metadataurl_href" "http://www.example.com/bar" # For metadata URL | ||
"wms_metadataurl_format" "text/html" # For metadata URL | ||
"wms_metadataurl_type" "TC211" # For metadata URL | ||
|
||
${mapserver_layer_metadata} # For secured layers | ||
END | ||
VALIDATION | ||
${mapserver_layer_validation} # For secured layers | ||
END | ||
STATUS ON | ||
PROJECTION | ||
"init=epsg:{{srid}}" | ||
END | ||
CLASS | ||
NAME "countries" | ||
OUTLINECOLOR 0 0 0 | ||
END | ||
END | ||
|
||
# raster layer (with a tile index) | ||
LAYER | ||
NAME 'topo' | ||
GROUP 'plan' | ||
TYPE RASTER | ||
STATUS ON | ||
PROCESSING "RESAMPLE=AVERAGE" | ||
TILEINDEX "raster/topo" | ||
TILEITEM "LOCATION" | ||
MINSCALEDENOM 25000 | ||
END |