Echobase-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- 1820 discussions
r1040 - in trunk/echobase-ui: . src/main/assembly
by sbavencoff@users.forge.codelutin.com 07 Jul '14
by sbavencoff@users.forge.codelutin.com 07 Jul '14
07 Jul '14
Author: sbavencoff
Date: 2014-07-07 15:42:56 +0200 (Mon, 07 Jul 2014)
New Revision: 1040
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1040
Log:
refs #4194 : assembly lizmap zip
Added:
trunk/echobase-ui/src/main/assembly/lizmap-zip.xml
Modified:
trunk/echobase-ui/pom.xml
Modified: trunk/echobase-ui/pom.xml
===================================================================
--- trunk/echobase-ui/pom.xml 2014-07-07 13:22:12 UTC (rev 1039)
+++ trunk/echobase-ui/pom.xml 2014-07-07 13:42:56 UTC (rev 1040)
@@ -27,6 +27,7 @@
<env>dev</env>
<fullWarName>echobase-full-${project.version}</fullWarName>
+ <lizmapZipName>echobase-lizmap-${project.version}</lizmapZipName>
<!-- deploy configuration -->
<deployFiles>${project.build.directory}/${fullWarName}.war</deployFiles>
@@ -537,6 +538,19 @@
<finalName>${fullWarName}</finalName>
</configuration>
</execution>
+ <execution>
+ <id>create-lizmap-zip</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/lizmap-zip.xml</descriptor>
+ </descriptors>
+ <finalName>${lizmapZipName}</finalName>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Added: trunk/echobase-ui/src/main/assembly/lizmap-zip.xml
===================================================================
--- trunk/echobase-ui/src/main/assembly/lizmap-zip.xml (rev 0)
+++ trunk/echobase-ui/src/main/assembly/lizmap-zip.xml 2014-07-07 13:42:56 UTC (rev 1040)
@@ -0,0 +1,23 @@
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>lizmap-zip</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+
+ <!-- content of lizmap wwww -->
+ <fileSet>
+ <directory>src/main/resources/lizmap/www</directory>
+ <outputDirectory>/www</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+
+ </fileSets>
+</assembly>
\ No newline at end of file
1
0
r1039 - in trunk/echobase-ui/src/main/resources/lizmap: . www www/js www/themes www/themes/default www/themes/default/css www/themes/default/css/images www/themes/default/css/img
by sbavencoff@users.forge.codelutin.com 07 Jul '14
by sbavencoff@users.forge.codelutin.com 07 Jul '14
07 Jul '14
Author: sbavencoff
Date: 2014-07-07 15:22:12 +0200 (Mon, 07 Jul 2014)
New Revision: 1039
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1039
Log:
refs #4194 : organize lizmap files
Added:
trunk/echobase-ui/src/main/resources/lizmap/www/
trunk/echobase-ui/src/main/resources/lizmap/www/js/
trunk/echobase-ui/src/main/resources/lizmap/www/js/map.js
trunk/echobase-ui/src/main/resources/lizmap/www/themes/
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/admin.css
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/123_click.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/bt_jaune.jpg
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/download_layer.gif
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_18.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20_black.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20_tools.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_menu.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_menu_tools.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_timemanager.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/250x250_mappemonde.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/loading.gif
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/logo.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/logo_footer.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/overview_replacement.gif
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/overview_replacement.png
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/main.css
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/map.css
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/media.css
trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/view.css
Removed:
trunk/echobase-ui/src/main/resources/lizmap/js/
trunk/echobase-ui/src/main/resources/lizmap/theme/
Copied: trunk/echobase-ui/src/main/resources/lizmap/www/js/map.js (from rev 1037, trunk/echobase-ui/src/main/resources/lizmap/js/map.js)
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/www/js/map.js (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/www/js/map.js 2014-07-07 13:22:12 UTC (rev 1039)
@@ -0,0 +1,3998 @@
+/**
+* Class: lizMap
+* @package lizmap
+* @subpackage view
+* @author 3liz
+* @copyright 2011 3liz
+* @link http://3liz.com
+* @license Mozilla Public License : http://www.mozilla.org/MPL/
+*/
+
+
+var lizMap = function() {
+ /**
+ * PRIVATE Property: config
+ * {object} The map config
+ */
+ var config = null;
+ /**
+ * PRIVATE Property: capabilities
+ * {object} The wms capabilities
+ */
+ var capabilities = null;
+ /**
+ * PRIVATE Property: map
+ * {<OpenLayers.Map>} The map
+ */
+ var map = null;
+ /**
+ * PRIVATE Property: baselayers
+ * {Array(<OpenLayers.Layer>)} Ordered list of base layers
+ */
+ var baselayers = [];
+ /**
+ * PRIVATE Property: layers
+ * {Array(<OpenLayers.Layer>)} Ordered list of layers
+ */
+ var layers = [];
+ /**
+ * PRIVATE Property: controls
+ * {Object({key:<OpenLayers.Control>})} Dictionary of controls
+ */
+ var controls = {};
+ /**
+ * PRIVATE Property: tree
+ * {object} The layer's tree
+ */
+ var tree = {config:{type:'group'}};
+
+
+ /**
+ * PRIVATE function: cleanName
+ * cleaning layerName for class and layer
+ */
+ function cleanName(aName){
+ var accentMap = {
+ "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "ç": "c", "è": "e", "é": "e", "ê": "e", "ë": "e", "ì": "i", "í": "i", "î": "i", "ï": "i", "ñ": "n", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ù": "u", "ú": "u", "û": "u", "ü": "u", "ý": "y", "ÿ": "y",
+ "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Ç": "C", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "Ñ": "N", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "Ý": "Y",
+ "-":" ", "'": " ", "(": " ", ")": " "};
+ var normalize = function( term ) {
+ var ret = "";
+ for ( var i = 0; i < term.length; i++ ) {
+ ret += accentMap[ term.charAt(i) ] || term.charAt(i);
+ }
+ return ret;
+ };
+ aName = normalize(aName);
+ var reg = new RegExp('\\W', 'g');
+ return aName.replace(reg, '_');
+ }
+
+
+ /**
+ * PRIVATE function: updateMobile
+ * Determine if we should display the mobile version.
+ */
+ function updateMobile(){
+ var isMobile = mCheckMobile();
+ var contentIsMobile = $('#content').hasClass('mobile');
+ if (isMobile == contentIsMobile)
+ return;
+
+ if (isMobile) {
+ // Add mobile class to content
+ $('#content, #headermenu').addClass('mobile');
+
+ // hide overview map
+ if (config.options.hasOverview){
+ $('#overview-bar button').hide();
+ $('#overviewmap').hide();
+ }
+
+ if( $('#menu').is(':visible'))
+ $('#menu').hide();
+
+ $('#map-content').append($('#toolbar'));
+
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleLegendOn').attr('value'))
+ .parent().attr('class','legend');
+
+ // autocompletion items for locatebylayer feature
+ $('div.locate-layer select').show();
+ $('span.custom-combobox').hide();
+ }
+ else
+ {
+ // Remove mobile class to content
+ $('#content, #headermenu').removeClass('mobile');
+
+ // Display overview map
+ if (config.options.hasOverview){
+ $('#overviewmap').show();
+ $('#overview-bar button').show();
+ }
+
+ if( !$('#menu').is(':visible'))
+ $('#content span.ui-icon-open-menu').click();
+ else
+ $('#map-content').show();
+
+ $('#toolbar').insertBefore($('#switcher-menu'));
+
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleMapOnlyOn').attr('value'))
+ .parent().attr('class','map');
+
+ // autocompletion items for locatebylayer feature
+ $('div.locate-layer select').hide();
+ $('span.custom-combobox').show();
+ }
+
+ }
+
+
+ /**
+ * PRIVATE function: updateContentSize
+ * update the content size
+ */
+ function updateContentSize(){
+
+ updateMobile();
+
+ // calculate height height
+ var h = $(window).innerHeight();
+ h = h - $('#header').height();
+ h = h - $('#headermenu').height();
+ $('#map').height(h);
+
+ // Update body padding top by summing up header+headermenu
+ $('body').css('padding-top', $('#headermenu').position().top + $('#headermenu').outerHeight() );
+
+ // calculate map width depending on theme configuration
+ // (fullscreen map or not, mobile or not)
+ var w = $('body').parent()[0].offsetWidth;
+
+ if ($('#menu').is(':hidden') || $('#map-content').hasClass('fullscreen')) {
+ $('#map-content').css('margin-left',0);
+ } else {
+ w -= $('#menu').width();
+ $('#map-content').css('margin-left', $('#menu').width());
+ }
+ $('#map').width(w);
+
+ updateMapSize();
+
+ }
+
+
+ /**
+ * PRIVATE function: updateMapSize
+ * query OpenLayers to update the map size
+ */
+ function updateMapSize(){
+ var center = map.getCenter();
+ map.updateSize();
+ map.setCenter(center);
+ map.baseLayer.redraw();
+
+ if ($('#navbar').height()+150 > $('#map').height() || mCheckMobile())
+ $('#navbar .slider').hide();
+ else
+ $('#navbar .slider').show();
+
+ updateSwitcherSize();
+ }
+
+ /**
+ * PRIVATE function: updateSwitcherSize
+ * update the switcher size
+ */
+ function updateSwitcherSize(){
+ // calculate switcher height
+ // based on map height
+ h = $('#map').height();
+ // depending on element in #menu div
+ if ($('#close-menu').is(':visible'))
+ h -= $('#close-menu').outerHeight(true);
+ /*
+ if ($('#locate-menu').is(':visible') && $('#menu #locate-menu').length != 0) {
+ h -= $('#locate-menu').children().first().outerHeight(true);
+ h -= $('#locate-menu').children().last().outerHeight(true);
+ }
+ */
+ if ( $('#menu #toolbar').length != 0 ) {
+ $('#toolbar').children().each(function(){
+ var self = $(this);
+ if ( self.is(':visible') ) {
+ var children = self.children();
+ h -= children.first().outerHeight(true);
+ if ( children.length > 1 )
+ h -= children.last().outerHeight(true);
+ }
+ });
+ }
+ if ($('#baselayer-menu').is(':visible')) {
+ h -= $('#baselayer-menu').children().first().outerHeight(true);
+ h -= $('#baselayer-menu').children().last().outerHeight(true);
+ }
+ h -= $('#switcher-menu').children().first().outerHeight(true);
+
+ var sw = $('#switcher');
+ // depending on it's own css box parameters
+ h -= (parseInt(sw.css('margin-top')) ? parseInt(sw.css('margin-top')) : 0 ) ;
+ h -= (parseInt(sw.css('margin-bottom')) ? parseInt(sw.css('margin-bottom')) : 0 ) ;
+ h -= (parseInt(sw.css('padding-top')) ? parseInt(sw.css('padding-top')) : 0 ) ;
+ h -= (parseInt(sw.css('padding-bottom')) ? parseInt(sw.css('padding-bottom')) : 0 ) ;
+ h -= (parseInt(sw.css('border-top-width')) ? parseInt(sw.css('border-top-width')) : 0 ) ;
+ h -= (parseInt(sw.css('border-bottom-width')) ? parseInt(sw.css('border-bottom-width')) : 0 ) ;
+
+ //depending on it's parent padding
+ var swp = sw.parent();
+ h -= (parseInt(swp.css('padding-top')) ? parseInt(swp.css('padding-top')) : 0 ) ;
+ h -= (parseInt(swp.css('padding-bottom')) ? parseInt(swp.css('padding-bottom')) : 0 ) ;
+
+ // If map if fullscreen, get #menu position : bottom or top
+ h -= 2 * (parseInt($('#menu').css('bottom')) ? parseInt($('#menu').css('bottom')) : 0 ) ;
+
+ if($('#map-content').hasClass('fullscreen')){
+ $('#switcher').css('max-height', h);
+ }
+ else
+ $('#switcher').height(h);
+
+
+ }
+
+
+ /**
+ * PRIVATE function: getLayerLegendGraphicUrl
+ * get the layer legend graphic
+ *
+ * Parameters:
+ * name - {text} the layer name
+ * withScale - {boolean} url with scale parameter
+ *
+ * Dependencies:
+ * lizUrls.wms
+ *
+ * Returns:
+ * {text} the url
+ */
+ function getLayerLegendGraphicUrl(name, withScale) {
+ var layer = null
+ $.each(layers,function(i,l) {
+ if (layer == null && l.name == name)
+ layer = l;
+ });
+ var legendParams = {SERVICE: "WMS",
+ VERSION: "1.3.0",
+ REQUEST: "GetLegendGraphics",
+ LAYERS: layer.params['LAYERS'],
+ EXCEPTIONS: "application/vnd.ogc.se_inimage",
+ FORMAT: "image/png",
+ TRANSPARENT: "TRUE",
+ WIDTH: 150,
+ LAYERFONTSIZE: 9,
+ ITEMFONTSIZE: 9,
+ SYMBOLSPACE: 1,
+ DPI: 96};
+ var layerConfig = config.layers[layer.params['LAYERS']];
+ if (layerConfig.id==layerConfig.name)
+ legendParams['LAYERFONTBOLD'] = "TRUE";
+ else {
+ legendParams['LAYERFONTSIZE'] = 0;
+ legendParams['LAYERSPACE'] = 0;
+ }
+ legendParams['LAYERFONTBOLD'] = "FALSE";
+ if (withScale)
+ legendParams['SCALE'] = map.getScale();
+ var legendParamsString = OpenLayers.Util.getParameterString(
+ legendParams
+ );
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ return OpenLayers.Util.urlAppend(service, legendParamsString);
+ }
+
+ /**
+ * PRIVATE function: getLayerScale
+ * get the layer scales based on children layer
+ *
+ * Parameters:
+ * nested - {Object} a capability layer
+ * minScale - {Float} the nested min scale
+ * maxScale - {Float} the nested max scale
+ *
+ * Dependencies:
+ * config
+ *
+ * Returns:
+ * {Object} the min and max scales
+ */
+ function getLayerScale(nested,minScale,maxScale) {
+ for (var i = 0, len = nested.nestedLayers.length; i<len; i++) {
+ var layer = nested.nestedLayers[i];
+ var layerConfig = config.layers[layer.name];
+ if (layer.nestedLayers.length != 0)
+ return getLayerScale(layer,minScale,maxScale);
+ if (layerConfig) {
+ if (minScale == null)
+ minScale=layerConfig.minScale;
+ else if (layerConfig.minScale<minScale)
+ minScale=layerConfig.minScale;
+ if (maxScale == null)
+ maxScale=layerConfig.maxScale;
+ else if (layerConfig.maxScale>maxScale)
+ maxScale=layerConfig.maxScale;
+ }
+ }
+ if ( minScale < 1 )
+ minScale = 1;
+ return {minScale:minScale,maxScale:maxScale};
+ }
+
+ /**
+ * PRIVATE function: getLayerOrder
+ * get the layer order and calculate it if it's a QGIS group
+ *
+ * Parameters:
+ * nested - {Object} a capability layer
+ *
+ * Dependencies:
+ * config
+ *
+ * Returns:
+ * {Integer} the layer's order
+ */
+ function getLayerOrder(nested) {
+ // there is no layersOrder in the project
+ if (!('layersOrder' in config))
+ return -1;
+
+ // the nested is a layer and not a group
+ if (nested.nestedLayers.length == 0)
+ if (nested.name in config.layersOrder)
+ return config.layersOrder[nested.name];
+ else
+ return -1;
+
+ // the nested is a group
+ var order = -1;
+ for (var i = 0, len = nested.nestedLayers.length; i<len; i++) {
+ var layer = nested.nestedLayers[i];
+ var lOrder = -1;
+ if (layer.nestedLayers.length != 0)
+ lOrder = getLayerScale(layer);
+ else if (layer.name in config.layersOrder)
+ lOrder = config.layersOrder[layer.name];
+ else
+ lOrder = -1;
+ if (lOrder != -1) {
+ if (order == -1 || lOrder < order)
+ order = lOrder;
+ }
+ }
+ return order;
+ }
+
+ /**
+ * PRIVATE function: getLayerTree
+ * get the layer tree
+ * create OpenLayers WMS base or not layer {<OpenLayers.Layer.WMS>}
+ * push these layers in layers or baselayers
+ *
+ * Parameters:
+ * nested - {Object} a capability layer
+ * pNode - {Object} the nested tree node
+ *
+ * Dependencies:
+ * config
+ * layers
+ * baselayers
+ */
+ function getLayerTree(nested,pNode) {
+ pNode.children = [];
+
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ if (lizUrls.publicUrlList && lizUrls.publicUrlList.length > 1 ) {
+ service = [];
+ for (var j=0, jlen=lizUrls.publicUrlList.length; j<jlen; j++) {
+ service.push(
+ OpenLayers.Util.urlAppend(
+ lizUrls.publicUrlList[j],
+ OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ );
+ }
+ }
+
+ for (var i = 0, len = nested.nestedLayers.length; i<len; i++) {
+ var layer = nested.nestedLayers[i];
+ var layerConfig = config.layers[layer.name];
+ var layerName = cleanName(layer.name);
+
+ if (layer.name.toLowerCase() == 'hidden')
+ continue;
+
+ // if the layer is not the Overview and had a config
+ // creating the {<OpenLayers.Layer.WMS>} and the tree node
+ if (layer.name != 'Overview' && layerConfig) {
+ var node = {name:layerName,config:layerConfig,parent:pNode};
+ var layerWmsParams = {
+ layers:layer.name
+ ,version:'1.3.0'
+ ,exceptions:'application/vnd.ogc.se_inimage'
+ ,format:(layerConfig.imageFormat) ? layerConfig.imageFormat : 'image/png'
+ ,dpi:96
+ };
+ if (layerWmsParams.format != 'image/jpeg')
+ layerWmsParams['transparent'] = true;
+
+ if (layerConfig.baseLayer == 'True') {
+ // creating the base layer
+ baselayers.push(new OpenLayers.Layer.WMS(layerName,service
+ ,layerWmsParams
+ ,{isBaseLayer:true
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ }));
+
+ }
+ else if (layerConfig.type == 'layer' && layer.nestedLayers.length != 0) {
+ // creating the layer because it's a layer and has children
+ var minScale = layerConfig.minScale;
+ var maxScale = layerConfig.maxScale;
+ // get the layer scale beccause, it has children
+ var scales = getLayerScale(layer,null,null);
+ layers.push(new OpenLayers.Layer.WMS(layerName,service
+ ,layerWmsParams
+ ,{isBaseLayer:false
+ ,minScale:scales.maxScale
+ ,maxScale:scales.minScale
+ ,isVisible:(layerConfig.toggled=='True')
+ ,visibility:false
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ ,order:getLayerOrder(layer)
+ }));
+ }
+ else if (layerConfig.type == 'layer') {
+ // creating the layer because it's a layer and has no children
+ layers.push(new OpenLayers.Layer.WMS(layerName,service
+ ,layerWmsParams
+ ,{isBaseLayer:false
+ ,minScale:layerConfig.maxScale
+ ,maxScale:(layerConfig.minScale != null && layerConfig.minScale < 1) ? 1 : layerConfig.minScale
+ ,isVisible:(layerConfig.toggled=='True')
+ ,visibility:false
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ ,order:getLayerOrder(layer)
+ }));
+ }
+ // creating the layer tre because it's a group, has children and is not a base layer
+ if (layerConfig.type == 'group' && layer.nestedLayers.length != 0 && layerConfig.baseLayer == 'False')
+ getLayerTree(layer,node);
+ if (layerConfig.baseLayer != 'True')
+ pNode.children.push(node);
+ } else if (layer.name == 'Overview'){
+ config.options.hasOverview = true;
+ }
+ }
+ }
+
+ /**
+ * PRIVATE function: analyseNode
+ * analyse Node Config
+ * define if the node has to be a child of his parent node
+ *
+ * Parameters:
+ * aNode - {Object} a node config
+ *
+ * Returns:
+ * {Boolean} maintains the node in the tree
+ */
+ function analyseNode(aNode) {
+ var nodeConfig = aNode.config;
+ if (nodeConfig.type == 'layer' && nodeConfig.baseLayer != 'True')
+ return true;
+ else if (nodeConfig.type == 'layer')
+ return false;
+
+ if (!('children' in aNode))
+ return false;
+ var children = aNode.children;
+ var result = false;
+ var removeIdx = [];
+ for (var i=0, len=children.length; i<len; i++) {
+ var child = children[i];
+ var analyse = analyseNode(child);
+ if (!analyse)
+ removeIdx.push(i);
+ result = (result || analyse);
+ }
+ removeIdx.reverse();
+ for (var i=0, len=removeIdx.length; i<len; i++) {
+ children.splice(removeIdx[i],1);
+ }
+ return result;
+ }
+
+ /**
+ * PRIVATE function: getSwitcherLine
+ * get the html table line <tr> of a config node for the switcher
+ *
+ * Parameters:
+ * aNode - {Object} a config node
+ *
+ * Returns:
+ * {String} the <tr> html corresponding to the node
+ */
+ function getSwitcherLine(aNode, aParent) {
+ var html = '';
+
+ var nodeConfig = aNode.config;
+ html += '<tr id="'+nodeConfig.type+'-'+aNode.name+'"';
+ html += ' class="liz-'+nodeConfig.type;
+ if (aParent)
+ html += ' child-of-group-'+aParent.name;
+ if (('children' in aNode) && aNode['children'].length!=0)
+ html += ' expanded parent';
+ html += '">';
+
+ html += '<td><button class="checkbox" name="'+nodeConfig.type+'" value="'+aNode.name+'" title="'+lizDict['tree.button.checkbox']+'"></button>';
+ html += '<span class="label" title="'+nodeConfig.abstract+'">'+nodeConfig.title+'</span>';
+ html += '</td>';
+
+ html += '<td>';
+ if (nodeConfig.type == 'layer')
+ html += '<span class="loading"> </span>';
+ html += '</td>';
+
+ var legendLink = '';
+ if (nodeConfig.link)
+ legendLink = nodeConfig.link;
+ if (legendLink != '' )
+ html += '<td><button class="link" name="link" title="'+lizDict['tree.button.link']+'" value="'+legendLink+'"/></td>';
+ else
+ html += '<td></td>';
+
+ var removeCache = '';
+ if (nodeConfig.cached && nodeConfig.cached == 'True' && nodeConfig.type == 'layer' && ('removeCache' in config.options))
+ html += '<td><button class="removeCache" name="removeCache" title="'+lizDict['tree.button.removeCache']+'" value="'+aNode.name+'"/></td>';
+ else
+ html += '<td></td>';
+
+ html += '</tr>';
+
+ if (nodeConfig.type == 'layer') {
+ var url = getLayerLegendGraphicUrl(aNode.name, false);
+
+ html += '<tr id="legend-'+aNode.name+'" class="child-of-layer-'+aNode.name+' legendGraphics">';
+ html += '<td colspan="2"><div class="legendGraphics"><img src="'+url+'"/></div></td>';
+ html += '</tr>';
+ }
+
+ return html;
+ }
+
+ /**
+ * PRIVATE function: getSwitcherNode
+ * get the html of a config node for the switcher
+ *
+ * Parameters:
+ * aNode - {Object} a config node
+ *
+ * Returns:
+ * {String} the html corresponding to the node
+ */
+ function getSwitcherNode(aNode,aLevel) {
+ var html = '';
+ if (aLevel == 0
+ && ('rootGroupsAsBlock' in config.options)
+ && config.options['rootGroupsAsBlock'] == 'True') {
+ var children = aNode.children;
+ var previousSibling;
+ for (var i=0, len=children.length; i<len; i++) {
+ var child = children[i];
+ var positionClass = '';
+ if (i == 0)
+ positionClass= 'first-block ';
+ else if (i == len-1)
+ positionClass= 'last-block ';
+ if (('children' in child) && child['children'].length!=0) {
+ if (previousSibling && ( (('children' in previousSibling) && previousSibling['children'].length==0) || !('children' in previousSibling)) ) {
+ html += '</table>';
+ html += '</div>';
+ }
+ html += '<div class="with-blocks '+positionClass+child.name+'">';
+ html += '<table class="tree">';
+ var grandChildren = child.children;
+ for (var j=0, jlen=grandChildren.length; j<jlen; j++) {
+ var grandChild = grandChildren[j];
+ html += getSwitcherLine(grandChild);
+
+ if (('children' in grandChild) && grandChild['children'].length!=0)
+ html += getSwitcherNode(grandChild, aLevel+1);
+ }
+ html += '</table>';
+ html += '</div>';
+ } else {
+ if (previousSibling && ('children' in previousSibling) && previousSibling['children'].length!=0) {
+ html += '<div class="with-blocks '+positionClass+'no-group">';
+ html += '<table class="tree">';
+ }
+ html += getSwitcherLine(child);
+ }
+ previousSibling = child;
+ }
+ if ((('children' in previousSibling) && previousSibling['children'].length==0) || !('children' in previousSibling)) {
+ html += '</table>';
+ html += '</div>';
+ }
+ return html;
+ }
+ if (aLevel == 0) {
+ html += '<div class="without-blocks no-group">';
+ html += '<table class="tree">';
+ }
+
+ var children = aNode.children;
+ for (var i=0, len=children.length; i<len; i++) {
+ var child = children[i];
+ if (aLevel == 0)
+ html += getSwitcherLine(child);
+ else
+ html += getSwitcherLine(child,aNode);
+
+ if (('children' in child) && child['children'].length!=0)
+ html += getSwitcherNode(child, aLevel+1);
+ }
+
+ if (aLevel == 0) {
+ html += '</table>';
+ html += '</div>';
+ }
+ return html;
+ }
+
+ /**
+ * PRIVATE function: createMap
+ * creating the map {<OpenLayers.Map>}
+ */
+ function createMap() {
+ // get and define projection
+ var proj = config.options.projection;
+ if ( !(proj.ref in Proj4js.defs) )
+ Proj4js.defs[proj.ref]=proj.proj4;
+ var projection = new OpenLayers.Projection(proj.ref);
+ if ( !(proj.ref in OpenLayers.Projection.defaults) )
+ OpenLayers.Projection.defaults[proj.ref] = projection;
+
+ // get and define the max extent
+ var bbox = config.options.bbox;
+ var extent = new OpenLayers.Bounds(Number(bbox[0]),Number(bbox[1]),Number(bbox[2]),Number(bbox[3]));
+
+ var restrictedExtent = extent.scale(3);
+ var initialExtent = extent.clone();
+ if ( 'initialExtent' in config.options && config.options.initialExtent.length == 4 ) {
+ var initBbox = config.options.initialExtent;
+ initialExtent = new OpenLayers.Bounds(Number(initBbox[0]),Number(initBbox[1]),Number(initBbox[2]),Number(initBbox[3]));
+ }
+
+ // calculate the map height
+ var mapHeight = $('body').parent()[0].clientHeight;
+ if(!mapHeight)
+ mapHeight = $('window').innerHeight();
+ mapHeight = mapHeight - $('#header').height();
+ mapHeight = mapHeight - $('#headermenu').height();
+ $('#map').height(mapHeight);
+
+ var res = extent.getHeight()/$('#map').height();
+
+ var scales = [];
+ var resolutions = [];
+ if ('resolutions' in config.options)
+ resolutions = config.options.resolutions;
+ else if ('mapScales' in config.options)
+ scales = config.options.mapScales;
+ scales.sort(function(a, b) {
+ return Number(b) - Number(a);
+ });
+ // remove duplicate scales
+ nScales = [];
+ while (scales.length != 0){
+ var scale = scales.pop(0);
+ if ($.inArray( scale, nScales ) == -1 )
+ nScales.push( scale );
+ }
+ scales = nScales;
+
+
+ // creating the map
+ OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; // Avoid some issues with tiles not displayed
+ OpenLayers.Util.DEFAULT_PRECISION=20; // default is 14 : change needed to avoid rounding problem with cache
+ map = new OpenLayers.Map('map'
+ ,{controls:[
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.Permalink('permalink'),
+ new OpenLayers.Control.ZoomBox({alwaysZoom:true})
+ ]
+ ,eventListeners:{
+ zoomend: function(evt){
+ // private treeTable
+ var options = {
+ childPrefix : "child-of-"
+ };
+
+ function childrenOf(node) {
+ return $(node).siblings("tr." + options.childPrefix + node[0].id);
+ };
+
+ function descendantsOf(node) {
+ var descendants = [];
+ var children = [];
+ if (node && node[0])
+ children = childrenOf(node);
+ for (var i=0, len=children.length; i<len; i++) {
+ descendants.push(children[i]);
+ descendants = descendants.concat(descendantsOf([children[i]]));
+ }
+ return descendants;
+ };
+
+ function parentOf(node) {
+ if (node.length == 0 )
+ return null;
+
+ var classNames = node[0].className.split(' ');
+
+ for(var key=0; key<classNames.length; key++) {
+ if(classNames[key].match(options.childPrefix)) {
+ return $(node).siblings("#" + classNames[key].substring(options.childPrefix.length));
+ }
+ }
+
+ return null;
+ };
+
+ function ancestorsOf(node) {
+ var ancestors = [];
+ while(node = parentOf(node)) {
+ ancestors[ancestors.length] = node[0];
+ }
+ return ancestors;
+ };
+ //layer visibility
+ for (var i=0,len=layers.length; i<len; i++) {
+ var layer = layers[i];
+ var b = $('#switcher button[name="layer"][value="'+layer.name+'"]').first();
+ if (layer.inRange && b.button('option','disabled')) {
+ var tr = b.parents('tr').first();
+ tr.removeClass('liz-state-disabled').find('button').button('enable');
+ var ancestors = ancestorsOf(tr);
+ $.each(ancestors,function(i,a) {
+ $(a).removeClass('liz-state-disabled').find('button').button('enable');
+ });
+ if (tr.find('button[name="layer"]').button('option','icons').primary == 'liz-icon-check')
+ layer.setVisibility(true);
+ } else if (!layer.inRange && !b.button('option','disabled')) {
+ var tr = b.parents('tr').first();
+ tr.addClass('liz-state-disabled').find('button').first().button('disable');
+ if (tr.hasClass('liz-layer'))
+ tr.collapse();
+ var ancestors = ancestorsOf(tr);
+ $.each(ancestors,function(i,a) {
+ a = $(a);
+ var count = 0;
+ var checked = 0;
+ var aDesc = childrenOf(a);
+ $.each(aDesc,function(j,trd) {
+ $(trd).find('button.checkbox').each(function(i,b){
+ if ($(b).button('option','disabled'))
+ checked++;
+ count++;
+ });
+ });
+ if (count == checked)
+ a.addClass('liz-state-disabled').find('button').first().button('disable');
+ else
+ a.removeClass('liz-state-disabled').find('button').button('enable');
+ });
+ }
+ }
+
+ //pan button
+ $('#navbar button.pan').click();
+ }
+ }
+
+ ,maxExtent:extent
+ ,restrictedExtent: restrictedExtent
+ ,initialExtent:initialExtent
+ ,maxScale: scales.length == 0 ? config.options.minScale : "auto"
+ ,minScale: scales.length == 0 ? config.options.maxScale : "auto"
+ ,numZoomLevels: scales.length == 0 ? config.options.zoomLevelNumber : scales.length
+ ,scales: scales.length == 0 ? null : scales
+ ,resolutions: resolutions.length == 0 ? null : resolutions
+ ,projection:projection
+ ,units:projection.proj.units
+ ,allOverlays:(baselayers.length == 0)
+ });
+ map.addControl(new OpenLayers.Control.Attribution({div:document.getElementById('attribution')}));
+
+ // add handler to update the map size
+ $(window).resize(function() {
+ updateContentSize();
+ });
+ }
+
+ /**
+ * Get features for locate by layer tool
+ */
+ function updateLocateFeature(aName, aJoinField, aJoinValue) {
+ var locate = config.locateByLayer[aName];
+ var lConfig = config.layers[aName];
+ var features = locate.features;
+ var options = '<option value="-1">'+lConfig.title+'</option>';
+ for (var fid in features) {
+ var feat = features[fid];
+ if (aJoinField && aJoinValue && feat.properties[aJoinField] != aJoinValue)
+ continue;
+ options += '<option value="'+feat.id+'">'+feat.properties[locate.fieldName]+'</option>';
+ }
+ $('#locate-layer-'+aName).html(options).val('-1');
+ }
+
+ /**
+ * Get features for locate by layer tool
+ */
+ function getLocateFeature(aName) {
+ var locate = config.locateByLayer[aName];
+ var fields = ['geometry',locate.fieldName];
+ if ('joinFieldName' in locate)
+ fields.push( locate.joinFieldName );
+ if ('filterFieldName' in locate)
+ fields.push( locate.filterFieldName );
+ var wfsOptions = {
+ 'SERVICE':'WFS'
+ ,'VERSION':'1.0.0'
+ ,'REQUEST':'GetFeature'
+ ,'TYPENAME':aName
+ ,'PROPERTYNAME':fields.join(',')
+ ,'OUTPUTFORMAT':'GeoJSON'
+ };
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ $.get(service
+ ,wfsOptions
+ ,function(data) {
+ var lConfig = config.layers[aName];
+ locate['features'] = {};
+ var features = data.features;
+ if ('filterFieldName' in locate) {
+ // create filter combobox for the layer
+ features.sort(function(a, b) {
+ return a.properties[locate.filterFieldName].localeCompare(b.properties[locate.filterFieldName]);
+ });
+ var fOptions = '<option value="-1">'+lConfig.title+' '+locate.filterFieldName+'</option>';
+ var fValue = '-1';
+ for (var i=0, len=features.length; i<len; i++) {
+ var feat = features[i];
+ if ( fValue != feat.properties[locate.filterFieldName] ) {
+ fValue = feat.properties[locate.filterFieldName];
+ fOptions += '<option value="'+fValue+'">'+fValue+'</option>';
+ }
+ }
+ $('#locate-layer-'+aName).parent().before('<div class="locate-layer"><select id="locate-layer-'+aName+'-'+locate.filterFieldName+'">'+fOptions+'</select></div><br/>');
+ $('#locate-layer-'+aName+'-'+locate.filterFieldName).change(function(){
+ var filterValue = $(this).children(':selected').val();
+ //console.log(filterValue);
+ var lOptions = '<option value="-1">'+lConfig.title+'</option>';
+ for (var fid in locate.features) {
+ var feat = locate.features[fid];
+ if (feat.properties[locate.filterFieldName] != filterValue)
+ continue;
+ lOptions += '<option value="'+feat.id+'">'+feat.properties[locate.fieldName]+'</option>';
+ }
+ $('#locate-layer-'+aName).html(lOptions).val('-1');
+ });
+ $('#locate-layer-'+aName+'-'+locate.filterFieldName).combobox({
+ "selected": function(evt, ui){
+ if ( ui.item ) {
+ var self = $(this);
+ var uiItem = $(ui.item);
+ window.setTimeout(function(){
+ self.val(uiItem.val()).change();
+ }, 1);
+ }
+ }
+ });
+ updateSwitcherSize();
+ }
+
+ // create combobox for the layer
+ features.sort(function(a, b) {
+ return a.properties[locate.fieldName].localeCompare(b.properties[locate.fieldName]);
+ });
+ var options = '<option value="-1">'+lConfig.title+'</option>';
+ for (var i=0, len=features.length; i<len; i++) {
+ var feat = features[i];
+ locate.features[feat.id.toString()] = feat;
+ if ( !('filterFieldName' in locate) )
+ options += '<option value="'+feat.id+'">'+feat.properties[locate.fieldName]+'</option>';
+ }
+ $('#locate-layer-'+aName).html(options).change(function() {
+ var layer = map.getLayersByName('locatelayer')[0];
+ layer.destroyFeatures();
+ var proj = new OpenLayers.Projection(locate.crs);
+
+ var val = $(this).children(':selected').val();
+ if (val == '-1') {
+ // update to join layer
+ if ('joinFieldName' in locate && 'joinLayer' in locate && 'vectorjoins' in locate) {
+ var jName = locate.joinLayer;
+ if ( jName in config.locateByLayer ) {
+ var jLocate = config.locateByLayer[jName];
+ if ( jLocate.joinLayer == aName ) {
+ $('#locate-layer-'+jName).change();
+ return true;
+ }
+ }
+ }
+
+ var bbox = new OpenLayers.Bounds(locate.bbox);
+ bbox.transform(proj, map.getProjection());
+ map.zoomToExtent(bbox);
+ } else {
+ var feat = locate.features[val];
+ var format = new OpenLayers.Format.GeoJSON();
+ feat = format.read(feat)[0];
+ feat.geometry.transform(proj, map.getProjection());
+ map.zoomToExtent(feat.geometry.getBounds());
+ if (locate.displayGeom == 'True')
+ layer.addFeatures([feat]);
+ // update joined layer
+ if ('joinFieldName' in locate && 'joinLayer' in locate) {
+ var jName = locate.joinLayer;
+ if ( jName in config.locateByLayer ) {
+ var jLocate = config.locateByLayer[jName];
+ if ( jLocate.joinLayer == aName && 'vectorjoins' in jLocate ) {
+ // update joined select options
+ updateLocateFeature(jName, jLocate.joinFieldName, feat.attributes[locate.joinFieldName]);
+ // update joined input value
+ $('#locate-layer-'+jName).siblings().first().children('input').val($('#locate-layer-'+jName).children(':selected').text());
+ }
+ }
+ }
+
+ }
+ $(this).blur();
+ return true;
+ });
+ $('#locate-layer-'+aName).combobox({
+ "selected": function(evt, ui){
+ if ( ui.item ) {
+ var self = $(this);
+ var uiItem = $(ui.item);
+ window.setTimeout(function(){
+ self.val(uiItem.val()).change();
+ }, 1);
+ }
+ }
+ });
+ if(mCheckMobile()){
+ // autocompletion items for locatebylayer feature
+ $('div.locate-layer select').show();
+ $('span.custom-combobox').hide();
+ }
+ },'json');
+ }
+
+ /**
+ * create the layer switcher
+ */
+ function createSwitcher() {
+ // set the switcher content
+ $('#switcher').html(getSwitcherNode(tree,0));
+ $('#switcher table.tree').treeTable({
+ onNodeShow: function() {
+ //updateSwitcherSize();
+ var self = $(this);
+ if (self.find('div.legendGraphics').length != 0) {
+ var name = self.attr('id').replace('legend-','');
+ var url = getLayerLegendGraphicUrl(name, true);
+ self.find('div.legendGraphics img').attr('src',url);
+ }
+ },
+ onNodeHide: function() {
+ //updateSwitcherSize();
+ }
+ });
+ $('#close-menu .ui-icon-close-menu').click(function(){
+ $('#menu').hide();
+ if($('#content').hasClass('mobile')) {
+ $('#map-content').show();
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleLegendOn').attr('value'))
+ .parent().attr('class','legend');
+ } else {
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleLegendMapOn').attr('value'))
+ .parent().attr('class','legend');
+ }
+ $('#content .ui-icon-open-menu').show();
+ updateContentSize();
+ });
+ $('#content .ui-icon-open-menu').click(function(){
+ $('#menu').show();
+ if($('#content').hasClass('mobile')) {
+ $('#map-content').hide();
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleMapOn').attr('value'))
+ .parent().attr('class','map');
+ } else {
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleMapOn').attr('value'))
+ .parent().attr('class','map');
+ }
+ $(this).hide();
+ updateContentSize();
+ });
+
+
+ // === Private functions
+ var options = {
+ childPrefix : "child-of-"
+ };
+
+ function childrenOf(node) {
+ return $(node).siblings("tr." + options.childPrefix + node[0].id);
+ };
+
+ function descendantsOf(node) {
+ var descendants = [];
+ var children = [];
+ if (node && node[0])
+ children = childrenOf(node);
+ for (var i=0, len=children.length; i<len; i++) {
+ descendants.push(children[i]);
+ descendants = descendants.concat(descendantsOf([children[i]]));
+ }
+ return descendants;
+ };
+
+ function parentOf(node) {
+ if (node.length == 0 )
+ return null;
+
+ var classNames = node[0].className.split(' ');
+
+ for(var key=0; key<classNames.length; key++) {
+ if(classNames[key].match(options.childPrefix)) {
+ return $(node).siblings("#" + classNames[key].substring(options.childPrefix.length));
+ }
+ }
+
+ return null;
+ };
+
+ function ancestorsOf(node) {
+ var ancestors = [];
+ while(node = parentOf(node)) {
+ ancestors[ancestors.length] = node[0];
+ }
+ return ancestors;
+ };
+
+ // activate checkbox buttons
+ $('#switcher button.checkbox').button({
+ //icons:{primary:'liz-icon-check'},
+ icons:{primary:''},
+ text:false
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ if (self.attr('aria-disabled')=='true')
+ return false;
+ var icons = self.button('option','icons');
+ var descendants = [self.parents('tr').first()];
+ descendants = descendants.concat(descendantsOf($(descendants[0])));
+ if (icons.primary != 'liz-icon-check') {
+ $.each(descendants,function(i,tr) {
+ $(tr).find('button.checkbox').button('option','icons',{primary:'liz-icon-check'});
+ $(tr).find('button.checkbox[name="layer"]').each(function(i,b){
+ var name = $(b).val();
+ var layer = map.getLayersByName(name)[0];
+ layer.setVisibility(true);
+ });
+ });
+ } else {
+ $.each(descendants,function(i,tr) {
+ $(tr).find('button.checkbox').button('option','icons',{primary:''});
+ $(tr).find('button.checkbox[name="layer"]').each(function(i,b){
+ var name = $(b).val();
+ var layer = map.getLayersByName(name)[0];
+ layer.setVisibility(false);
+ });
+ });
+ self.button('option','icons',{primary:''});
+ }
+ var ancestors = ancestorsOf(self.parents('tr').first());
+ $.each(ancestors,function(i,tr) {
+ tr = $(tr);
+ var count = 0;
+ var checked = 0;
+ var pchecked = 0;
+ var trDesc = childrenOf(tr);
+ $.each(trDesc,function(j,trd) {
+ $(trd).find('button.checkbox').each(function(i,b){
+ var icons = $(b).button('option','icons');
+ if (icons.primary == 'liz-icon-check')
+ checked++;
+ else if (icons.primary == 'liz-icon-partial-check')
+ pchecked++;
+ count++;
+ });
+ });
+ var trButt = tr.find('button.checkbox');
+ if (count==checked)
+ trButt.button('option','icons',{primary:'liz-icon-check'});
+ else if (checked==0 && pchecked==0)
+ trButt.button('option','icons',{primary:''});
+ else
+ trButt.button('option','icons',{primary:'liz-icon-partial-check'});
+ });
+ });
+
+ // activate link buttons
+ $('#switcher button.link').button({
+ icons:{primary:'liz-icon-info'},
+ text:false
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ if (self.attr('aria-disabled')=='true')
+ return false;
+ var windowLink = self.val();
+ // Test if the link is internal
+ var mediaRegex = /^(\/)?media\//;
+ if(mediaRegex.test(windowLink)){
+ var mediaLink = OpenLayers.Util.urlAppend(lizUrls.media
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ windowLink = mediaLink+'&path=/'+windowLink;
+ }
+ // Open link in a new window
+ window.open(windowLink);
+ });
+
+ // Activate removeCache button
+ $('#switcher button.removeCache').button({
+ icons:{primary:'liz-remove-cache'},
+ text:false
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ if (self.attr('aria-disabled')=='true')
+ return false;
+ var removeCacheServerUrl = OpenLayers.Util.urlAppend(
+ lizUrls.removeCache
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ var windowLink = removeCacheServerUrl + '&layer=' + self.val();
+ // Open link in a new window
+ if (confirm(lizDict['tree.button.removeCache'] + ' ?'))
+ window.open(windowLink);
+ });
+
+ var projection = map.projection;
+
+ // get the baselayer select content
+ // and adding baselayers to the map
+ //var select = '<select class="baselayers">';
+ var select = [];
+ baselayers.reverse();
+ for (var i=0,len=baselayers.length; i<len; i++) {
+ var baselayer = baselayers[i]
+ baselayer.units = projection.proj.units;
+ map.addLayer(baselayer);
+ var blConfig = config.layers[baselayer.name];
+ if (blConfig)
+ select += '<option value="'+blConfig.name+'">'+blConfig.title+'</option>';
+ else
+ select += '<option value="'+baselayer.name+'">'+baselayer.name+'</option>';
+ /*
+ if (blConfig)
+ select.push('<input type="radio" name="baselayers" value="'+blConfig.name+'"><span class="baselayer-radio-label">'+blConfig.title+'</span></input>');
+ else
+ select.push('<input type="radio" name="baselayers" value="'+baselayer.name+'"><span class="baselayer-radio-label">'+baselayer.name+'</span></input>');
+ */
+ }
+ //select += '</select>';
+ //select = select.join('<br/>');
+
+ if (baselayers.length!=0) {
+ // active the select element for baselayers
+ $('#baselayer-select').append(select);
+ $('#baselayer-select')
+ .change(function() {
+ var val = $(this).val();
+ map.setBaseLayer(map.getLayersByName(val)[0]);
+ $(this).blur();
+ });
+ // Hide baselayer-menu if only one base layer inside
+ if (baselayers.length==1)
+ $('#baselayer-menu').hide();
+ } else {
+ // hide elements for baselayers
+ $('#baselayer-menu').hide();
+ map.addLayer(new OpenLayers.Layer.Vector('baselayer',{
+ maxExtent:map.maxExtent
+ ,maxScale: map.maxScale
+ ,minScale: map.minScale
+ ,numZoomLevels: map.numZoomLevels
+ ,scales: map.scales
+ ,projection: map.projection
+ ,units: map.projection.proj.units
+ }));
+ }
+
+ // adding layers to the map
+ layers.sort(function(a, b) {
+ if (a.order == b.order)
+ return 0;
+ return a.order > b.order ? 1 : -1;
+ });
+ layers.reverse();
+ for (var i=0,len=layers.length; i<len; i++) {
+ var l = layers[i];
+ l.units = projection.proj.units;
+ l.events.on({
+ loadstart: function(evt) {
+ $('#layer-'+evt.object.name+' span.loading').addClass('loadstart');
+ },
+ loadend: function(evt) {
+ $('#layer-'+evt.object.name+' span.loading').removeClass('loadstart');
+ }
+ });
+ map.addLayer(l);
+ if (l.isVisible)
+ $('#switcher button.checkbox[name="layer"][value="'+l.name+'"]').click();
+ }
+
+ // Add Locate by layer
+ if ('locateByLayer' in config) {
+ var locateContent = [];
+ for (var lname in config.locateByLayer) {
+ var lConfig = config.layers[lname];
+ var html = '<div class="locate-layer">';
+ html += '<select id="locate-layer-'+lname+'" class="label">';
+ html += '<option>'+lConfig.title+'...</option>';
+ html += '</select>';
+ html += '</div>';
+ //constructing the select
+ locateContent.push(html);
+ }
+ $('#locate').html(locateContent.join('<br/>'));
+ map.addLayer(new OpenLayers.Layer.Vector('locatelayer',{
+ styleMap: new OpenLayers.StyleMap({
+ pointRadius: 6,
+ fill: false,
+ stroke: true,
+ strokeWidth: 3,
+ strokeColor: 'yellow'
+ })
+ }));
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ $.get(service, {
+ 'SERVICE':'WFS'
+ ,'VERSION':'1.0.0'
+ ,'REQUEST':'GetCapabilities'
+ }, function(xml) {
+ var featureTypes = $(xml).find('FeatureType');
+ if (featureTypes.length == 0 ){
+ config.locateByLayer = {};
+ $('#toggleLocate').parent().remove();
+ $('#locate-menu').remove();
+ updateSwitcherSize();
+ } else {
+ featureTypes.each( function(){
+ var self = $(this);
+ var lname = self.find('Name').text();
+ if (lname in config.locateByLayer) {
+ var locate = config.locateByLayer[lname];
+ locate['crs'] = self.find('SRS').text();
+ if ( locate.crs in Proj4js.defs )
+ new OpenLayers.Projection(locate.crs);
+ else
+ $.get(service, {
+ 'REQUEST':'GetProj4'
+ ,'authid': locate.crs
+ }, function ( aText ) {
+ Proj4js.defs[locate.crs] = aText;
+ new OpenLayers.Projection(locate.crs);
+ }, 'text');
+ var bbox = self.find('LatLongBoundingBox');
+ locate['bbox'] = [
+ parseFloat(bbox.attr('minx'))
+ ,parseFloat(bbox.attr('miny'))
+ ,parseFloat(bbox.attr('maxx'))
+ ,parseFloat(bbox.attr('maxy'))
+ ];
+ }
+ } );
+
+ // get joins
+ for (var lName in config.locateByLayer) {
+ var locate = config.locateByLayer[lName];
+ if ('vectorjoins' in locate) {
+ var vectorjoins = locate['vectorjoins'];
+ locate['joinFieldName'] = vectorjoins['targetFieldName'];
+ for (var jName in config.locateByLayer) {
+ var jLocate = config.locateByLayer[jName];
+ if (jLocate.layerId == vectorjoins.joinLayerId) {
+ locate['joinLayer'] = jName;
+ jLocate['joinFieldName'] = vectorjoins['joinFieldName'];
+ jLocate['joinLayer'] = lName;
+ }
+ }
+ }
+ }
+
+ // get features
+ for (var lname in config.locateByLayer) {
+ getLocateFeature(lname);
+ }
+ $('#locate-menu button.btn-locate-clear').click(function() {
+ var layer = map.getLayersByName('locatelayer')[0];
+ layer.destroyFeatures();
+ $('#locate select').val('-1');
+ });
+ }
+ },'xml');
+ $('#locate-menu').show();
+ }
+ }
+
+ /**
+ * PRIVATE function: createOverview
+ * create the overview
+ */
+ function createOverview() {
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ var ovLayer = new OpenLayers.Layer.WMS('overview'
+ ,service
+ ,{
+ layers:'Overview'
+ ,version:'1.3.0'
+ ,exceptions:'application/vnd.ogc.se_inimage'
+ ,format:'image/png'
+ ,transparent:true
+ ,dpi:96
+ },{
+ isBaseLayer:true
+ ,gutter:5
+ ,buffer:0
+ });
+
+ if (config.options.hasOverview) {
+ // get and define the max extent
+ var bbox = config.options.bbox;
+ var extent = new OpenLayers.Bounds(Number(bbox[0]),Number(bbox[1]),Number(bbox[2]),Number(bbox[3]));
+ var res = extent.getHeight()/90;
+ var resW = extent.getWidth()/180;
+ if (res <= resW)
+ res = resW;
+
+ map.addControl(new OpenLayers.Control.OverviewMap(
+ {div: document.getElementById("overviewmap"),
+ size : new OpenLayers.Size(220, 110),
+ mapOptions:{maxExtent:map.maxExtent
+ ,maxResolution:"auto"
+ ,minResolution:"auto"
+ //mieux calculé le coef 64 pour units == "m" et 8 sinon ???
+ //,scales: map.scales == null ? [map.minScale*64] : [Math.max.apply(Math,map.scales)*8]
+ ,scales: [OpenLayers.Util.getScaleFromResolution(res, map.projection.proj.units)]
+ ,projection:map.projection
+ ,units:map.projection.proj.units
+ ,layers:[ovLayer]
+ ,singleTile:true
+ }
+ }
+ ));
+ } else {
+ $('#overviewmap').hide();
+ $('#overview-bar button').hide();
+ }
+
+ /*
+ $('#overviewmap .ui-dialog-titlebar-close').button({
+ text:false,
+ icons:{primary: "ui-icon-closethick"}
+ }).click(function(){
+ $('#overviewmap').toggle();
+ return false;
+ });
+ */
+ $('#overview-bar .button').button({
+ text:false,
+ icons:{primary: "ui-icon-triangle-1-n"}
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ var icons = self.button('option','icons');
+ if (icons.primary == 'ui-icon-triangle-1-n')
+ self.button('option','icons',{primary:'ui-icon-triangle-1-s'});
+ else
+ self.button('option','icons',{primary:'ui-icon-triangle-1-n'});
+ $('#overviewmap').toggle();
+ return false;
+ });
+
+ map.addControl(new OpenLayers.Control.Scale(document.getElementById('scaletext')));
+ map.addControl(new OpenLayers.Control.ScaleLine({div:document.getElementById('scaleline')}));
+
+ if (config.options.hasOverview)
+ if(!mCheckMobile())
+ $('#overviewmap').show();
+ }
+
+ /**
+ * PRIVATE function: createNavbar
+ * create the navigation bar (zoom, scales, etc)
+ */
+ function createNavbar() {
+ $('#navbar div.slider').height(Math.max(50,map.numZoomLevels*5)).slider({
+ orientation:'vertical',
+ min: 0,
+ max: map.numZoomLevels-1,
+ change: function(evt,ui) {
+ if (ui.value > map.baseLayer.numZoomLevels-1) {
+ $('#navbar div.slider').slider('value',map.getZoom())
+ $('#zoom-in-max-msg').show('slow', function() {
+ window.setTimeout(function(){$('#zoom-in-max-msg').hide('slow')},1000)
+ });
+ } else
+ map.zoomTo(ui.value);
+ }
+ });
+ $('#navbar button.pan').button({
+ text:false,
+ icons:{primary: "ui-icon-pan"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var self = $(this);
+ if (self.hasClass('ui-state-select'))
+ return false;
+ $('#navbar button.zoom').removeClass('ui-state-select');
+ self.addClass('ui-state-select');
+ map.getControlsByClass('OpenLayers.Control.ZoomBox')[0].deactivate();
+ map.getControlsByClass('OpenLayers.Control.Navigation')[0].activate();
+ map.getControlsByClass('OpenLayers.Control.WMSGetFeatureInfo')[0].activate();
+ });
+ $('#navbar button.zoom').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var self = $(this);
+ if (self.hasClass('ui-state-select'))
+ return false;
+ $('#navbar button.pan').removeClass('ui-state-select');
+ self.addClass('ui-state-select');
+ map.getControlsByClass('OpenLayers.Control.Navigation')[0].deactivate();
+ map.getControlsByClass('OpenLayers.Control.WMSGetFeatureInfo')[0].deactivate();
+ map.getControlsByClass('OpenLayers.Control.ZoomBox')[0].activate();
+ });
+ $('#navbar button.zoom-extent').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom-extent"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ map.zoomToExtent(map.initialExtent);
+ });
+ $('#navbar button.zoom-in').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom-in"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ if (map.getZoom() == map.baseLayer.numZoomLevels-1)
+ $('#zoom-in-max-msg').show('slow', function() {
+ window.setTimeout(function(){$('#zoom-in-max-msg').hide('slow')},1000)
+ });
+ else
+ map.zoomIn();
+ });
+ $('#navbar button.zoom-out').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom-out"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ map.zoomOut();
+ });
+ if ( ('zoomHistory' in config.options)
+ && config.options['zoomHistory'] == "True") {
+ var hCtrl = new OpenLayers.Control.NavigationHistory();
+ map.addControls([hCtrl]);
+ $('#navbar div.history button.previous').button({
+ text:false,
+ icons:{primary: "ui-icon-previous"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var ctrl = map.getControlsByClass('OpenLayers.Control.NavigationHistory')[0];
+ if (ctrl && ctrl.previousStack.length != 0)
+ ctrl.previousTrigger();
+ if (ctrl && ctrl.previous.active)
+ $(this).addClass('ui-state-usable');
+ else
+ $(this).removeClass('ui-state-usable');
+ if (ctrl && ctrl.next.active)
+ $('#navbar div.history button.next').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.next').removeClass('ui-state-usable');
+ });
+ $('#navbar div.history button.next').button({
+ text:false,
+ icons:{primary: "ui-icon-next"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var ctrl = map.getControlsByClass('OpenLayers.Control.NavigationHistory')[0];
+ if (ctrl && ctrl.nextStack.length != 0)
+ ctrl.nextTrigger();
+ if (ctrl && ctrl.next.active)
+ $(this).addClass('ui-state-usable');
+ else
+ $(this).removeClass('ui-state-usable');
+ if (ctrl && ctrl.previous.active)
+ $('#navbar div.history button.previous').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.previous').removeClass('ui-state-usable');
+ });
+ map.events.on({
+ moveend : function() {
+ var ctrl = map.getControlsByClass('OpenLayers.Control.NavigationHistory')[0];
+ if (ctrl && ctrl.previousStack.length > 1)
+ $('#navbar div.history button.previous').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.previous').removeClass('ui-state-usable');
+ if (ctrl && ctrl.nextStack.length > 0)
+ $('#navbar div.history button.next').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.next').removeClass('ui-state-usable');
+ }
+ });
+ } else {
+ $('#navbar > .history').remove();
+ }
+ }
+
+ /**
+ * PRIVATE function: createToolbar
+ * create the tool bar (collapse overview and switcher, etc)
+ */
+ function createToolbar() {
+ var configOptions = config.options;
+
+ var info = addFeatureInfo();
+ controls['featureInfo'] = info;
+
+ if ( ('print' in configOptions)
+ && configOptions['print'] == 'True')
+ addPrintControl();
+ else
+ $('#togglePrint').parent().remove();
+
+ if ( ('geolocation' in configOptions)
+ && configOptions['geolocation'] == 'True')
+ addGeolocationControl();
+ else
+ $('#toggleGeolocate').parent().remove();
+
+
+ addEditionControls();
+
+ if ( ('measure' in configOptions)
+ && configOptions['measure'] == 'True')
+ addMeasureControls();
+ else {
+ $('#measure').parent().remove();
+ $('#measure-length-menu').remove();
+ $('#measure-area-menu').remove();
+ $('#measure-perimeter-menu').remove();
+ }
+
+ if ( ('externalSearch' in configOptions)
+ && configOptions['externalSearch'] == 'nominatim')
+ addNominatimSearch();
+ else
+ $('#nominatim-search').remove();
+
+ //addComplexPrintControl();
+ }
+
+ function deactivateToolControls( evt ) {
+ for (var id in controls) {
+ var ctrl = controls[id];
+ if (evt && ('object' in evt) && ctrl == evt.object)
+ continue;
+ if (ctrl.type == OpenLayers.Control.TYPE_TOOL)
+ ctrl.deactivate();
+ }
+ return true;
+ }
+
+ function addFeatureInfo() {
+ var info = new OpenLayers.Control.WMSGetFeatureInfo({
+ url: OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ ),
+ title: 'Identify features by clicking',
+ type:OpenLayers.Control.TYPE_TOGGLE,
+ queryVisible: true,
+ infoFormat: 'text/html',
+ eventListeners: {
+ getfeatureinfo: function(event) {
+ var text = event.text;
+ if (text != ''){
+ if (map.popups.length != 0)
+ map.removePopup(map.popups[0]);
+
+ var popup = new OpenLayers.Popup.LizmapAnchored(
+ "liz_layer_popup",
+ map.getLonLatFromPixel(event.xy),
+ null,
+ text,
+ null,
+ true,
+ function() {
+ map.removePopup(this);
+ if(mCheckMobile()){
+ $('#navbar').show();
+ $('#overview-box').show();
+ }
+ return false;
+ }
+ );
+ popup.panMapIfOutOfView = true;
+ map.addPopup(popup);
+ popup.verifySize();
+ // Hide navbar and overview in mobile mode
+ if(mCheckMobile()){
+ $('#navbar').hide();
+ $('#overview-box').hide();
+ }
+ }
+ }
+ }
+ });
+ if (lizUrls.publicUrlList && lizUrls.publicUrlList.length != 0 ) {
+ var layerUrls = [];
+ for (var j=0, jlen=lizUrls.publicUrlList.length; j<jlen; j++) {
+ layerUrls.push(
+ OpenLayers.Util.urlAppend(
+ lizUrls.publicUrlList[j],
+ OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ );
+ }
+ info.layerUrls = layerUrls;
+ }
+ info.findLayers = function() {
+ var candidates = this.layers || this.map.layers;
+ var layers = [];
+ var layer, url;
+ for(var i=0, len=candidates.length; i<len; ++i) {
+ layer = candidates[i];
+ if(layer instanceof OpenLayers.Layer.WMS &&
+ (!this.queryVisible || (layer.getVisibility() && layer.calculateInRange()))) {
+ var configLayer = config.layers[layer.params['LAYERS']];
+ if( configLayer && configLayer.popup && configLayer.popup == 'True'){
+ url = OpenLayers.Util.isArray(layer.url) ? layer.url[0] : layer.url;
+ // if the control was not configured with a url, set it
+ // to the first layer url
+ if(this.drillDown === false && !this.url) {
+ this.url = url;
+ }
+ if(this.drillDown === true || this.urlMatches(url)) {
+ layers.push(layer);
+ }
+
+ }
+ }
+ }
+ return layers;
+ };
+ map.addControl(info);
+ info.activate();
+ return info;
+ }
+
+ function getPrintScale( scale ) {
+ if (scale >= 9500 && scale <= 950000) {
+ scale = Math.round(scale / 1000) * 1000;
+ } else if (scale >= 950000) {
+ scale = Math.round(scale / 1000000) * 1000000;
+ } else {
+ scale = Math.round(scale);
+ }
+ return scale;
+ }
+
+ function addPrintControl() {
+ // if no composers removed print
+ if (composers.length == 0 ) {
+ $('#togglePrint').parent().remove();
+ return false;
+ }
+ var ptTomm = 0.35277; //conversion pt to mm
+ var printCapabilities = {scales:[],layouts:[]};
+
+ var scales = map.scales;
+ if ( scales == null && map.resolutions != null ) {
+ scales = [];
+ for( var i=0, len=map.resolutions.length; i<len; i++ ){
+ var units = map.getUnits();
+ var res = map.resolutions[i];
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scales.push(scale);
+ }
+ }
+ if ( scales == null ) {
+ $('#togglePrint').parent().remove();
+ return false;
+ }
+
+ var scaleOptions = '';
+ for( var i=0, len=scales.length; i<len; i++ ){
+ var scale = getPrintScale( scales[i] );
+ printCapabilities.scales.push(scale);
+ var scaleText = scale;
+ if (scale >= 9500 && scale <= 950000) {
+ scaleText = Math.round(scale / 1000) + " 000";
+ } else if (scale >= 950000) {
+ scaleText = Math.round(scale / 1000000) + " 000 000";
+ } else {
+ scaleText = Math.round(scale)+'';
+ scaleText = scaleText[0]+' '+scaleText.slice(1);
+ }
+ scaleOptions += '<option value="'+scale+'">'+scaleText+'</option>';
+ }
+ $('#print-menu select.btn-print-scales').html(scaleOptions);
+
+ // creating printCapabilities layouts
+ for( var i=0, len= composers.length; i<len; i++ ){
+ var composer = composers[i];
+ var composerMap = composer.getElementsByTagName('ComposerMap');
+ if (composerMap.length != 0) {
+ composerMap = composerMap[0];
+ var mapWidth = Number(composerMap.getAttribute('width')) / ptTomm;
+ var mapHeight = Number(composerMap.getAttribute('height')) / ptTomm;
+ //for some strange reason we need to provide a "map" and a "size" object with identical content
+ printCapabilities.layouts.push({
+ "name": composer.getAttribute('name'),
+ "map": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "size": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "rotation": false,
+ "composer": composer
+ });
+ }
+ }
+
+ // if no printCapabilities layouts removed print
+ if( printCapabilities.layouts.length == 0 ) {
+ $('#togglePrint').parent().remove();
+ return false;
+ }
+
+ // creating the print layer
+ var layer = map.getLayersByName('Print');
+ if ( layer.length == 0 ) {
+ layer = new OpenLayers.Layer.Vector('Print',{
+ styleMap: new OpenLayers.StyleMap({
+ "default": new OpenLayers.Style({
+ fillColor: "#D43B19",
+ fillOpacity: 0.2,
+ strokeColor: "#CE1F2D",
+ strokeWidth: 1,
+ })
+ })
+ });
+ map.addLayer(layer);
+ layer.setVisibility(false);
+ } else
+ layer = layer[0];
+ if ( layer.features.length == 0 )
+ layer.addFeatures([
+ new OpenLayers.Feature.Vector(
+ new OpenLayers.Geometry.Polygon([
+ new OpenLayers.Geometry.LinearRing([
+ new OpenLayers.Geometry.Point(-1, -1),
+ new OpenLayers.Geometry.Point(1, -1),
+ new OpenLayers.Geometry.Point(1, 1),
+ new OpenLayers.Geometry.Point(-1, 1)
+ ])
+ ])
+ )
+ ]);
+
+ // creating print menu
+ for( var i=0, len= printCapabilities.layouts.length; i<len; i++ ){
+ var layout = printCapabilities.layouts[i];
+ $('#togglePrint ~ .dropdown-menu').append('<li><a href="#'+i+'">'+layout.name+'</a></li>');
+ }
+
+ var dragCtrl = new OpenLayers.Control.DragFeature(layer,{
+ geometryTypes: ['OpenLayers.Geometry.Polygon'],
+ type:OpenLayers.Control.TYPE_TOOL,
+ layout: null,
+ eventListeners: {
+ "activate": function(evt) {
+ if (this.layout == null)
+ return false;
+
+ deactivateToolControls(evt);
+
+ var layout = this.layout;
+ var units = map.getUnits();
+ // get scale and update the select
+ var res = map.getResolution()/2;
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ var scaleIdx = printCapabilities.scales.indexOf( scale );
+ if ( scaleIdx == -1 ) {
+ res = map.getResolution();
+ scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ }
+ $('#print-menu select.btn-print-scales').val(scale);
+
+ var center = map.getCenter();
+ var size = layout.size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+
+ $('#togglePrint').parent().addClass('active');
+ $('#print-menu .title .text').html(layout.name);
+ $('#print-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['print.activate'],'info',true).addClass('print');
+ layer.setVisibility(true);
+ evt.object.clickFeature(feat);
+ },
+ "deactivate": function(evt) {
+ layer.setVisibility(false);
+ $('#togglePrint').parent().removeClass('active');
+ $('#print-menu').hide();
+ updateSwitcherSize();
+ $('#message .print').remove();
+ this.layout = null;
+ }
+ }
+ });
+ map.addControls([dragCtrl]);
+ controls['printDrag'] = dragCtrl;
+
+ // set event listener to togglePrint
+ $('#togglePrint ~ .dropdown-menu').find('a').click(function() {
+ var self = $(this);
+ var layout = printCapabilities.layouts[parseInt( self.attr('href').slice(1) )];
+ //$('#togglePrint').click(function() {
+ if (dragCtrl.active && dragCtrl.layout == layout) {
+ dragCtrl.deactivate();
+ } else if (dragCtrl.active) {
+ dragCtrl.deactivate();
+ dragCtrl.layout = layout;
+ dragCtrl.activate();
+ } else {
+ dragCtrl.layout = layout;
+ dragCtrl.activate();
+ }
+ if ( $('#togglePrint ~ .dropdown-menu').is(':visible') )
+ $('#togglePrint').dropdown('toggle');
+ return false;
+ });
+
+ $('#print-menu button.btn-print-clear').click(function() {
+ dragCtrl.deactivate();
+ return false;
+ });
+ $('#print-menu select.btn-print-scales').change(function() {
+ if ( dragCtrl.active && layer.getVisibility() ) {
+ var self = $(this);
+ var units = map.getUnits();
+ var scale = parseFloat(self.val());
+ var center = map.getCenter();
+ var size = printCapabilities.layouts[0].size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ layer.drawFeature(feat);
+ }
+ });
+ $('#print-menu button.btn-print-launch').click(function() {
+ var composer = dragCtrl.layout.composer;
+ var composerMap = composer.getElementsByTagName('ComposerMap');
+ if (composerMap.length != 0) {
+ composerMap = composerMap[0].getAttribute('name');
+ var extent = dragCtrl.layer.features[0].geometry.getBounds();
+ var url = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ url += '&SERVICE=WMS';
+ //url += '&VERSION='+capabilities.version+'&REQUEST=GetPrint';
+ url += '&VERSION=1.3&REQUEST=GetPrint';
+ url += '&FORMAT=pdf&EXCEPTIONS=application/vnd.ogc.se_inimage&TRANSPARENT=true';
+ url += '&SRS='+map.projection;
+ url += '&DPI=300';
+ url += '&TEMPLATE='+composer.getAttribute('name');
+ url += '&'+composerMap+':extent='+extent;
+ url += '&'+composerMap+':rotation=0';
+ url += '&'+composerMap+':scale='+$('#print-menu select.btn-print-scales').val();
+ var printLayers = [];
+ $.each(map.layers, function(i, l) {
+ if (l.getVisibility() && l.CLASS_NAME == "OpenLayers.Layer.WMS")
+ printLayers.push(l.params['LAYERS']);
+ });
+ url += '&LAYERS='+printLayers.join(',');
+ window.open(url);
+ }
+ return false;
+ });
+ map.events.on({
+ "zoomend": function() {
+ if ( dragCtrl.active && layer.getVisibility() ) {
+ var units = map.getUnits();
+ var res = map.getResolution()/2;
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ var scaleIdx = printCapabilities.scales.indexOf( scale );
+ if ( scaleIdx == -1 ) {
+ res = map.getResolution();
+ scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ }
+ $('#print-menu select.btn-print-scales').val(scale);
+ var center = map.getCenter();
+ var size = printCapabilities.layouts[0].size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ layer.drawFeature(feat);
+ }
+ }
+ });
+ }
+
+ function addComplexPrintControl() {
+ var ptTomm = 0.35277; //conversion pt to mm
+ var printCapabilities = {scales:[],layouts:[]};
+ for (var i=0, len=composers.length; i<len; i++) {
+ var composer = composers[i];
+ var composerMap = composer.getElementsByTagName('ComposerMap');
+ if (composerMap.length != 0) {
+ composerMap = composerMap[0];
+ var mapWidth = Number(composer.getElementsByTagName('ComposerMap')[0].getAttribute('width')) / ptTomm;
+ var mapHeight = Number(composer.getElementsByTagName('ComposerMap')[0].getAttribute('height')) / ptTomm;
+ //for some strange reason we need to provide a "map" and a "size" object with identical content
+ printCapabilities.layouts.push({
+ "name": composer.getAttribute('name'),
+ "map": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "size": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "rotation": true
+ });
+ }
+ }
+ var layer = map.getLayersByName('Print');
+ if ( layer.length == 0 ) {
+ layer = new OpenLayers.Layer.Vector('Print');
+ map.addLayer(layer);
+ layer.setVisibility(false);
+ } else
+ layer = layer[0];
+ if ( layer.features.length == 0 )
+ layer.addFeatures([
+ new OpenLayers.Feature.Vector(
+ new OpenLayers.Geometry.Polygon([
+ new OpenLayers.Geometry.LinearRing([
+ new OpenLayers.Geometry.Point(-1, -1),
+ new OpenLayers.Geometry.Point(1, -1),
+ new OpenLayers.Geometry.Point(1, 1),
+ new OpenLayers.Geometry.Point(-1, 1)
+ ])
+ ])
+ )
+ ]);
+ var transformCtrl = new OpenLayers.Control.TransformFeature(layer,{
+ preserveAspectRatio: true,
+ rotate: true,
+ geometryTypes: ['OpenLayers.Geometry.Polygon'],
+ eventListeners: {
+ "activate": function(e) {
+ var units = map.getUnits();
+ var res = map.getResolution()/2;
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ var center = map.getCenter();
+ var size = printCapabilities.layouts[0].size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ layer.setVisibility(true);
+ //e.object.setFeature(feat);
+ },
+ "deactivate": function(e) {
+ //layer.destroyFeatures();
+ layer.setVisibility(false);
+ },
+ "beforesetfeature": function(e) {
+ },
+ "setfeature": function(e) {
+ },
+ "beforetransform": function(e) {
+ },
+ "transformcomplete": function(e) {
+ }
+ }
+ });
+ map.addControls([transformCtrl]);
+ controls['printTransform'] = transformCtrl;
+ //pour activer il suffit de faire un setFeature
+ //transformCtrl.setFeature(layer.features[0]);
+ return true;
+ }
+
+ function addEditionControls() {
+ // Edition layers
+ if ('editionLayers' in config) {
+ //initialize edition
+ $('#edition-modal').modal();
+ var service = OpenLayers.Util.urlAppend(lizUrls.edition
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if (al.capabilities.modifyGeometry == "False"
+ && al.capabilities.modifyAttribute == "False"
+ && al.capabilities.deleteFeature == "False"
+ && al.capabilities.createFeature == "False") {
+ delete config.editionLayers[alName];
+ continue;
+ }
+ if (alName in config.layers) {
+ var alConfig = config.layers[alName];
+ $('#edition ~ .dropdown-menu').append('<li><a href="#'+alName+'">'+alConfig.title+'</a></li>');
+ }
+ }
+
+ // initiatlize layer
+ // style the sketch fancy
+ var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 6
+ },
+ "Line": {
+ strokeWidth: 4
+ },
+ "Polygon": {
+ strokeWidth: 2
+ }
+ };
+ var style = new OpenLayers.Style();
+ style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+ ]);
+ var styleMap = new OpenLayers.StyleMap({"default": style});
+ var editLayer = new OpenLayers.Layer.Vector('editLayer',{styleMap:styleMap});
+ map.addLayer(editLayer);
+
+ // initialize controls
+ OpenLayers.Control.EditionClick =
+ OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'double': false,
+ 'pixelTolerance': 0,
+ 'stopSingle': true,
+ 'stopDouble': false
+ },
+ layerId: '',
+ clickTolerance: 5,
+ initialize: function(options) {
+ this.handlerOptions = OpenLayers.Util.extend(
+ {}, this.defaultHandlerOptions
+ );
+ OpenLayers.Control.prototype.initialize.apply(
+ this, arguments
+ );
+ this.handler = new OpenLayers.Handler.Click(
+ this, {
+ 'click': this.trigger
+ }, this.handlerOptions
+ );
+ },
+ pixelToBounds: function(pixel) {
+ var llPx = pixel.add(-this.clickTolerance/2, this.clickTolerance/2);
+ var urPx = pixel.add(this.clickTolerance/2, -this.clickTolerance/2);
+ var ll = this.map.getLonLatFromPixel(llPx);
+ var ur = this.map.getLonLatFromPixel(urPx);
+ return new OpenLayers.Bounds(ll.lon, ll.lat, ur.lon, ur.lat);
+ },
+ trigger: function(e) {
+ var bounds = this.pixelToBounds(e.xy);
+ var crs = this.map.getProjectionObject().toString();
+ if ( crs == 'EPSG:900913' )
+ crs = 'EPSG:3857';
+ $.get(service,{
+ layerId: this.layerId,
+ bbox: bounds.toBBOX(),
+ crs: crs
+ }, function(data){
+ $('#edition-modal').html(data);
+ $('#edition-modal form').submit(function() {
+ var self = $(this);
+ var srid = self.find('input[name="liz_srid"]').val();
+ if ( !('EPSG:'+srid in Proj4js.defs) )
+ Proj4js.defs['EPSG:'+srid] = self.find('input[name="liz_proj4"]').val();
+ var geom = self.find('input[name="liz_geometryColumn"]').val();
+ var wkt = self.find('input[name="'+geom+'"]').val();
+ var format = new OpenLayers.Format.WKT({
+ externalProjection: 'EPSG:'+srid,
+ internalProjection: editLayer.projection
+ });
+ var feat = format.read(wkt);
+ feat.fid = self.find('input[name="liz_featureId"]').val();
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val(srid);
+ form.find('input[name="liz_geometryColumn"]').val(geom);
+ form.find('input[name="liz_wkt"]').val(feat.geometry);
+ form.find('input[name="liz_featureId"]').val(feat.fid);
+ editLayer.addFeatures([feat]);
+ $('#edition-modal').modal('hide');
+ return false;
+ });
+ $('#edition-modal').modal('show');
+ });
+ return false;
+ }
+ });
+ var editCtrls = {
+ panel: new OpenLayers.Control({
+ type: OpenLayers.Control.TYPE_TOOL,
+ eventListeners: {
+ activate: function( evt ) {
+ deactivateToolControls( evt );
+ },
+ deactivate: function( evt ) {
+ for ( var c in editCtrls ) {
+ if ( editCtrls[c].active )
+ editCtrls[c].deactivate();
+ }
+ $('#edition-menu').hide();
+ }
+ }
+ }),
+ click: new OpenLayers.Control.EditionClick(),
+ point: new OpenLayers.Control.DrawFeature(editLayer,
+ OpenLayers.Handler.Point),
+ line: new OpenLayers.Control.DrawFeature(editLayer,
+ OpenLayers.Handler.Path),
+ polygon: new OpenLayers.Control.DrawFeature(editLayer,
+ OpenLayers.Handler.Polygon),
+ modify: new OpenLayers.Control.ModifyFeature(editLayer)
+ };
+ for ( var ctrl in editCtrls ) {
+ map.addControls([editCtrls[ctrl]]);
+ }
+ controls['edition'] = editCtrls.panel;
+
+ function manageEditionAdd(aData) {
+ $('#edition-modal').html(aData);
+ $('#edition-modal form').submit(function() {
+ var self = $(this);
+ $.post(self.attr('action'),
+ self.serialize(),
+ function(data) {
+ manageEditionAdd(data);
+ });
+ return false;
+ });
+ if ( $('#edition-modal form').length != 0 ) {
+ $('#edition-modal button[data-dismiss="modal"]').click(
+ function() {
+ editLayer.destroyFeatures();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ }
+ );
+ }
+ if ( $('#edition-modal form').length == 0 ) {
+ for ( var ctrl in editCtrls ) {
+ if ( ctrl !="panel" && editCtrls[ctrl].active)
+ editCtrls[ctrl].deactivate();
+ }
+ var layerId = editCtrls.click.layerId;
+ $.each(layers, function(i, l) {
+ if (config.layers[l.params['LAYERS']].id != layerId)
+ return true;
+ l.redraw(true);
+ return false;
+ });
+ editLayer.destroyFeatures();
+ editCtrls.modify.activate();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ }
+ }
+
+ function manageEditionGeom(aData) {
+ $('#edition-modal').html(aData);
+ $('#edition-modal form').submit(function() {
+ var self = $(this);
+ $.post(self.attr('action'),
+ self.serialize(),
+ function(data) {
+ manageEditionGeom(data);
+ });
+ return false;
+ });
+ if ( $('#edition-modal form').length != 0 ) {
+ $('#edition-modal button[data-dismiss="modal"]').click(
+ function() {
+ var format = new OpenLayers.Format.WKT();
+ var wkt = $('#edition-menu form input[name="liz_wkt"]').val();
+ var wktFeat = format.read(wkt);
+ var geom = wktFeat.geometry.clone();
+ var feat = editLayer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ editLayer.drawFeature(feat);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True")
+ editCtrls.modify.selectControl.select(feat);
+ }
+ );
+ }
+ if ( $('#edition-modal form').length == 0 ) {
+ var layerId = editCtrls.click.layerId;
+ $.each(layers, function(i, l) {
+ if (config.layers[l.params['LAYERS']].id != layerId)
+ return true;
+ l.redraw(true);
+ return false;
+ });
+ editLayer.drawFeature(editLayer.features[0]);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True")
+ editCtrls.modify.selectControl.select(editLayer.features[0]);
+ }
+ }
+
+ // edit layer events
+ editLayer.events.on({
+ featureadded: function(evt) {
+ if ( editCtrls.click.active ) {
+ editCtrls.click.deactivate();
+ $('#lizmap-edition-message').remove();
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True") {
+ editCtrls.modify.activate();
+ editCtrls.modify.selectControl.select(evt.feature);
+ mAddMessage(lizDict['edition.select.modify.activate'],'info',true).attr('id','lizmap-edition-message');
+ }
+ $('#edition-select-unselect').removeClass('disabled');
+ $('#edition-select-attr').removeClass('disabled');
+ $('#edition-select-delete').removeClass('disabled');
+ } else {
+ $.get(service.replace('getFeature','createFeature'),{
+ layerId: editCtrls.click.layerId,
+ }, function(data){
+ manageEditionAdd(data);
+ var form = $('#edition-modal form');
+ var srid = form.find('input[name="liz_srid"]').val();
+ if ( !('EPSG:'+srid in Proj4js.defs) )
+ Proj4js.defs['EPSG:'+srid] = form.find('input[name="liz_proj4"]').val();
+ var gColumn = form.find('input[name="liz_geometryColumn"]').val();
+ var geom = editLayer.features[0].geometry.clone();
+ geom.transform(editLayer.projection,'EPSG:'+srid);
+ $('#edition-modal form input[name="'+gColumn+'"]').val(geom);
+ $('#edition-modal').modal('show');
+ });
+ }
+ },
+ featureselected: function(evt) {
+ $('#edition-menu form input[name="liz_wkt"]').val(evt.feature.geometry);
+ },
+ featureunselected: function(evt) {
+ var wkt = $('#edition-menu form input[name="liz_wkt"]').val();
+ $.get(service.replace('getFeature','modifyFeature'),{
+ layerId: editCtrls.click.layerId,
+ featureId: evt.feature.fid
+ }, function(data){
+ manageEditionGeom(data);
+ var form = $('#edition-modal form');
+ var srid = form.find('input[name="liz_srid"]').val();
+ if ( !('EPSG:'+srid in Proj4js.defs) )
+ Proj4js.defs['EPSG:'+srid] = form.find('input[name="liz_proj4"]').val();
+ var gColumn = form.find('input[name="liz_geometryColumn"]').val();
+ var geom = evt.feature.geometry.clone();
+ geom.transform(editLayer.projection,'EPSG:'+srid);
+ $('#edition-modal form input[name="'+gColumn+'"]').val(geom);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyAttribute == "False") {
+ form.submit();
+ form.hide();
+ }
+ $('#edition-modal').modal('show');
+ });
+ },
+ sketchmodified: function(evt) {
+ if ( evt.vertex.parent == null )
+ return true;
+ var class_name = evt.vertex.parent.CLASS_NAME;
+ if ( $('#edition-draw-clear').hasClass('disabled') ) {
+ if ( class_name == 'OpenLayers.Geometry.LineString' ) {
+ if (evt.vertex.parent.components.length == 2 ) {
+ $('#edition-draw-clear').removeClass('disabled');
+ }
+ } else if ( class_name == 'OpenLayers.Geometry.LinearRing' ) {
+ if (evt.vertex.parent.components.length == 3 ) {
+ $('#edition-draw-clear').removeClass('disabled');
+ }
+ }
+ }
+ if ( $('#edition-draw-save').hasClass('disabled') ) {
+ if ( class_name == 'OpenLayers.Geometry.LineString' ) {
+ if (evt.vertex.parent.components.length > 2 ) {
+ $('#edition-draw-save').removeClass('disabled');
+ }
+ } else if ( class_name == 'OpenLayers.Geometry.LinearRing' ) {
+ if (evt.vertex.parent.components.length > 3 ) {
+ $('#edition-draw-save').removeClass('disabled');
+ }
+ }
+ }
+ },
+ vertexmodified: function(evt) {
+ if ( $('#edition-select-undo').hasClass('disabled') ) {
+ $('#edition-select-undo').removeClass('disabled');
+ }
+ }
+ });
+
+ $('#edition ~ .dropdown-menu').find('a').click(function() {
+ editCtrls.panel.activate();
+ var menu = $('#edition-menu');
+ var alName = $(this).attr('href').slice(1);
+ if (alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( editCtrls.click.layerId == al.layerId) {
+ $('#edition-stop').click();
+ } else {
+ // update toolbar based on capabilities
+ if (al.capabilities.deleteFeature == "False")
+ $('#edition-select-delete').hide()
+ else
+ $('#edition-select-delete').show()
+ if (al.capabilities.modifyAttribute == "False")
+ $('#edition-select-attr').hide()
+ else
+ $('#edition-select-attr').show()
+ if (al.capabilities.modifyGeometry == "False")
+ $('#edition-select-undo').hide()
+ else
+ $('#edition-select-undo').show()
+
+ if ( $('#edition-menu-draw').is(':visible') )
+ $('#edition-draw-cancel').click();
+ if ( $('#edition-menu-select').is(':visible') )
+ $('#edition-select-cancel').click();
+
+ if (alName in config.layers)
+ $('#edition-menu h3 span.title span.text').html(config.layers[alName].title);
+ else
+ $('#edition-menu h3 span.title span.text').html(lizDict['edition.title']);
+ editCtrls.click.layerId = al.layerId;
+ editCtrls.click.layerName = alName;
+ menu.show();
+ if (al.capabilities.createFeature == "False") {
+ $('#edition-draw').hide();
+ $('#edition-select-cancel').hide();
+ $('#edition-select').click();
+ } else {
+ $('#edition-draw').show();
+ $('#edition-select-cancel').show();
+ }
+ if (al.capabilities.modifyGeometry == "False"
+ && al.capabilities.modifyAttribute == "False"
+ && al.capabilities.deleteFeature == "False") {
+ $('#edition-select').hide();
+ $('#edition-draw-cancel').hide();
+ $('#edition-draw').click();
+ } else {
+ $('#edition-select').show();
+ $('#edition-draw-cancel').show();
+ }
+ }
+ }
+ updateSwitcherSize();
+ if ( $('#edition ~ .dropdown-menu').is(':visible') )
+ $('#edition').dropdown('toggle');
+ return false;
+ });
+
+ $('#edition-stop').click(function(){
+ $('#edition-menu h3 span.title span.text').html(lizDict['edition.title']);
+ editCtrls.click.layerId = '';
+ editCtrls.click.layerName = '';
+ editCtrls.panel.deactivate();
+ editLayer.destroyFeatures();
+ $('#edition-menu-draw').hide();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ $('#edition-menu-select').hide();
+ $('#edition-select-unselect').addClass('disabled');
+ $('#edition-select-attr').addClass('disabled');
+ $('#edition-select-undo').addClass('disabled');
+ $('#edition-select-delete').addClass('disabled');
+ $('#edition-menu-start').show();
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val('');
+ form.find('input[name="liz_geometryColumn"]').val('');
+ form.find('input[name="liz_wkt"]').val('');
+ form.find('input[name="liz_featureId"]').val('');
+ updateSwitcherSize();
+ return false;
+ });
+
+ $('#edition-select').click(function(){
+ if ( !$('#edition-menu-start').is(':visible') )
+ return false;
+
+ $('#edition-menu-start').hide();
+ $('#edition-menu-select').show();
+ editCtrls.click.activate();
+ $('#lizmap-edition-message').remove();
+ mAddMessage(lizDict['edition.select.activate'],'info',true).attr('id','lizmap-edition-message');
+ return false;
+ });
+ $('#edition-select-cancel').click(function(){
+ $('#lizmap-edition-message').remove();
+ editLayer.destroyFeatures();
+ editCtrls.click.deactivate();
+ editCtrls.modify.deactivate();
+ $('#edition-select-unselect').addClass('disabled');
+ $('#edition-select-attr').addClass('disabled');
+ $('#edition-select-undo').addClass('disabled');
+ $('#edition-select-delete').addClass('disabled');
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val('');
+ form.find('input[name="liz_geometryColumn"]').val('');
+ form.find('input[name="liz_wkt"]').val('');
+ form.find('input[name="liz_featureId"]').val('');
+ $('#edition-menu-select').hide();
+ $('#edition-menu-start').show();
+ updateSwitcherSize();
+ return false;
+ });
+ $('#edition-select-unselect').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ editLayer.destroyFeatures();
+ editCtrls.modify.deactivate();
+ editCtrls.click.activate();
+ $('#edition-select-unselect').addClass('disabled');
+ $('#edition-select-attr').addClass('disabled');
+ $('#edition-select-undo').addClass('disabled');
+ $('#edition-select-delete').addClass('disabled');
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val('');
+ form.find('input[name="liz_geometryColumn"]').val('');
+ form.find('input[name="liz_wkt"]').val('');
+ form.find('input[name="liz_featureId"]').val('');
+ return false;
+ });
+ $('#edition-select-undo').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var format = new OpenLayers.Format.WKT();
+ var wkt = $('#edition-menu form input[name="liz_wkt"]').val();
+ var wktFeat = format.read(wkt);
+ var geom = wktFeat.geometry.clone();
+ var feat = editLayer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ editLayer.drawFeature(feat);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True")
+ editCtrls.modify.selectControl.select(feat);
+ return false;
+ });
+ $('#edition-select-attr').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ editCtrls.modify.selectControl.unselect(editLayer.features[0]);
+ return false;
+ });
+ $('#edition-select-delete').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var featureId = $('#edition-menu form input[name="liz_featureId"]').val();
+ if ( featureId == '' )
+ return false;
+ if ( !confirm( "Are you sure you want to delete the selected feature?" ) )
+ return false;
+ $.get(service.replace('getFeature','deleteFeature'),{
+ layerId: editCtrls.click.layerId,
+ featureId: featureId
+ }, function(data){
+ $('#edition-modal').html(data);
+ $('#edition-modal').modal('show');
+ editLayer.destroyFeatures();
+ $('#edition-select-unselect').click();
+ var layerId = editCtrls.click.layerId;
+ $.each(layers, function(i, l) {
+ if (config.layers[l.params['LAYERS']].id != layerId)
+ return true;
+ l.redraw(true);
+ return false;
+ });
+ });
+ return false;
+ });
+
+ $('#edition-draw').click(function(){
+ if ( !$('#edition-menu-start').is(':visible') )
+ return false;
+
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType == '' )
+ return false;
+
+ var ctrl = editCtrls[geomType];
+ if ( ctrl.active ) {
+ return false;
+ } else {
+ ctrl.activate();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ $('#edition-menu-start').hide();
+ $('#edition-menu-draw').show();
+ updateSwitcherSize();
+ $('#lizmap-edition-message').remove();
+ mAddMessage(lizDict['edition.draw.activate'],'info',true).attr('id','lizmap-edition-message');
+ }
+ return false;
+ });
+ $('#edition-draw-cancel').click(function(){
+ $('#lizmap-edition-message').remove();
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType != '' ) {
+ var ctrl = editCtrls[geomType];
+ ctrl.deactivate();
+ }
+ editLayer.destroyFeatures();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ $('#edition-menu-draw').hide();
+ $('#edition-menu-start').show();
+ updateSwitcherSize();
+ return false;
+ });
+ $('#edition-draw-save').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType != '' ) {
+ var ctrl = editCtrls[geomType];
+ ctrl.finishSketch();
+ }
+ return false;
+ });
+ $('#edition-draw-clear').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType != '' ) {
+ var ctrl = editCtrls[geomType];
+ ctrl.cancel();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ }
+ return false;
+ });
+
+ $('#edition-menu a[rel="tooltip"]').tooltip();
+
+ } else {
+ $('#edition').parent().remove();
+ $('#edition-menu').remove();
+ $('#edition-modal').remove();
+ }
+ }
+
+ function addMeasureControls() {
+ // style the sketch fancy
+ var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 4,
+ graphicName: "square",
+ fillColor: "white",
+ fillOpacity: 1,
+ strokeWidth: 1,
+ strokeOpacity: 1,
+ strokeColor: "#333333"
+ },
+ "Line": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ strokeColor: "#666666",
+ strokeDashstyle: "dash"
+ },
+ "Polygon": {
+ strokeWidth: 2,
+ strokeOpacity: 1,
+ strokeColor: "#666666",
+ strokeDashstyle: "dash",
+ fillColor: "white",
+ fillOpacity: 0.3
+ }
+ };
+ var style = new OpenLayers.Style();
+ style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+ ]);
+ var styleMap = new OpenLayers.StyleMap({"default": style});
+
+ var measureControls = {
+ length: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Path, {
+ persist: true,
+ geodesic: true,
+ immediate: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ },
+ type:OpenLayers.Control.TYPE_TOOL
+ }
+ ),
+ area: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Polygon, {
+ persist: true,
+ geodesic: true,
+ immediate: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ },
+ type:OpenLayers.Control.TYPE_TOOL
+ }
+ ),
+ perimeter: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Polygon, {
+ persist: true,
+ geodesic: true,
+ immediate: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ },
+ type:OpenLayers.Control.TYPE_TOOL
+ }
+ )
+ };
+ measureControls.length.events.on({
+ activate: function(evt) {
+ deactivateToolControls(evt);
+ $('#measure').parent().addClass('active');
+ $('#measure-length-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['measure.activate.length'],'info',true).attr('id','lizmap-measure-message');
+ },
+ deactivate: function(evt) {
+ $('#measure').parent().removeClass('active');
+ $('#measure-length-menu').hide();
+ updateSwitcherSize();
+ $('#lizmap-measure-message').remove();
+ }
+ });
+ measureControls.area.events.on({
+ activate: function(evt) {
+ deactivateToolControls(evt);
+ $('#measure').parent().addClass('active');
+ $('#measure-area-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['measure.activate.area'],'info',true).attr('id','lizmap-measure-message');
+ },
+ deactivate: function(evt) {
+ $('#measure').parent().removeClass('active');
+ $('#measure-area-menu').hide();
+ updateSwitcherSize();
+ $('#lizmap-measure-message').remove();
+ }
+ });
+ measureControls.perimeter.measure = function(geometry, eventType) {
+ var stat, order;
+ if(geometry.CLASS_NAME.indexOf('LineString') > -1) {
+ stat = this.getBestLength(geometry);
+ order = 1;
+ } else {
+ stat = this.getBestLength(geometry.components[0]);
+ order = 1;
+ }
+ this.events.triggerEvent(eventType, {
+ measure: stat[0],
+ units: stat[1],
+ order: order,
+ geometry: geometry
+ });
+ };
+ measureControls.perimeter.events.on({
+ activate: function(evt) {
+ deactivateToolControls(evt);
+ $('#measure').parent().addClass('active');
+ $('#measure-perimeter-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['measure.activate.perimeter'],'info',true).attr('id','lizmap-measure-message');
+ },
+ deactivate: function(evt) {
+ $('#measure').parent().removeClass('active');
+ $('#measure-perimeter-menu').hide();
+ updateSwitcherSize();
+ $('#lizmap-measure-message').remove();
+ }
+ });
+
+ function handleMeasurements(evt) {
+ var geometry = evt.geometry;
+ var units = evt.units;
+ var order = evt.order;
+ var measure = evt.measure;
+ var out = "";
+ if(order == 1) {
+ out += lizDict['measure.handle']+" " + measure.toFixed(3) + " " + units;
+ } else {
+ out += lizDict['measure.handle']+" " + measure.toFixed(3) + " " + units + "<sup>2</" + "sup>";
+ }
+ var element = $('#lizmap-measure-message');
+ if ( element.length == 0 ) {
+ element = mAddMessage(out);
+ element.attr('id','lizmap-measure-message');
+ } else {
+ element.html('<p>'+out+'</p>');
+ }
+ }
+ for(var key in measureControls) {
+ var control = measureControls[key];
+ control.events.on({
+ "measure": handleMeasurements,
+ "measurepartial": handleMeasurements,
+ "activate": function(evt) {
+ deactivateToolControls(evt);
+ }
+ });
+ map.addControl(control);
+ controls[key+'Measure'] = control;
+ // click in the navbar
+ $('#measure-'+key).click(function() {
+ var keyId = $(this).attr('id').replace('measure-','');
+ if ( measureControls[keyId].active )
+ measureControls[keyId].deactivate();
+ else
+ measureControls[keyId].activate();
+ $('#measure').dropdown('toggle');
+ return false;
+ });
+ // click to stop
+ $('#measure-'+key+'-stop').click(function() {
+ var keyId = $(this).attr('id').replace('measure-','');
+ keyId = keyId.replace('-stop','');
+ measureControls[keyId].deactivate();
+ });
+ }
+ return measureControls;
+ }
+
+ function addGeolocationControl() {
+ var style = {
+ fillColor: '#0395D6',
+ fillOpacity: 0.1,
+ strokeColor: '#0395D6',
+ strokeWidth: 1
+ };
+ var vector = new OpenLayers.Layer.Vector('geolocation');
+ map.addLayer(vector);
+ var geolocate = new OpenLayers.Control.Geolocate({
+ type: OpenLayers.Control.TYPE_TOGGLE,
+ bind: false,
+ watch: true,
+ geolocationOptions: {
+ enableHighAccuracy: true,
+ maximumAge: 5000,
+ timeout: 30000
+ }
+ });
+ map.addControl(geolocate);
+ var firstGeolocation = true;
+ geolocate.events.on({
+ "locationupdated": function(evt) {
+ vector.destroyFeatures();
+ var circle = new OpenLayers.Feature.Vector(
+ OpenLayers.Geometry.Polygon.createRegularPolygon(
+ evt.point.clone(),
+ evt.position.coords.accuracy/2,
+ 40,
+ 0
+ ),
+ {},
+ style
+ );
+ vector.addFeatures([
+ new OpenLayers.Feature.Vector(
+ evt.point,
+ {},
+ {
+ graphicName: 'circle',
+ strokeColor: '#0395D6',
+ strokeWidth: 1,
+ fillOpacity: 1,
+ fillColor: '#0395D6',
+ pointRadius: 3
+ }
+ ),
+ circle
+ ]);
+ if (firstGeolocation) {
+ map.zoomToExtent(vector.getDataExtent());
+ //pulsate(circle);
+ firstGeolocation = false;
+ if ( $('#geolocate-menu-bind').hasClass('active') )
+ this.bind = true;
+ }
+ },
+ "locationfailed": function(evt) {
+ if ( vector.features.length == 0 )
+ mAddMessage(lizDict['geolocation.failed'],'error',true);
+ },
+ "activate": function(evt) {
+ $('#toggleGeolocate').parent().addClass('active');
+ $('#geolocate-menu').show();
+ updateSwitcherSize();
+ },
+ "deactivate": function(evt) {
+ vector.destroyFeatures();
+ $('#toggleGeolocate').parent().removeClass('active');
+ $('#geolocate-menu').hide();
+ updateSwitcherSize();
+ $('#geolocate-menu-bind').removeClass('btn-info active').addClass('btn-success');
+ geolocate.bind = false;
+ }
+ });
+ controls['geolocation'] = geolocate;
+ $('#toggleGeolocate').click(function() {
+ if (geolocate.active)
+ geolocate.deactivate();
+ else
+ geolocate.activate();
+ return false;
+ });
+ $('#geolocate-menu-center').click(function(){
+ if (vector.features.length != 0 )
+ map.setCenter(vector.getDataExtent().getCenterLonLat());
+ });
+ $('#geolocate-menu-bind').click(function(){
+ var self = $(this);
+ if ( self.hasClass('active') ) {
+ self.removeClass('btn-info active').addClass('btn-success');
+ geolocate.bind = false;
+ } else {
+ self.removeClass('btn-success').addClass('btn-info active');
+ geolocate.bind = true;
+ }
+ });
+ $('#geolocate-menu button.btn-geolocate-clear').click(function(){
+ geolocate.deactivate();
+ });
+ }
+
+
+ function addNominatimSearch() {
+ if ( !('nominatim' in lizUrls) ) {
+ $('#nominatim-search').remove();
+ return false;
+ }
+ var service = OpenLayers.Util.urlAppend(lizUrls.nominatim
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ // Search with nominatim
+ var wgs84 = new OpenLayers.Projection('EPSG:4326');
+ var extent = new OpenLayers.Bounds( map.maxExtent.toArray() );
+ extent.transform(map.getProjectionObject(), wgs84);
+ $('#nominatim-search').submit(function(){
+ $('#nominatim-search .dropdown-inner .items').html('');
+ $.get(service
+ ,{"query":$('#search-query').val(),"bbox":extent.toBBOX()}
+ ,function(data) {
+ var text = '';
+ $.each(data, function(i, e){
+ var bbox = [
+ e.boundingbox[2],
+ e.boundingbox[0],
+ e.boundingbox[3],
+ e.boundingbox[1]
+ ];
+ bbox = new OpenLayers.Bounds(bbox);
+ if ( extent.intersectsBounds(bbox) )
+ text += '<li><a href="#'+bbox.toBBOX()+'">'+e.display_name+'</a></li>';
+ });
+ if (text != '') {
+ $('#nominatim-search .dropdown-inner .items').html(text);
+ $('#nominatim-search').addClass('open');
+ $('#nominatim-search .dropdown-inner .items li > a').click(function() {
+ var bbox = $(this).attr('href').replace('#','');
+ var extent = OpenLayers.Bounds.fromString(bbox);
+ extent.transform(wgs84, map.getProjectionObject());
+ map.zoomToExtent(extent);
+ $('#nominatim-search').removeClass('open');
+ return false;
+ });
+ } else {
+ mAddMessage('Nothing Found','info',true);
+ }
+ }, 'json');
+ return false;
+ });
+ }
+
+ /**
+ * PRIVATE function: parseData
+ * parsing capability
+ *
+ * Parameters:
+ * aData - {String} the WMS capabilities
+ *
+ * Returns:
+ * {Boolean} the capability is OK
+ */
+ function parseData(aData) {
+ var format = new OpenLayers.Format.WMSCapabilities({version:'1.3.0'});
+ var html = "";
+ capabilities = format.read(aData);
+
+ var format = new OpenLayers.Format.XML();
+ composers = format.read(aData).getElementsByTagName('ComposerTemplate');
+
+ var capability = capabilities.capability;
+ if (!capability) {
+ $('#map').html('SERVICE NON DISPONIBLE!');
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * PRIVATE function: mCheckMobile
+ * Check wether in mobile context.
+ *
+ *
+ * Returns:
+ * {Boolean} True if in mobile context.
+ */
+ function mCheckMobile() {
+ var minMapSize = 450;
+ var w = $('body').parent()[0].offsetWidth;
+ /*
+ if($.browser.msie)
+ w = $('body').width();
+ */
+ var leftW = w - minMapSize;
+ if(leftW < minMapSize || w < minMapSize)
+ return true;
+ return false;
+ }
+
+ /**
+ * PRIVATE function: mAddMessage
+ * Write message to the UI
+ *
+ *
+ * Returns:
+ * {jQuery Object} The message added.
+ */
+ function mAddMessage( aMessage, aType, aClose ) {
+ var mType = 'info';
+ var mTypeList = ['info', 'error', 'success'];
+ var mClose = false;
+
+ if ( $.inArray(aType, mTypeList) != -1 )
+ mType = aType;
+
+ if ( aClose )
+ mClose = true;
+
+ var html = '<div class="alert alert-block alert-'+mType+' fade in" data-alert="alert">';
+ if ( mClose )
+ html += '<a class="close" data-dismiss="alert" href="#">×</a>';
+ html += '<p>'+aMessage+'</p>';
+ html += '</div>';
+
+ var elt = $(html);
+ $('#message').append(elt);
+ return elt;
+ }
+
+
+
+ // creating the lizMap object
+ var obj = {
+ /**
+ * Property: map
+ * {<OpenLayers.Map>} The map
+ */
+ map: null,
+ /**
+ * Property: layers
+ * {Array(<OpenLayers.Layer>)} The layers
+ */
+ layers: null,
+ /**
+ * Property: baselayers
+ * {Array(<OpenLayers.Layer>)} The base layers
+ */
+ baselayers: null,
+ /**
+ * Property: events
+ * {<OpenLayers.Events>} An events object that handles all
+ * events on the lizmap
+ */
+ events: null,
+ /**
+ * Property: config
+ * {Object} The map config
+ */
+ config: null,
+ /**
+ * Property: dictionnary
+ * {Object} The map dictionnary
+ */
+ dictionary: null,
+ /**
+ * Property: tree
+ * {Object} The map tree
+ */
+ tree: null,
+
+ /**
+ * Method: checkMobile
+ */
+ checkMobile: function() {
+ return mCheckMobile();
+ },
+
+ /**
+ * Method: cleanName
+ */
+ cleanName: function( aName ) {
+ return cleanName( aName );
+ },
+
+ /**
+ * Method: checkMobile
+ */
+ addMessage: function( aMessage, aType, aClose ) {
+ return mAddMessage( aMessage, aType, aClose );
+ },
+
+ /**
+ * Method: updateSwitcherSize
+ */
+ updateSwitcherSize: function() {
+ return updateSwitcherSize();
+ },
+ /**
+ * Method: init
+ */
+ init: function() {
+ var self = this;
+ //get config
+ $.getJSON(lizUrls.config,lizUrls.params,function(cfgData) {
+ config = cfgData;
+ config.options.hasOverview = false;
+
+ //get capabilities
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ $.get(service
+ ,{SERVICE:'WMS',REQUEST:'GetCapabilities',VERSION:'1.3.0'}
+ ,function(data) {
+ //parse capabilities
+ if (!parseData(data))
+ return true;
+
+ //set title and abstract coming from capabilities
+// document.title = capabilities.title ? capabilities.title : capabilities.service.title;
+// $('#title').html('<h1>'+(capabilities.title ? capabilities.title : capabilities.service.title)+'</h1>');
+ //$('#abstract').html(capabilities.abstract ? capabilities.abstract : capabilities.service.abstract);
+ $('#abstract').html(capabilities.abstract ? capabilities.abstract : '');
+
+ // get and analyse tree
+ var capability = capabilities.capability;
+ var firstLayer = capability.nestedLayers[0];
+ getLayerTree(firstLayer,tree);
+ analyseNode(tree);
+ self.config = config;
+ self.tree = tree;
+ self.events.triggerEvent("treecreated", self);
+ if(self.checkMobile()){
+ $('#menu').hide();
+ $('#map-content').css('margin-left','0');
+ }
+
+ // create the map
+ createMap();
+ self.map = map;
+ self.layers = layers;
+ self.baselayers = baselayers;
+ self.controls = controls;
+ self.events.triggerEvent("mapcreated", self);
+
+ // create the switcher
+ createSwitcher();
+ self.events.triggerEvent("layersadded", self);
+
+ // initialize the map
+ $('#switcher').height(0);
+ // Set map extent depending on options
+ /*
+ if(lizPosition['lon']!=null){
+ map.setCenter(
+ new OpenLayers.LonLat(lizPosition['lon'], lizPosition['lat']),
+ lizPosition['zoom']
+ );
+ }else{
+ map.zoomToExtent(map.initialExtent);
+ }
+ */
+ var verifyingVisibility = true;
+ var hrefParam = OpenLayers.Util.getParameters(window.location.href);
+ if (!map.getCenter()) {
+ if (hrefParam.bbox) {
+ map.zoomToExtent(OpenLayers.Bounds.fromArray(hrefParam.bbox));
+ } else {
+ map.zoomToExtent(map.initialExtent);
+ }
+ verifyingVisibility = false;
+ }
+
+ updateContentSize();
+ map.events.triggerEvent("zoomend",{"zoomChanged": true});
+
+ // create overview if 'Overview' layer
+ createOverview();
+
+ // create navigation and toolbar
+ createNavbar();
+ createToolbar();
+
+ // verifying the layer visibility for permalink
+ if (verifyingVisibility) {
+ for (var i=0,len=layers.length; i<len; i++) {
+ var l = layers[i];
+ if ( (hrefParam.layers && l.getVisibility())
+ || (!hrefParam.layers && l.isVisible) )
+ {
+ $('#switcher button.checkbox[name="layer"][value="'+l.name+'"]').click();
+ }
+ }
+ }
+
+ // finalize slider
+ $('#navbar div.slider').slider("value",map.getZoom());
+ map.events.on({
+ zoomend : function() {
+ $('#switcher table.tree tr.legendGraphics.initialized').each(function() {
+ var self = $(this);
+ var name = self.attr('id').replace('legend-','');
+ var url = getLayerLegendGraphicUrl(name, true);
+ self.find('div.legendGraphics img').attr('src',url);
+ });
+ // update slider position
+ $('#navbar div.slider').slider("value",this.getZoom());
+ }
+ });
+
+ // Toggle legend
+ $('#toggleLegend').click(function(){
+ if ($('#menu').is(':visible')) {
+ $('.ui-icon-close-menu').click();
+ $('#metadata').hide();
+ }
+ else{
+ $('.ui-icon-open-menu').click();
+ $('#metadata').hide();
+ }
+ return false;
+ });
+
+ // Toggle locate
+ $('#toggleLocate').click(function(){
+ $('#locate-menu').toggle();
+ if ( $('#locate-menu').is(':visible') )
+ $('#toggleLocate').parent().addClass('active');
+ else
+ $('#toggleLocate').parent().removeClass('active');
+ $('#metadata').hide();
+ updateSwitcherSize();
+ return false;
+ });
+ if ( !('locateByLayer' in config) )
+ $('#toggleLocate').parent().hide();
+ else
+ $('#toggleLocate').parent().addClass('active');
+
+ // Toggle Metadata
+ $('#displayMetadata').click(function(){
+ $('#metadata').toggle();
+ if ( $('#metadata').is(':visible') )
+ $('#displayMetadata').parent().addClass('active');
+ else
+ $('#displayMetadata').parent().removeClass('active');
+ return false;
+ });
+ $('#hideMetadata').click(function(){
+ $('#metadata').hide();
+ $('#displayMetadata').parent().removeClass('active');
+ return false;
+ });
+
+ $('#headermenu .navbar-inner .nav a[rel="tooltip"]').tooltip();
+ self.events.triggerEvent("uicreated", self);
+
+ $('body').css('cursor', 'auto');
+ $('#loading').dialog('close');
+ }, "text");
+ });
+ }
+ };
+ // initializing the lizMap events
+ obj.events = new OpenLayers.Events(
+ obj, null,
+ ['treecreated','mapcreated','layersadded','uicreated'],
+ true,
+ {includeXY: true}
+ );
+ return obj;
+}();
+/*
+ * it's possible to add event listener
+ * before the document is ready
+ * but after this file
+ */
+lizMap.events.on({
+ 'treecreated':function(evt){
+ //console.log('treecreated');
+ if (
+ (('osmMapnik' in evt.config.options)
+ && evt.config.options.osmMapnik == 'True') ||
+ (('osmMapquest' in evt.config.options)
+ && evt.config.options.osmMapquest == 'True') ||
+ (('googleStreets' in evt.config.options)
+ && evt.config.options.googleStreets == 'True') ||
+ (('googleSatellite' in evt.config.options)
+ && evt.config.options.googleSatellite == 'True') ||
+ (('googleHybrid' in evt.config.options)
+ && evt.config.options.googleHybrid == 'True') ||
+ (('googleTerrain' in evt.config.options)
+ && evt.config.options.googleTerrain == 'True') ||
+ (('bingStreets' in evt.config.options)
+ && evt.config.options.bingStreets == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingSatellite' in evt.config.options)
+ && evt.config.options.bingSatellite == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingHybrid' in evt.config.options)
+ && evt.config.options.bingHybrid == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('ignTerrain' in evt.config.options)
+ && evt.config.options.ignTerrain == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignStreets' in evt.config.options)
+ && evt.config.options.ignStreets == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignSatellite' in evt.config.options)
+ && evt.config.options.ignSatellite == 'True'
+ && ('ignKey' in evt.config.options))
+ ) {
+ Proj4js.defs['EPSG:3857'] = Proj4js.defs['EPSG:900913'];
+ var proj = evt.config.options.projection;
+ if ( !(proj.ref in Proj4js.defs) )
+ Proj4js.defs[proj.ref]=proj.proj4;
+ var projection = new OpenLayers.Projection(proj.ref);
+ var projOSM = new OpenLayers.Projection('EPSG:3857');
+ proj.ref = 'EPSG:3857';
+ proj.proj4 = Proj4js.defs['EPSG:3857'];
+
+ // Transform the bbox
+ var bbox = evt.config.options.bbox;
+ var extent = new OpenLayers.Bounds(Number(bbox[0]),Number(bbox[1]),Number(bbox[2]),Number(bbox[3]));
+ extent = extent.transform(projection,projOSM);
+ bbox = extent.toArray();
+
+ var scales = [];
+ if ('mapScales' in evt.config.options)
+ scales = evt.config.options.mapScales;
+ if ( scales.length == 0 )
+ scales = [evt.config.options.maxScale,evt.config.options.minScale];
+
+ evt.config.options.projection = proj;
+ evt.config.options.bbox = bbox;
+ evt.config.options.zoomLevelNumber = 16;
+
+ // Transform the initial bbox
+ if ( 'initialExtent' in evt.config.options && evt.config.options.initialExtent.length == 4 ) {
+ var initBbox = evt.config.options.initialExtent;
+ var initialExtent = new OpenLayers.Bounds(Number(initBbox[0]),Number(initBbox[1]),Number(initBbox[2]),Number(initBbox[3]));
+ initialExtent = initialExtent.transform(projection,projOSM);
+ evt.config.options.initialExtent = initialExtent.toArray();
+ }
+
+ // Specify zoom level number
+ if ((('osmMapnik' in evt.config.options) && evt.config.options.osmMapnik == 'True') ||
+ (('osmMapquest' in evt.config.options) && evt.config.options.osmMapquest == 'True') ||
+ (('bingStreets' in evt.config.options) && evt.config.options.bingStreets == 'True' && ('bingKey' in evt.config.options)) ||
+ (('bingSatellite' in evt.config.options) && evt.config.options.bingSatellite == 'True' && ('bingKey' in evt.config.options)) ||
+ (('bingHybrid' in evt.config.options) && evt.config.options.bingHybrid == 'True' && ('bingKey' in evt.config.options)) ||
+ (('ignTerrain' in evt.config.options) && evt.config.options.ignTerrain == 'True' && ('ignKey' in evt.config.options)) ||
+ (('ignStreets' in evt.config.options) && evt.config.options.ignStreets == 'True') && ('ignKey' in evt.config.options))
+ evt.config.options.zoomLevelNumber = 19;
+ if ((('googleStreets' in evt.config.options) && evt.config.options.googleStreets == 'True') ||
+ (('googleHybrid' in evt.config.options) && evt.config.options.googleHybrid == 'True') ||
+ (('ignSatellite' in evt.config.options) && evt.config.options.ignSatellite == 'True') && ('ignKey' in evt.config.options))
+ evt.config.options.zoomLevelNumber = 20;
+ if ((('googleSatellite' in evt.config.options) && evt.config.options.googleSatellite == 'True'))
+ evt.config.options.zoomLevelNumber = 21;
+ evt.config.options.maxScale = 591659030.3224756;
+ evt.config.options.minScale = 2257.0000851534865;
+ //evt.config.options.mapScales = [];
+ var hasBaselayers = false;
+ for ( var l in evt.config.layers ) {
+ if ( evt.config.layers[l]["baseLayer"] == "True" )
+ hasBaselayers = true;
+ }
+ // for minRes evaluating to scale 100
+ // zoomLevelNumber is equal to 24
+ if (hasBaselayers) {
+ evt.config.options.zoomLevelNumber = 24;
+ }
+
+ var resolutions = [];
+ if (scales.length != 0 ) {
+ scales.sort(function(a, b) {
+ return Number(b) - Number(a);
+ });
+ var maxScale = scales[0];
+ var maxRes = OpenLayers.Util.getResolutionFromScale(maxScale, projOSM.proj.units);
+ var minScale = scales[scales.length-1];
+ var minRes = OpenLayers.Util.getResolutionFromScale(minScale, projOSM.proj.units);
+ var res = 156543.03390625;
+ var n = 1;
+ while ( res > minRes && n < evt.config.options.zoomLevelNumber) {
+ if ( res < maxRes ) {
+ if (resolutions.length == 0 && res != 156543.03390625)
+ resolutions.push(res*2);
+ resolutions.push(res);
+ }
+ res = res/2;
+ n++;
+ }
+ maxRes = resolutions[0];
+ minRes = res;
+ resolutions.push(res);
+ var maxScale = OpenLayers.Util.getScaleFromResolution(maxRes, projOSM.proj.units);
+ var minScale = OpenLayers.Util.getScaleFromResolution(minRes, projOSM.proj.units);
+ }
+ evt.config.options['resolutions'] = resolutions;
+
+ if (resolutions.length != 0 ) {
+ evt.config.options.zoomLevelNumber = resolutions.length;
+ evt.config.options.maxScale = maxScale;
+ evt.config.options.minScale = minScale;
+ }
+ }
+
+ }
+ ,'mapcreated':function(evt){
+ //console.log('mapcreated');
+ if (
+ (('osmMapnik' in evt.config.options)
+ && evt.config.options.osmMapnik == 'True') ||
+ (('osmMapquest' in evt.config.options)
+ && evt.config.options.osmMapquest == 'True') ||
+ (('googleStreets' in evt.config.options)
+ && evt.config.options.googleStreets == 'True') ||
+ (('googleSatellite' in evt.config.options)
+ && evt.config.options.googleSatellite == 'True') ||
+ (('googleHybrid' in evt.config.options)
+ && evt.config.options.googleHybrid == 'True') ||
+ (('googleTerrain' in evt.config.options)
+ && evt.config.options.googleTerrain == 'True') ||
+ (('bingStreets' in evt.config.options)
+ && evt.config.options.bingStreets == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingSatellite' in evt.config.options)
+ && evt.config.options.bingSatellite == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingHybrid' in evt.config.options)
+ && evt.config.options.bingHybrid == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('ignTerrain' in evt.config.options)
+ && evt.config.options.ignTerrain == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignStreets' in evt.config.options)
+ && evt.config.options.ignStreets == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignSatellite' in evt.config.options)
+ && evt.config.options.ignSatellite == 'True'
+ && ('ignKey' in evt.config.options))
+ ) {
+ //adding baselayers
+ var maxExtent = null;
+ if ( OpenLayers.Projection.defaults['EPSG:900913'].maxExtent )
+ maxExtent = new OpenLayers.Bounds(OpenLayers.Projection.defaults['EPSG:900913'].maxExtent);
+ else if ( OpenLayers.Projection.defaults['EPSG:3857'].maxExtent )
+ maxExtent = new OpenLayers.Bounds(OpenLayers.Projection.defaults['EPSG:3857'].maxExtent);
+
+ var lOptions = {zoomOffset:0,maxResolution:156543.03390625};
+ if (('resolutions' in evt.config.options)
+ && evt.config.options.resolutions.length != 0 ){
+ var resolutions = evt.config.options.resolutions;
+ var maxRes = resolutions[0];
+ var numZoomLevels = resolutions.length;
+ var zoomOffset = 0;
+ var res = 156543.03390625;
+ while ( res > maxRes ) {
+ zoomOffset += 1;
+ res = 156543.03390625 / Math.pow(2, zoomOffset);
+ }
+ lOptions['zoomOffset'] = zoomOffset;
+ lOptions['maxResolution'] = maxRes;
+ lOptions['numZoomLevels'] = numZoomLevels;
+ }
+
+ if (('osmMapnik' in evt.config.options) && evt.config.options.osmMapnik == 'True') {
+ evt.map.allOverlays = false;
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var osm = new OpenLayers.Layer.OSM('osm',
+ [
+ "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
+ "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
+ "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
+ ]
+ ,options
+ );
+ osm.maxExtent = maxExtent;
+ var osmCfg = {
+ "name":"osm"
+ ,"title":"OpenStreetMap"
+ };
+ evt.config.layers['osm'] = osmCfg;
+ evt.baselayers.push(osm);
+ }
+ if (('osmMapquest' in evt.config.options) && evt.config.options.osmMapquest == 'True') {
+ evt.map.allOverlays = false;
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var mapquest = new OpenLayers.Layer.OSM('mapquest',
+ ["http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
+ "http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
+ "http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
+ "http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png"]
+ ,options
+ );
+ mapquest.maxExtent = maxExtent;
+ var mapquestCfg = {
+ "name":"mapquest"
+ ,"title":"MapQuest OSM"
+ };
+ evt.config.layers['mapquest'] = mapquestCfg;
+ evt.baselayers.push(mapquest);
+ }
+ try {
+ if (('googleSatellite' in evt.config.options) && evt.config.options.googleSatellite == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:21
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var gsat = new OpenLayers.Layer.Google(
+ "Google Satellite",
+ {type: google.maps.MapTypeId.SATELLITE
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ gsat.maxExtent = maxExtent;
+ var gsatCfg = {
+ "name":"gsat"
+ ,"title":"Google Satellite"
+ };
+ evt.config.layers['gsat'] = gsatCfg;
+ evt.baselayers.push(gsat);
+ evt.map.allOverlays = false;
+ }
+ if (('googleHybrid' in evt.config.options) && evt.config.options.googleHybrid == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:20
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ghyb = new OpenLayers.Layer.Google(
+ "Google Hybrid",
+ {type: google.maps.MapTypeId.HYBRID
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ ghyb.maxExtent = maxExtent;
+ var ghybCfg = {
+ "name":"ghyb"
+ ,"title":"Google Hybrid"
+ };
+ evt.config.layers['ghyb'] = ghybCfg;
+ evt.baselayers.push(ghyb);
+ evt.map.allOverlays = false;
+ }
+ if (('googleTerrain' in evt.config.options) && evt.config.options.googleTerrain == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:16
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var gphy = new OpenLayers.Layer.Google(
+ "Google Terrain",
+ {type: google.maps.MapTypeId.TERRAIN
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ gphy.maxExtent = maxExtent;
+ var gphyCfg = {
+ "name":"gphy"
+ ,"title":"Google Terrain"
+ };
+ evt.config.layers['gphy'] = gphyCfg;
+ evt.baselayers.push(gphy);
+ evt.map.allOverlays = false;
+ }
+ if (('googleStreets' in evt.config.options) && evt.config.options.googleStreets == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:20
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var gmap = new OpenLayers.Layer.Google(
+ "Google Streets", // the default
+ {numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ gmap.maxExtent = maxExtent;
+ var gmapCfg = {
+ "name":"gmap"
+ ,"title":"Google Streets"
+ };
+ evt.config.layers['gmap'] = gmapCfg;
+ evt.baselayers.push(gmap);
+ evt.map.allOverlays = false;
+ }
+ if (('bingStreets' in evt.config.options) && evt.config.options.bingStreets == 'True' && ('bingKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var bmap = new OpenLayers.Layer.Bing({
+ key: evt.config.options.bingKey,
+ type: "Road",
+ name: "Bing Road", // the default
+ numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ });
+ bmap.maxExtent = maxExtent;
+ var bmapCfg = {
+ "name":"bmap"
+ ,"title":"Bing Road"
+ };
+ evt.config.layers['bmap'] = bmapCfg;
+ evt.baselayers.push(bmap);
+ evt.map.allOverlays = false;
+ }
+ if (('bingSatellite' in evt.config.options) && evt.config.options.bingSatellite == 'True' && ('bingKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var baerial = new OpenLayers.Layer.Bing({
+ key: evt.config.options.bingKey,
+ type: "Aerial",
+ name: "Bing Aerial", // the default
+ numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ });
+ baerial.maxExtent = maxExtent;
+ var baerialCfg = {
+ "name":"baerial"
+ ,"title":"Bing Aerial"
+ };
+ evt.config.layers['baerial'] = baerialCfg;
+ evt.baselayers.push(baerial);
+ evt.map.allOverlays = false;
+ }
+ if (('bingHybrid' in evt.config.options) && evt.config.options.bingHybrid == 'True' && ('bingKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var bhybrid = new OpenLayers.Layer.Bing({
+ key: evt.config.options.bingKey,
+ type: "AerialWithLabels",
+ name: "Bing Hybrid", // the default
+ numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ });
+ bhybrid.maxExtent = maxExtent;
+ var bhybridCfg = {
+ "name":"bhybrid"
+ ,"title":"Bing Hybrid"
+ };
+ evt.config.layers['bhybrid'] = bhybridCfg;
+ evt.baselayers.push(bhybrid);
+ evt.map.allOverlays = false;
+ }
+ if (('ignTerrain' in evt.config.options) && evt.config.options.ignTerrain == 'True' && ('ignKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ignmap = new OpenLayers.Layer.WMTS({
+ name: "ignmap",
+ url: "http://gpp3-wxs.ign.fr/"+evt.config.options.ignKey+"/wmts",
+ layer: "GEOGRAPHICALGRIDSYSTEMS.MAPS",
+ matrixSet: "PM",
+ style: "normal",
+ projection: new OpenLayers.Projection("EPSG:3857"),
+ attribution: 'Fond : ©IGN <a href="http://www.geoportail.fr/" target="_blank"><img src="http://api.ign.fr/geoportail/api/js/2.0.0beta/theme/geoportal/img/logo_gp.g…"></a> <a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" alt="TOS" title="TOS" target="_blank">Conditions d\'utilisation</a>'
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ ,zoomOffset: options.zoomOffset
+
+ });
+ ignmap.maxExtent = maxExtent;
+ var ignmapCfg = {
+ "name":"ignmap"
+ ,"title":"IGN Scan"
+ };
+ evt.config.layers['ignmap'] = ignmapCfg;
+ evt.baselayers.push(ignmap);
+ evt.map.allOverlays = false;
+ }
+ if (('ignStreets' in evt.config.options) && evt.config.options.ignStreets == 'True' && ('ignKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ignplan = new OpenLayers.Layer.WMTS({
+ name: "ignplan",
+ url: "http://gpp3-wxs.ign.fr/"+evt.config.options.ignKey+"/wmts",
+ layer: "GEOGRAPHICALGRIDSYSTEMS.PLANIGN",
+ matrixSet: "PM",
+ style: "normal",
+ projection: new OpenLayers.Projection("EPSG:3857"),
+ attribution: 'Fond : ©IGN <a href="http://www.geoportail.fr/" target="_blank"><img src="http://api.ign.fr/geoportail/api/js/2.0.0beta/theme/geoportal/img/logo_gp.g…"></a> <a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" alt="TOS" title="TOS" target="_blank">Conditions d\'utilisation</a>'
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ ,zoomOffset: options.zoomOffset
+
+ });
+ ignplan.maxExtent = maxExtent;
+ var ignplanCfg = {
+ "name":"ignplan"
+ ,"title":"IGN Plan"
+ };
+ evt.config.layers['ignplan'] = ignplanCfg;
+ evt.baselayers.push(ignplan);
+ evt.map.allOverlays = false;
+ }
+ if (('ignSatellite' in evt.config.options) && evt.config.options.ignSatellite == 'True' && ('ignKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:20
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ignphoto = new OpenLayers.Layer.WMTS({
+ name: "ignphoto",
+ url: "http://gpp3-wxs.ign.fr/"+evt.config.options.ignKey+"/wmts",
+ layer: "ORTHOIMAGERY.ORTHOPHOTOS",
+ matrixSet: "PM",
+ style: "normal",
+ projection: new OpenLayers.Projection("EPSG:3857"),
+ attribution: 'Fond : ©IGN <a href="http://www.geoportail.fr/" target="_blank"><img src="http://api.ign.fr/geoportail/api/js/2.0.0beta/theme/geoportal/img/logo_gp.g…"></a> <a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" alt="TOS" title="TOS" target="_blank">Conditions d\'utilisation</a>'
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ ,zoomOffset: options.zoomOffset
+
+ });
+ ignphoto.maxExtent = maxExtent;
+ var ignphotoCfg = {
+ "name":"ignphoto"
+ ,"title":"IGN Photos"
+ };
+ evt.config.layers['ignphoto'] = ignphotoCfg;
+ evt.baselayers.push(ignphoto);
+ evt.map.allOverlays = false;
+ }
+ } catch(e) {
+ //problems with google
+ var myError = e;
+ //console.log(myError);
+ }
+ }
+
+ if('lizmapExternalBaselayers' in evt.config){
+
+ var externalService = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ if (lizUrls.publicUrlList && lizUrls.publicUrlList.length > 1 ) {
+ externalService = [];
+ for (var j=0, jlen=lizUrls.publicUrlList.length; j<jlen; j++) {
+ externalService.push(
+ OpenLayers.Util.urlAppend(
+ lizUrls.publicUrlList[j],
+ OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ );
+ }
+ }
+
+ for (id in evt.config['lizmapExternalBaselayers']) {
+
+ var layerConfig = evt.config['lizmapExternalBaselayers'][id];
+
+ if (!('repository' in layerConfig) || !('project' in layerConfig))
+ continue;
+
+ var layerName = evt.cleanName(layerConfig.layerName);
+
+ var layerWmsParams = {
+ layers:layerConfig.layerName
+ ,version:'1.3.0'
+ ,exceptions:'application/vnd.ogc.se_inimage'
+ ,format:(layerConfig.imageFormat) ? layerConfig.imageFormat : 'image/png'
+ ,dpi:96
+ };
+ if (layerWmsParams.format != 'image/jpeg')
+ layerWmsParams['transparent'] = true;
+
+ // Change repository and project in service URL
+ var reg = new RegExp('repository\=(.+)&project\=(.+)', 'g');
+ var url = externalService.replace(reg, 'repository='+layerConfig.repository+'&project='+layerConfig.project);
+
+ // creating the base layer
+ layerConfig.title = layerConfig.layerTitle
+ layerConfig.name = layerConfig.layerName
+ layerConfig.baselayer = true;
+ layerConfig.singleTile = "False";
+ evt.config.layers[layerName] = layerConfig;
+ evt.baselayers.push(new OpenLayers.Layer.WMS(layerName,url
+ ,layerWmsParams
+ ,{isBaseLayer:true
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ }));
+ evt.map.allOverlays = false;
+
+ }
+ }
+
+ }
+ ,'uicreated':function(evt){
+ //console.log('uicreated')
+
+ }
+});
+
+$(document).ready(function () {
+ // start waiting
+ $('body').css('cursor', 'wait');
+ $('#loading').dialog({
+ modal: true
+ , draggable: false
+ , resizable: false
+ , closeOnEscape: false
+ , dialogClass: 'liz-dialog-wait'
+ })
+ .parent().removeClass('ui-corner-all')
+ .children('.ui-dialog-titlebar').removeClass('ui-corner-all');
+ // configurate OpenLayers
+ OpenLayers.DOTS_PER_INCH = 96;
+ // initialize LizMap
+ lizMap.init();
+});
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/admin.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/admin.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/admin.css 2014-07-07 13:22:12 UTC (rev 1039)
@@ -0,0 +1,8 @@
+.jforms-error-list {
+ background-color: #C43C35;
+ background-image: -moz-linear-gradient(center top , #EE5F5B, #C43C35);
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.jforms-error-list li {
+ color: #FFF;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/admin.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/123_click.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/123_click.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/bt_jaune.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/bt_jaune.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/download_layer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/download_layer.gif
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_18.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_18.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20_black.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20_black.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20_tools.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_20_tools.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_menu.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_menu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_menu_tools.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_menu_tools.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_timemanager.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/images/sprite_timemanager.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/250x250_mappemonde.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/250x250_mappemonde.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/loading.gif
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/loading.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/logo.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/logo_footer.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/logo_footer.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/overview_replacement.gif
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/overview_replacement.gif
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/overview_replacement.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/img/overview_replacement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/main.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/main.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/main.css 2014-07-07 13:22:12 UTC (rev 1039)
@@ -0,0 +1,113 @@
+body {
+ background: #03497c;
+ color : #ffec3e;
+ padding-top: 20px
+}
+
+/* for ie 8*/
+a {
+ color: #2B2B2B\9;
+ text-decoration:none\9;
+}
+.active > a,
+a:focus,
+a:hover {
+ color:white\9;
+ text-decoration:none\9;
+}
+/* END for ie 8*/
+
+#header {
+ background: #03497c;
+ border-bottom: 2px solid #0080cb;
+ color : #ffec3e;
+ height : 30px;
+ width: 70%;
+}
+#logo {
+ height : 30px;
+ margin: 0px 5px;
+ background : none;
+}
+#logo h1 {
+ font-size : 1.5em;
+ margin-left: 10px;
+ margin: 5px 5px;
+ line-height: 20px;
+}
+#title{
+ height : 30px;
+ margin : 0px 5px;
+ padding-right:5px;
+}
+#title h1 {
+ margin : 0px 5px;
+ font-size : 1.5em;
+ line-height: 30px;
+}
+
+#headermenu {
+ background-color: #ffe810;
+ border-bottom: 2px solid #0080cb;
+ width: 30%;
+ right: 0px;
+ left: auto;
+ top: 00px;
+}
+
+#auth {
+ background: transparent;
+}
+.navbar .nav > li > a {
+ color: #2B2B2B;
+}
+.navbar .nav .active > a,
+.navbar .nav > li > a:focus ,
+.navbar .nav > li > a:hover {
+ color: white;
+ background:transparent !important;
+}
+.navbar .nav li.dropdown.open > .dropdown-toggle,
+.navbar .nav li.dropdown.active > .dropdown-toggle,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle {
+ color : #585858;
+}
+.navbar .nav > li > .dropdown-menu:after {
+ border-bottom: 6px solid #F5F5F5;
+}
+.dropdown-menu {
+ background-color: #F5F5F5;
+}
+.navbar .nav > li.dropdown > a.dropdown-toggle:hover .caret {
+ border-top-color:white;
+ border-bottom-color:white;
+}
+.navbar .navbar-inner .icon {
+ background-image:url("images/sprite_20_tools.png");
+}
+
+.navbar .nav .login {
+ display : none;
+}
+
+.navbar .nav .login .icon {
+ background-position: -80px -60px;
+}
+.navbar .nav .login a:hover .icon,
+.navbar .nav .login.active a .icon {
+ background-position: -80px -40px;
+}
+.navbar .nav .user .icon {
+ background-position: 0px -60px;
+}
+.navbar .nav .user a:hover .icon,
+.navbar .nav .user.active a .icon {
+ background-position: 0px -40px;
+}
+.navbar .nav .home .icon {
+ background-position: -80px -20px;
+}
+.navbar .nav .home a:hover .icon,
+.navbar .nav .home.active a .icon {
+ background-position: -80px 0px;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/main.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/map.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/map.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/map.css 2014-07-07 13:22:12 UTC (rev 1039)
@@ -0,0 +1,520 @@
+
+#title {
+ right: 20%;
+}
+
+#title h1 {
+ color : #ffec3e;
+}
+#title h2 {
+ color : #585858;
+}
+#headermenu .navbar-search .icon {
+ background-color: transparent;
+ background-position: -100px -20px;
+}
+#headermenu .dropdown-menu {
+ background-color: rgb(255,255,255);
+}
+#headermenu .dropdown-caret .caret-inner {
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid rgb(255,255,255);
+}
+#headermenu .dropdown-caret .caret-outer {
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid rgba(0,0,0,0.2);
+}
+#headermenu .dropdown-inner .items li > a {
+ color: rgb(51,51,51);
+}
+
+.navbar .nav .information .icon {
+ background-position: -120px -20px;
+}
+.navbar .nav .information a:hover .icon,
+.navbar .nav .information.active a .icon {
+ background-position: -120px 0px;
+}
+
+.navbar .nav .map .icon {
+ background-position: -40px -60px;
+}
+.navbar .nav .map a:hover .icon,
+.navbar .nav .map.active a .icon {
+ background-position: -40px -40px;
+}
+.navbar .nav .legend .icon {
+ background-position: -40px -100px;
+}
+.navbar .nav .legend a:hover .icon,
+.navbar .nav .legend.active a .icon {
+ background-position: -40px -80px;
+}
+.navbar .nav .locate .icon {
+ background-position: -20px -100px;
+}
+.navbar .nav .locate a:hover .icon,
+.navbar .nav .locate.active a .icon {
+ background-position: -20px -80px;
+}
+.navbar .nav .print .icon {
+ background-position: -160px -20px;
+}
+.navbar .nav .print a:hover .icon,
+.navbar .nav .print.active a .icon {
+ background-position: -160px 0px;
+}
+.navbar .nav .edition .icon {
+ background-position: -200px -20px;
+}
+.navbar .nav .edition a:hover .icon,
+.navbar .nav .edition.active a .icon {
+ background-position: -200px 0px;
+}
+.navbar .nav .measure .icon {
+ background-position: -140px -20px;
+}
+.navbar .nav .measure a:hover .icon,
+.navbar .nav .measure.active a .icon {
+ background-position: -140px 0px;
+}
+.navbar .nav .geolocate .icon {
+ background-position: -20px -60px;
+}
+.navbar .nav .geolocate a:hover .icon,
+.navbar .nav .geolocate.active a .icon {
+ background-position: -20px -40px;
+}
+
+#content .ui-icon {
+ background-image : url("images/sprite_menu.png");
+}
+#content .ui-icon-open-menu {
+ background-position : -16px -80px;
+ background-color : #F0F0F0;
+}
+#content .ui-icon-close-menu {
+ background-position : 0px -96px;
+}
+
+#metadata {
+ background: #03497c;
+ color:white;
+}
+
+#metadata h2{
+ color : #ffec3e;
+}
+
+#menu {
+ background: #03497c;
+}
+
+#menu .ui-icon-locate-open {
+ background-position : -16px -16px;
+}
+
+#toolbar h3,
+#menu h3 {
+ background: #ffe810;
+ color: #2B2B2B;
+
+}
+#toolbar h3 .icon,
+#menu h3 .icon {
+ background-image : url(images/sprite_20_tools.png);
+}
+#toolbar .baselayer h3 .icon,
+#menu .baselayer h3 .icon {
+ background-position : -40px 0px;
+}
+#toolbar .switcher h3 .icon,
+#menu .switcher h3 .icon {
+ background-position : -40px -180px;
+}
+#toolbar .locate h3 .icon,
+#menu .locate h3 .icon {
+ background-position : -20px -80px;
+}
+#toolbar .geolocate h3 .icon,
+#menu .geolocate h3 .icon {
+ background-position: -20px -60px;
+}
+#toolbar .print h3 .icon,
+#menu .print h3 .icon {
+ background-position: -160px 0px;
+}
+#toolbar .measure h3 .icon,
+#menu .measure h3 .icon {
+ background-position: -140px 0px;
+}
+#toolbar .edition h3 .icon,
+#menu .edition h3 .icon {
+ background-position : -200px 0px;
+}
+
+/*
+Timemanager
+*/
+#toolbar #timemanager-menu h3 .icon,
+#menu #timemanager-menu h3 .icon {
+ background-image : url(images/sprite_timemanager.png);
+}
+.navbar .navbar-inner .timemanager .icon {
+ background-image:url("images/sprite_timemanager.png");
+}
+.navbar .nav .timemanager .icon {
+ background-position: 0px 0px;
+}
+.navbar .nav .timemanager a:hover .icon,
+.navbar .nav .timemanager.active a .icon {
+ background-position: -20px 0px;
+}
+#toolbar .timemanager h3 .icon,
+#menu .timemanager h3 .icon {
+ background-position: -20px 0px;
+}
+
+
+#map-content {
+ background : #F0F0F0;
+}
+
+#close-menu {
+ border-bottom : solid 1px #DDDDDD;
+}
+
+#content.mobile #toolbar{
+ background : #F0F0F0;
+}
+
+#toolbar .title .btn, #menu .title .btn {
+ background : url(images/sprite_menu_tools.png) no-repeat right;
+}
+#toolbar .title .btn.btn-error {
+ background:none;
+ color:#DA4F49;
+}
+#toolbar .title .btn.btn-locate-clear {
+ background-position : 0px 0px;
+}
+#toolbar .title .btn.btn-locate-clear:hover {
+ background-position : -20px 0px;
+}
+#toolbar .title .btn.btn-print-clear {
+ background-position : -20px -100px;
+}
+#toolbar .title .btn.btn-print-clear:hover {
+ background-position : 0px -100px;
+}
+#toolbar .title .btn.btn-stop {
+ background-position : 0px -20px;
+}
+#toolbar .title .btn.btn-stop:hover {
+ background-position : -20px -20px;
+}
+#toolbar .menu-content .btn.btn-success{
+ background-color: #93C01F;
+ background-image: -moz-linear-gradient(center top, #9BC144, #93C01F);
+}
+
+#baselayer-menu div.baselayer-select,
+#locate div.locate-layer {
+ border : solid 1px #606060;
+ background: url(images/123_click.png) no-repeat right;
+}
+
+#baselayer-menu div.baselayer-select select,
+#locate div.locate-layer select {
+ background: transparent;
+ color : rgb(51,51,51);
+}
+
+#locate div.locate-layer .custom-combobox-toggle {
+ background: url(images/123_click.png) no-repeat right;
+}
+#locate div.locate-layer .custom-combobox-input {
+ background: none;
+ color : rgb(51,51,51);
+}
+.ui-autocomplete.ui-menu .ui-menu-item a {
+ background: none;
+ color : rgb(51,51,51);
+}
+.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-active,
+.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-focus {
+ background: #0094D6;
+}
+
+#menu .ui-accordion-content {
+ background-color : white;
+ border : solid 1px rgb(251,216,80);
+}
+
+#switcher {
+ border: 1px solid #ffec3e;
+ border-radius: 4px;
+}
+
+#switcher tr.liz-state-disabled span {
+ color:#AAA;
+}
+#switcher button{
+ background: none;
+}
+
+#switcher span.label{
+ color : white;
+ background: none;
+}
+#switcher .treeTable tr.expanded td a.expander {
+ background-image : url("images/sprite_menu.png");
+ background-position : -16px -30px;
+}
+#switcher .treeTable tr.collapsed td a.expander {
+ background-image : url("images/sprite_menu.png");
+ background-position : -32px -12px;
+}
+#switcher .treeTable span.selected {
+ background-color : rgb(153,153,153);
+ text-shadow : 0px -1px 0px rgba(0,0,0,0.25);
+ color : white;
+}
+#switcher .treeTable span.loading {
+ background-image : url("images/download_layer.gif");
+}
+
+#switcher div.legendGraphics {
+ background: white;
+ border-radius: 3px;
+}
+
+#baselayer-select-input {
+ background : none repeat scroll 0% 0% rgb(240, 240, 240);
+ border : solid 1px #DDD;
+ border-left : none;
+}
+
+/*navbar*/
+#navbar div.slider{
+ background: #ffe810;
+ border: 3px solid #023b66;
+}
+#navbar div.slider a{
+ background : black;
+ border : solid 1px black;
+}
+#navbar button.ui-button-icon-only{
+ background: #ffe810;
+ border: 3px solid #023b66;
+ border-radius: 5px;
+}
+#navbar button.ui-state-select{
+ background-color : #CE1F2D;
+}
+#navbar .ui-state-default .ui-icon {
+ background-image : url("images/sprite_20_black.png");
+}
+#navbar .ui-button-icon-only .ui-icon-pan {
+ background-position : 0px -20px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom {
+ background-position : -20px -20px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom-extent {
+ background-position : -20px -40px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom-out {
+ background-position : -20px 0px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom-in {
+ background-position : 0px 0px;
+}
+#navbar .ui-button-icon-only.ui-state-usable .ui-icon-previous {
+ background-position : 0px -80px;
+}
+#navbar .ui-button-icon-only .ui-icon-next {
+ background-position : -25px -60px;
+}
+#navbar .ui-button-icon-only.ui-state-usable .ui-icon-next {
+ background-position : -25px -80px;
+}
+
+/*Overview map*/
+#overview-bar {
+ border: 1px solid #ffec3e;
+ background: #03497c;
+ border-radius: 4px;
+ color : white;
+}
+
+#overview-bar .label {
+ color : white;
+ background: none;
+}
+
+
+.olControlScaleLineBottom {
+ border-color: #ffe810;
+}
+.olControlScaleLineTop {
+ border-color: #ffe810;
+}
+
+#overview-bar .button {
+ border-left : solid 1px #606060;
+ background : #DDD;
+}
+#overview-bar .ui-icon {
+ background-image : url("images/sprite_menu.png");
+}
+
+#overview-bar .button .ui-icon-triangle-1-s {
+ background-position : -16px 0px;
+}
+#overview-bar .button .ui-icon-triangle-1-n {
+ background-position : 0px 0px;
+}
+
+#overviewmap{
+ background : none repeat scroll 0% 0% rgb(240, 240, 240);
+ border : solid 1px #606060;
+ border-bottom : none;
+}
+.olControlOverviewMapElement {
+ background-color: rgb(240,240,240);
+}
+.olControlOverviewMapExtentRectangle {
+ border: 2px solid #59B4D4;
+}
+.olControlOverviewMapRectReplacement {
+ background-image:url(img/overview_replacement.gif);
+}
+
+#attribution-box {
+ background-color : rgba(255,255,255,0.7);
+}
+
+#permalink-box {
+ background : rgba(255,255,255,0.5);
+}
+
+.alert-info {
+ background-color : #3a3c3d;
+ border-color : #fbfbfb;
+ color : #fbfbfb;
+}
+.alert-info .close{
+ color : #fbfbfb;
+}
+
+/**
+ * Icones lizMap
+ */
+.liz-icon-check {
+ /* sprite de 16x16 mais button de 14x14 */
+ background-position : -48px -80px;
+ background-color : #0094D6;
+}
+.liz-icon-partial-check {
+ /* sprite de 16x16 mais button de 14x14 */
+ background-position: -32px -80px;
+ background-color : #0094D6;
+}
+.liz-state-disabled .liz-icon-check {
+ background-color : #B3B3B3;
+}
+.liz-state-disabled .liz-icon-partial-check {
+ background-color : #B3B3B3;
+}
+.liz-icon-legend-collapsed {
+ background-position: -32px -16px;
+}
+.liz-icon-legend-open {
+ background-position: -64px -16px;
+}
+.liz-icon-info {
+ background-position: 0px -80px;
+}
+.liz-remove-cache {
+ background-position: -48px -100px;
+}
+
+.liz-icon-overview {
+ background-position: -208px -128px;
+}
+.liz-icon-switcher-open {
+ background-position: -16px -96px;
+}
+.liz-icon-switcher-collapsed {
+ background-position: 0 -96px;
+}
+
+/*Popup OpenLayers*/
+.lizmapPopup.olPopup,
+#map-content .lizmapPopup{
+ background: #F6F6F6 !important;
+ border: 1px solid #C9C9C9 !important;
+ color: black !important;
+}
+
+.lizmapPopup.olPopup .lizmapPopupContent h4,
+#map-content .lizmapPopupContent h4{
+ background: #2B2B2B !important;
+ color : #FBFBFB !important;
+}
+.lizmapPopup.olPopup .lizmapPopupContent a,
+#map-content .lizmapPopupContent a{
+ color:black;
+}
+.lizmapPopup.olPopup .lizmapPopupTable,
+#map-content .lizmapPopupTable{
+ border: 1px solid #2B2B2B !important;
+}
+.lizmapPopup.olPopup .lizmapPopupTable thead,
+#map-content .lizmapPopupTable thead {
+ color: white;
+ background-color: #81B00E;
+ border-bottom: 1px solid #2B2B2B !important;
+}
+.lizmapPopup.olPopup .lizmapPopupTable th.left,
+#map-content .lizmapPopupTable th.left{
+ border-right: 1px solid #C9C9C9 !important;
+}
+
+#edition-modal form {
+ margin: 0;
+}
+
+/*dialog wait*/
+.liz-dialog-wait {
+ background: #03497c;
+ border-bottom: 2px solid #0080cb;
+}
+.liz-dialog-wait .ui-dialog-titlebar{
+ background: #03497c;
+ color : #ffec3e;
+}
+.liz-dialog-wait .ui-dialog-titlebar-close{
+ display:none;
+}
+.ui-widget-overlay {
+ opacity : 0.8;
+ background : black;
+}
+
+#hideMetadata {
+ background: url(images/bt_jaune.jpg) repeat-x 0 0;
+ width: auto;
+ height: 38px;
+ padding: 0 10px;
+ border: 5px solid #023b66;
+ font-weight: bold;
+ font-size: 140%;
+ line-height: 38px;
+ color: #044f90;
+ cursor: pointer;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/map.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/media.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/media.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/media.css 2014-07-07 13:22:12 UTC (rev 1039)
@@ -0,0 +1,90 @@
+/* #### Mobile Phones Portrait #### */
+@media screen and (max-device-width: 480px) and (orientation: portrait){
+ /* some CSS here */
+}
+
+/* #### Mobile Phones Landscape #### */
+@media screen and (max-device-width: 640px) and (orientation: landscape){
+ /* some CSS here */
+}
+
+/* #### Mobile Phones Portrait or Landscape #### */
+@media screen and (max-device-width: 640px){
+ /* some CSS here */
+}
+
+/* #### Retina screen (iphone4, samsung note, etc.) Portrait or Landscape #### */
+@media
+only screen and (-webkit-min-device-pixel-ratio: 2),
+only screen and ( min--moz-device-pixel-ratio: 2),
+only screen and ( -o-min-device-pixel-ratio: 2/1),
+only screen and ( min-device-pixel-ratio: 2),
+only screen and ( min-resolution: 192dpi),
+only screen and ( min-resolution: 2dppx),
+only screen and ( max-height : 640px) ,
+only screen and ( max-device-height : 640px) {
+
+ /* Retina-specific stuff here */
+ body{
+ padding-top : 60px;
+ }
+ #header {
+ height : 30px;
+ }
+ #logo {
+ height : 30px;
+ margin: 0px 5px;
+ background : none;
+ }
+ #logo h1 {
+ font-size : 1.5em;
+ margin-left: 10px;
+ margin: 5px 5px;
+ line-height: 20px;
+ }
+ #title{
+ height : 30px;
+ margin : 0px 5px;
+ padding-right:5px;
+ }
+ #title h1 {
+ margin : 0px 5px;
+ font-size : 1.5em;
+ line-height: 30px;
+ }
+ #headermenu{
+/* height:30px;*/
+ // position: fixed;
+ // top: 30px;
+ }
+ .navbar-inner {
+ min-height:30px;
+ padding: 0px 10px;
+ }
+
+ /* for ie*/
+/* .navbar-inner ul {*/
+/* height:30px\9;*/
+/* }*/
+
+ /* for ie*/
+ .navbar-inner ul li{
+ display:inline\9;
+ }
+
+ #overview-box {
+ right:10px;
+ bottom:1em;
+ }
+
+}
+
+/* #### Tablets Portrait or Landscape #### */
+@media screen and (min-device-width: 768px) and (max-device-width: 1024px){
+ /* some CSS here */
+}
+
+/* #### Desktops #### */
+@media screen and (min-width: 1024px){
+ /* some CSS here */
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/media.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/view.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/view.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/view.css 2014-07-07 13:22:12 UTC (rev 1039)
@@ -0,0 +1,36 @@
+.thumbnail {
+ border: 1px solid #ffec3e;
+ background: #03497c;
+}
+
+a.btn {
+ background: url(images/bt_jaune.jpg) repeat-x 0 0;
+ width: auto;
+ padding: 0 10px;
+ border: 5px solid #023b66;
+ font-weight: bold;
+ color: #044f90;
+ cursor: pointer;
+}
+
+.liz-project-desc {
+ color: white;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+
+.modal {
+ background: #03497c;
+}
+
+.modal-header {
+ border-bottom: 2px solid #0080cb;
+}
+
+.modal .close {
+ color : #ffec3e;
+}
+
+.modal-footer {
+ background: #03497c;
+ border-top: 2px solid #0080cb;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/www/themes/default/css/view.css
___________________________________________________________________
Added: svn:executable
+ *
1
0
r1038 - in trunk/echobase-ui/src/main: resources/lizmap/theme/css resources/lizmap/theme/css/images resources/lizmap/theme/css/img webapp/css
by sbavencoff@users.forge.codelutin.com 07 Jul '14
by sbavencoff@users.forge.codelutin.com 07 Jul '14
07 Jul '14
Author: sbavencoff
Date: 2014-07-07 15:10:47 +0200 (Mon, 07 Jul 2014)
New Revision: 1038
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1038
Log:
refs #4194 : used echobase style in lizmap frame
Added:
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20_black.png
Modified:
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/loading.gif
trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css
trunk/echobase-ui/src/main/webapp/css/screen.css
Copied: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20_black.png (from rev 1036, trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20.png)
===================================================================
(Binary files differ)
Modified: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/loading.gif
===================================================================
(Binary files differ)
Modified: trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css 2014-07-07 13:00:29 UTC (rev 1037)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css 2014-07-07 13:10:47 UTC (rev 1038)
@@ -1,5 +1,7 @@
body {
- background : #EFEFEF;
+ background: #03497c;
+ color : #ffec3e;
+ padding-top: 20px
}
/* for ie 8*/
@@ -16,15 +18,41 @@
/* END for ie 8*/
#header {
- background : #2B2B2B;
- color : #FBFBFB;
+ background: #03497c;
+ border-bottom: 2px solid #0080cb;
+ color : #ffec3e;
+ height : 30px;
+ width: 70%;
}
#logo {
- background : url('img/logo.png') no-repeat;
+ height : 30px;
+ margin: 0px 5px;
+ background : none;
}
+#logo h1 {
+ font-size : 1.5em;
+ margin-left: 10px;
+ margin: 5px 5px;
+ line-height: 20px;
+}
+#title{
+ height : 30px;
+ margin : 0px 5px;
+ padding-right:5px;
+}
+#title h1 {
+ margin : 0px 5px;
+ font-size : 1.5em;
+ line-height: 30px;
+}
#headermenu {
- background-color:#93C01F;
+ background-color: #ffe810;
+ border-bottom: 2px solid #0080cb;
+ width: 30%;
+ right: 0px;
+ left: auto;
+ top: 00px;
}
#auth {
@@ -57,6 +85,11 @@
.navbar .navbar-inner .icon {
background-image:url("images/sprite_20_tools.png");
}
+
+.navbar .nav .login {
+ display : none;
+}
+
.navbar .nav .login .icon {
background-position: -80px -60px;
}
Modified: trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css 2014-07-07 13:00:29 UTC (rev 1037)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css 2014-07-07 13:10:47 UTC (rev 1038)
@@ -1,6 +1,10 @@
+#title {
+ right: 20%;
+}
+
#title h1 {
- color : #AAAAAA;
+ color : #ffec3e;
}
#title h2 {
color : #585858;
@@ -96,21 +100,28 @@
}
#metadata {
- background-color:#EFEFEF;
- color:grey;
+ background: #03497c;
+ color:white;
}
#metadata h2{
- color:#80B219;
+ color : #ffec3e;
}
#menu {
- background : #F0F0F0;
+ background: #03497c;
}
#menu .ui-icon-locate-open {
background-position : -16px -16px;
}
+
+#toolbar h3,
+#menu h3 {
+ background: #ffe810;
+ color: #2B2B2B;
+
+}
#toolbar h3 .icon,
#menu h3 .icon {
background-image : url(images/sprite_20_tools.png);
@@ -121,7 +132,7 @@
}
#toolbar .switcher h3 .icon,
#menu .switcher h3 .icon {
- background-position : -40px -160px;
+ background-position : -40px -180px;
}
#toolbar .locate h3 .icon,
#menu .locate h3 .icon {
@@ -243,6 +254,11 @@
border : solid 1px rgb(251,216,80);
}
+#switcher {
+ border: 1px solid #ffec3e;
+ border-radius: 4px;
+}
+
#switcher tr.liz-state-disabled span {
color:#AAA;
}
@@ -251,16 +267,16 @@
}
#switcher span.label{
- color : rgb(51,51,51);
+ color : white;
background: none;
}
#switcher .treeTable tr.expanded td a.expander {
background-image : url("images/sprite_menu.png");
- background-position : -16px -48px;
+ background-position : -16px -30px;
}
#switcher .treeTable tr.collapsed td a.expander {
background-image : url("images/sprite_menu.png");
- background-position : -32px -64px;
+ background-position : -32px -12px;
}
#switcher .treeTable span.selected {
background-color : rgb(153,153,153);
@@ -271,6 +287,11 @@
background-image : url("images/download_layer.gif");
}
+#switcher div.legendGraphics {
+ background: white;
+ border-radius: 3px;
+}
+
#baselayer-select-input {
background : none repeat scroll 0% 0% rgb(240, 240, 240);
border : solid 1px #DDD;
@@ -279,22 +300,23 @@
/*navbar*/
#navbar div.slider{
- background : #C81F2D;
- border : solid 1px white;
+ background: #ffe810;
+ border: 3px solid #023b66;
}
#navbar div.slider a{
background : black;
border : solid 1px black;
}
#navbar button.ui-button-icon-only{
- background : #CE1F2D;
- border : solid 1px white;
+ background: #ffe810;
+ border: 3px solid #023b66;
+ border-radius: 5px;
}
#navbar button.ui-state-select{
- background-color : #3A3C3D;
+ background-color : #CE1F2D;
}
#navbar .ui-state-default .ui-icon {
- background-image : url("images/sprite_20.png");
+ background-image : url("images/sprite_20_black.png");
}
#navbar .ui-button-icon-only .ui-icon-pan {
background-position : 0px -20px;
@@ -323,15 +345,25 @@
/*Overview map*/
#overview-bar {
- background : none repeat scroll 0% 0% rgb(240, 240, 240);
- border : solid 1px #606060;
+ border: 1px solid #ffec3e;
+ background: #03497c;
+ border-radius: 4px;
+ color : white;
}
#overview-bar .label {
- color : rgb(51,51,51);
+ color : white;
background: none;
}
+
+.olControlScaleLineBottom {
+ border-color: #ffe810;
+}
+.olControlScaleLineTop {
+ border-color: #ffe810;
+}
+
#overview-bar .button {
border-left : solid 1px #606060;
background : #DDD;
@@ -459,12 +491,12 @@
/*dialog wait*/
.liz-dialog-wait {
- background: #F6F6F6;
- border: 1px solid #606060;
+ background: #03497c;
+ border-bottom: 2px solid #0080cb;
}
.liz-dialog-wait .ui-dialog-titlebar{
- background : #2B2B2B;
- color : #FBFBFB;
+ background: #03497c;
+ color : #ffec3e;
}
.liz-dialog-wait .ui-dialog-titlebar-close{
display:none;
@@ -473,3 +505,16 @@
opacity : 0.8;
background : black;
}
+
+#hideMetadata {
+ background: url(images/bt_jaune.jpg) repeat-x 0 0;
+ width: auto;
+ height: 38px;
+ padding: 0 10px;
+ border: 5px solid #023b66;
+ font-weight: bold;
+ font-size: 140%;
+ line-height: 38px;
+ color: #044f90;
+ cursor: pointer;
+}
Modified: trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css 2014-07-07 13:00:29 UTC (rev 1037)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css 2014-07-07 13:10:47 UTC (rev 1038)
@@ -54,8 +54,8 @@
}
#headermenu{
/* height:30px;*/
- position: fixed;
- top: 30px;
+ // position: fixed;
+ // top: 30px;
}
.navbar-inner {
min-height:30px;
Modified: trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css 2014-07-07 13:00:29 UTC (rev 1037)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css 2014-07-07 13:10:47 UTC (rev 1038)
@@ -1,7 +1,36 @@
.thumbnail {
- background-color: white;
+ border: 1px solid #ffec3e;
+ background: #03497c;
}
+
+a.btn {
+ background: url(images/bt_jaune.jpg) repeat-x 0 0;
+ width: auto;
+ padding: 0 10px;
+ border: 5px solid #023b66;
+ font-weight: bold;
+ color: #044f90;
+ cursor: pointer;
+}
+
.liz-project-desc {
color: white;
background-color: rgba(0, 0, 0, 0.5);
}
+
+.modal {
+ background: #03497c;
+}
+
+.modal-header {
+ border-bottom: 2px solid #0080cb;
+}
+
+.modal .close {
+ color : #ffec3e;
+}
+
+.modal-footer {
+ background: #03497c;
+ border-top: 2px solid #0080cb;
+}
Modified: trunk/echobase-ui/src/main/webapp/css/screen.css
===================================================================
--- trunk/echobase-ui/src/main/webapp/css/screen.css 2014-07-07 13:00:29 UTC (rev 1037)
+++ trunk/echobase-ui/src/main/webapp/css/screen.css 2014-07-07 13:10:47 UTC (rev 1038)
@@ -766,4 +766,5 @@
#spatialViewContent {
width: 99%;
height: 800px;
+ border: none;
}
1
0
r1037 - trunk/echobase-ui/src/main/resources/lizmap/js
by sbavencoff@users.forge.codelutin.com 07 Jul '14
by sbavencoff@users.forge.codelutin.com 07 Jul '14
07 Jul '14
Author: sbavencoff
Date: 2014-07-07 15:00:29 +0200 (Mon, 07 Jul 2014)
New Revision: 1037
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1037
Log:
refs #4194 : in lizmap frame fix position body
Modified:
trunk/echobase-ui/src/main/resources/lizmap/js/map.js
Modified: trunk/echobase-ui/src/main/resources/lizmap/js/map.js
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/js/map.js 2014-07-07 09:40:55 UTC (rev 1036)
+++ trunk/echobase-ui/src/main/resources/lizmap/js/map.js 2014-07-07 13:00:29 UTC (rev 1037)
@@ -147,7 +147,7 @@
$('#map').height(h);
// Update body padding top by summing up header+headermenu
- $('body').css('padding-top', $('#header').outerHeight() + $('#headermenu').outerHeight() );
+ $('body').css('padding-top', $('#headermenu').position().top + $('#headermenu').outerHeight() );
// calculate map width depending on theme configuration
// (fullscreen map or not, mobile or not)
1
0
r1036 - in trunk/echobase-ui/src/main/resources/lizmap: . js theme theme/css theme/css/images theme/css/img
by sbavencoff@users.forge.codelutin.com 07 Jul '14
by sbavencoff@users.forge.codelutin.com 07 Jul '14
07 Jul '14
Author: sbavencoff
Date: 2014-07-07 11:40:55 +0200 (Mon, 07 Jul 2014)
New Revision: 1036
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1036
Log:
refs #4194 : add Lizamp default theme and one javascript
Added:
trunk/echobase-ui/src/main/resources/lizmap/js/
trunk/echobase-ui/src/main/resources/lizmap/js/map.js
trunk/echobase-ui/src/main/resources/lizmap/theme/
trunk/echobase-ui/src/main/resources/lizmap/theme/css/
trunk/echobase-ui/src/main/resources/lizmap/theme/css/admin.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/123_click.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/bt_jaune.jpg
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/download_layer.gif
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_18.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20_tools.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_menu.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_menu_tools.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_timemanager.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/250x250_mappemonde.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/loading.gif
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/logo.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/logo_footer.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/overview_replacement.gif
trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/overview_replacement.png
trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css
trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css
Added: trunk/echobase-ui/src/main/resources/lizmap/js/map.js
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/js/map.js (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/js/map.js 2014-07-07 09:40:55 UTC (rev 1036)
@@ -0,0 +1,3998 @@
+/**
+* Class: lizMap
+* @package lizmap
+* @subpackage view
+* @author 3liz
+* @copyright 2011 3liz
+* @link http://3liz.com
+* @license Mozilla Public License : http://www.mozilla.org/MPL/
+*/
+
+
+var lizMap = function() {
+ /**
+ * PRIVATE Property: config
+ * {object} The map config
+ */
+ var config = null;
+ /**
+ * PRIVATE Property: capabilities
+ * {object} The wms capabilities
+ */
+ var capabilities = null;
+ /**
+ * PRIVATE Property: map
+ * {<OpenLayers.Map>} The map
+ */
+ var map = null;
+ /**
+ * PRIVATE Property: baselayers
+ * {Array(<OpenLayers.Layer>)} Ordered list of base layers
+ */
+ var baselayers = [];
+ /**
+ * PRIVATE Property: layers
+ * {Array(<OpenLayers.Layer>)} Ordered list of layers
+ */
+ var layers = [];
+ /**
+ * PRIVATE Property: controls
+ * {Object({key:<OpenLayers.Control>})} Dictionary of controls
+ */
+ var controls = {};
+ /**
+ * PRIVATE Property: tree
+ * {object} The layer's tree
+ */
+ var tree = {config:{type:'group'}};
+
+
+ /**
+ * PRIVATE function: cleanName
+ * cleaning layerName for class and layer
+ */
+ function cleanName(aName){
+ var accentMap = {
+ "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "ç": "c", "è": "e", "é": "e", "ê": "e", "ë": "e", "ì": "i", "í": "i", "î": "i", "ï": "i", "ñ": "n", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ù": "u", "ú": "u", "û": "u", "ü": "u", "ý": "y", "ÿ": "y",
+ "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Ç": "C", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "Ñ": "N", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "Ý": "Y",
+ "-":" ", "'": " ", "(": " ", ")": " "};
+ var normalize = function( term ) {
+ var ret = "";
+ for ( var i = 0; i < term.length; i++ ) {
+ ret += accentMap[ term.charAt(i) ] || term.charAt(i);
+ }
+ return ret;
+ };
+ aName = normalize(aName);
+ var reg = new RegExp('\\W', 'g');
+ return aName.replace(reg, '_');
+ }
+
+
+ /**
+ * PRIVATE function: updateMobile
+ * Determine if we should display the mobile version.
+ */
+ function updateMobile(){
+ var isMobile = mCheckMobile();
+ var contentIsMobile = $('#content').hasClass('mobile');
+ if (isMobile == contentIsMobile)
+ return;
+
+ if (isMobile) {
+ // Add mobile class to content
+ $('#content, #headermenu').addClass('mobile');
+
+ // hide overview map
+ if (config.options.hasOverview){
+ $('#overview-bar button').hide();
+ $('#overviewmap').hide();
+ }
+
+ if( $('#menu').is(':visible'))
+ $('#menu').hide();
+
+ $('#map-content').append($('#toolbar'));
+
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleLegendOn').attr('value'))
+ .parent().attr('class','legend');
+
+ // autocompletion items for locatebylayer feature
+ $('div.locate-layer select').show();
+ $('span.custom-combobox').hide();
+ }
+ else
+ {
+ // Remove mobile class to content
+ $('#content, #headermenu').removeClass('mobile');
+
+ // Display overview map
+ if (config.options.hasOverview){
+ $('#overviewmap').show();
+ $('#overview-bar button').show();
+ }
+
+ if( !$('#menu').is(':visible'))
+ $('#content span.ui-icon-open-menu').click();
+ else
+ $('#map-content').show();
+
+ $('#toolbar').insertBefore($('#switcher-menu'));
+
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleMapOnlyOn').attr('value'))
+ .parent().attr('class','map');
+
+ // autocompletion items for locatebylayer feature
+ $('div.locate-layer select').hide();
+ $('span.custom-combobox').show();
+ }
+
+ }
+
+
+ /**
+ * PRIVATE function: updateContentSize
+ * update the content size
+ */
+ function updateContentSize(){
+
+ updateMobile();
+
+ // calculate height height
+ var h = $(window).innerHeight();
+ h = h - $('#header').height();
+ h = h - $('#headermenu').height();
+ $('#map').height(h);
+
+ // Update body padding top by summing up header+headermenu
+ $('body').css('padding-top', $('#header').outerHeight() + $('#headermenu').outerHeight() );
+
+ // calculate map width depending on theme configuration
+ // (fullscreen map or not, mobile or not)
+ var w = $('body').parent()[0].offsetWidth;
+
+ if ($('#menu').is(':hidden') || $('#map-content').hasClass('fullscreen')) {
+ $('#map-content').css('margin-left',0);
+ } else {
+ w -= $('#menu').width();
+ $('#map-content').css('margin-left', $('#menu').width());
+ }
+ $('#map').width(w);
+
+ updateMapSize();
+
+ }
+
+
+ /**
+ * PRIVATE function: updateMapSize
+ * query OpenLayers to update the map size
+ */
+ function updateMapSize(){
+ var center = map.getCenter();
+ map.updateSize();
+ map.setCenter(center);
+ map.baseLayer.redraw();
+
+ if ($('#navbar').height()+150 > $('#map').height() || mCheckMobile())
+ $('#navbar .slider').hide();
+ else
+ $('#navbar .slider').show();
+
+ updateSwitcherSize();
+ }
+
+ /**
+ * PRIVATE function: updateSwitcherSize
+ * update the switcher size
+ */
+ function updateSwitcherSize(){
+ // calculate switcher height
+ // based on map height
+ h = $('#map').height();
+ // depending on element in #menu div
+ if ($('#close-menu').is(':visible'))
+ h -= $('#close-menu').outerHeight(true);
+ /*
+ if ($('#locate-menu').is(':visible') && $('#menu #locate-menu').length != 0) {
+ h -= $('#locate-menu').children().first().outerHeight(true);
+ h -= $('#locate-menu').children().last().outerHeight(true);
+ }
+ */
+ if ( $('#menu #toolbar').length != 0 ) {
+ $('#toolbar').children().each(function(){
+ var self = $(this);
+ if ( self.is(':visible') ) {
+ var children = self.children();
+ h -= children.first().outerHeight(true);
+ if ( children.length > 1 )
+ h -= children.last().outerHeight(true);
+ }
+ });
+ }
+ if ($('#baselayer-menu').is(':visible')) {
+ h -= $('#baselayer-menu').children().first().outerHeight(true);
+ h -= $('#baselayer-menu').children().last().outerHeight(true);
+ }
+ h -= $('#switcher-menu').children().first().outerHeight(true);
+
+ var sw = $('#switcher');
+ // depending on it's own css box parameters
+ h -= (parseInt(sw.css('margin-top')) ? parseInt(sw.css('margin-top')) : 0 ) ;
+ h -= (parseInt(sw.css('margin-bottom')) ? parseInt(sw.css('margin-bottom')) : 0 ) ;
+ h -= (parseInt(sw.css('padding-top')) ? parseInt(sw.css('padding-top')) : 0 ) ;
+ h -= (parseInt(sw.css('padding-bottom')) ? parseInt(sw.css('padding-bottom')) : 0 ) ;
+ h -= (parseInt(sw.css('border-top-width')) ? parseInt(sw.css('border-top-width')) : 0 ) ;
+ h -= (parseInt(sw.css('border-bottom-width')) ? parseInt(sw.css('border-bottom-width')) : 0 ) ;
+
+ //depending on it's parent padding
+ var swp = sw.parent();
+ h -= (parseInt(swp.css('padding-top')) ? parseInt(swp.css('padding-top')) : 0 ) ;
+ h -= (parseInt(swp.css('padding-bottom')) ? parseInt(swp.css('padding-bottom')) : 0 ) ;
+
+ // If map if fullscreen, get #menu position : bottom or top
+ h -= 2 * (parseInt($('#menu').css('bottom')) ? parseInt($('#menu').css('bottom')) : 0 ) ;
+
+ if($('#map-content').hasClass('fullscreen')){
+ $('#switcher').css('max-height', h);
+ }
+ else
+ $('#switcher').height(h);
+
+
+ }
+
+
+ /**
+ * PRIVATE function: getLayerLegendGraphicUrl
+ * get the layer legend graphic
+ *
+ * Parameters:
+ * name - {text} the layer name
+ * withScale - {boolean} url with scale parameter
+ *
+ * Dependencies:
+ * lizUrls.wms
+ *
+ * Returns:
+ * {text} the url
+ */
+ function getLayerLegendGraphicUrl(name, withScale) {
+ var layer = null
+ $.each(layers,function(i,l) {
+ if (layer == null && l.name == name)
+ layer = l;
+ });
+ var legendParams = {SERVICE: "WMS",
+ VERSION: "1.3.0",
+ REQUEST: "GetLegendGraphics",
+ LAYERS: layer.params['LAYERS'],
+ EXCEPTIONS: "application/vnd.ogc.se_inimage",
+ FORMAT: "image/png",
+ TRANSPARENT: "TRUE",
+ WIDTH: 150,
+ LAYERFONTSIZE: 9,
+ ITEMFONTSIZE: 9,
+ SYMBOLSPACE: 1,
+ DPI: 96};
+ var layerConfig = config.layers[layer.params['LAYERS']];
+ if (layerConfig.id==layerConfig.name)
+ legendParams['LAYERFONTBOLD'] = "TRUE";
+ else {
+ legendParams['LAYERFONTSIZE'] = 0;
+ legendParams['LAYERSPACE'] = 0;
+ }
+ legendParams['LAYERFONTBOLD'] = "FALSE";
+ if (withScale)
+ legendParams['SCALE'] = map.getScale();
+ var legendParamsString = OpenLayers.Util.getParameterString(
+ legendParams
+ );
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ return OpenLayers.Util.urlAppend(service, legendParamsString);
+ }
+
+ /**
+ * PRIVATE function: getLayerScale
+ * get the layer scales based on children layer
+ *
+ * Parameters:
+ * nested - {Object} a capability layer
+ * minScale - {Float} the nested min scale
+ * maxScale - {Float} the nested max scale
+ *
+ * Dependencies:
+ * config
+ *
+ * Returns:
+ * {Object} the min and max scales
+ */
+ function getLayerScale(nested,minScale,maxScale) {
+ for (var i = 0, len = nested.nestedLayers.length; i<len; i++) {
+ var layer = nested.nestedLayers[i];
+ var layerConfig = config.layers[layer.name];
+ if (layer.nestedLayers.length != 0)
+ return getLayerScale(layer,minScale,maxScale);
+ if (layerConfig) {
+ if (minScale == null)
+ minScale=layerConfig.minScale;
+ else if (layerConfig.minScale<minScale)
+ minScale=layerConfig.minScale;
+ if (maxScale == null)
+ maxScale=layerConfig.maxScale;
+ else if (layerConfig.maxScale>maxScale)
+ maxScale=layerConfig.maxScale;
+ }
+ }
+ if ( minScale < 1 )
+ minScale = 1;
+ return {minScale:minScale,maxScale:maxScale};
+ }
+
+ /**
+ * PRIVATE function: getLayerOrder
+ * get the layer order and calculate it if it's a QGIS group
+ *
+ * Parameters:
+ * nested - {Object} a capability layer
+ *
+ * Dependencies:
+ * config
+ *
+ * Returns:
+ * {Integer} the layer's order
+ */
+ function getLayerOrder(nested) {
+ // there is no layersOrder in the project
+ if (!('layersOrder' in config))
+ return -1;
+
+ // the nested is a layer and not a group
+ if (nested.nestedLayers.length == 0)
+ if (nested.name in config.layersOrder)
+ return config.layersOrder[nested.name];
+ else
+ return -1;
+
+ // the nested is a group
+ var order = -1;
+ for (var i = 0, len = nested.nestedLayers.length; i<len; i++) {
+ var layer = nested.nestedLayers[i];
+ var lOrder = -1;
+ if (layer.nestedLayers.length != 0)
+ lOrder = getLayerScale(layer);
+ else if (layer.name in config.layersOrder)
+ lOrder = config.layersOrder[layer.name];
+ else
+ lOrder = -1;
+ if (lOrder != -1) {
+ if (order == -1 || lOrder < order)
+ order = lOrder;
+ }
+ }
+ return order;
+ }
+
+ /**
+ * PRIVATE function: getLayerTree
+ * get the layer tree
+ * create OpenLayers WMS base or not layer {<OpenLayers.Layer.WMS>}
+ * push these layers in layers or baselayers
+ *
+ * Parameters:
+ * nested - {Object} a capability layer
+ * pNode - {Object} the nested tree node
+ *
+ * Dependencies:
+ * config
+ * layers
+ * baselayers
+ */
+ function getLayerTree(nested,pNode) {
+ pNode.children = [];
+
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ if (lizUrls.publicUrlList && lizUrls.publicUrlList.length > 1 ) {
+ service = [];
+ for (var j=0, jlen=lizUrls.publicUrlList.length; j<jlen; j++) {
+ service.push(
+ OpenLayers.Util.urlAppend(
+ lizUrls.publicUrlList[j],
+ OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ );
+ }
+ }
+
+ for (var i = 0, len = nested.nestedLayers.length; i<len; i++) {
+ var layer = nested.nestedLayers[i];
+ var layerConfig = config.layers[layer.name];
+ var layerName = cleanName(layer.name);
+
+ if (layer.name.toLowerCase() == 'hidden')
+ continue;
+
+ // if the layer is not the Overview and had a config
+ // creating the {<OpenLayers.Layer.WMS>} and the tree node
+ if (layer.name != 'Overview' && layerConfig) {
+ var node = {name:layerName,config:layerConfig,parent:pNode};
+ var layerWmsParams = {
+ layers:layer.name
+ ,version:'1.3.0'
+ ,exceptions:'application/vnd.ogc.se_inimage'
+ ,format:(layerConfig.imageFormat) ? layerConfig.imageFormat : 'image/png'
+ ,dpi:96
+ };
+ if (layerWmsParams.format != 'image/jpeg')
+ layerWmsParams['transparent'] = true;
+
+ if (layerConfig.baseLayer == 'True') {
+ // creating the base layer
+ baselayers.push(new OpenLayers.Layer.WMS(layerName,service
+ ,layerWmsParams
+ ,{isBaseLayer:true
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ }));
+
+ }
+ else if (layerConfig.type == 'layer' && layer.nestedLayers.length != 0) {
+ // creating the layer because it's a layer and has children
+ var minScale = layerConfig.minScale;
+ var maxScale = layerConfig.maxScale;
+ // get the layer scale beccause, it has children
+ var scales = getLayerScale(layer,null,null);
+ layers.push(new OpenLayers.Layer.WMS(layerName,service
+ ,layerWmsParams
+ ,{isBaseLayer:false
+ ,minScale:scales.maxScale
+ ,maxScale:scales.minScale
+ ,isVisible:(layerConfig.toggled=='True')
+ ,visibility:false
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ ,order:getLayerOrder(layer)
+ }));
+ }
+ else if (layerConfig.type == 'layer') {
+ // creating the layer because it's a layer and has no children
+ layers.push(new OpenLayers.Layer.WMS(layerName,service
+ ,layerWmsParams
+ ,{isBaseLayer:false
+ ,minScale:layerConfig.maxScale
+ ,maxScale:(layerConfig.minScale != null && layerConfig.minScale < 1) ? 1 : layerConfig.minScale
+ ,isVisible:(layerConfig.toggled=='True')
+ ,visibility:false
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ ,order:getLayerOrder(layer)
+ }));
+ }
+ // creating the layer tre because it's a group, has children and is not a base layer
+ if (layerConfig.type == 'group' && layer.nestedLayers.length != 0 && layerConfig.baseLayer == 'False')
+ getLayerTree(layer,node);
+ if (layerConfig.baseLayer != 'True')
+ pNode.children.push(node);
+ } else if (layer.name == 'Overview'){
+ config.options.hasOverview = true;
+ }
+ }
+ }
+
+ /**
+ * PRIVATE function: analyseNode
+ * analyse Node Config
+ * define if the node has to be a child of his parent node
+ *
+ * Parameters:
+ * aNode - {Object} a node config
+ *
+ * Returns:
+ * {Boolean} maintains the node in the tree
+ */
+ function analyseNode(aNode) {
+ var nodeConfig = aNode.config;
+ if (nodeConfig.type == 'layer' && nodeConfig.baseLayer != 'True')
+ return true;
+ else if (nodeConfig.type == 'layer')
+ return false;
+
+ if (!('children' in aNode))
+ return false;
+ var children = aNode.children;
+ var result = false;
+ var removeIdx = [];
+ for (var i=0, len=children.length; i<len; i++) {
+ var child = children[i];
+ var analyse = analyseNode(child);
+ if (!analyse)
+ removeIdx.push(i);
+ result = (result || analyse);
+ }
+ removeIdx.reverse();
+ for (var i=0, len=removeIdx.length; i<len; i++) {
+ children.splice(removeIdx[i],1);
+ }
+ return result;
+ }
+
+ /**
+ * PRIVATE function: getSwitcherLine
+ * get the html table line <tr> of a config node for the switcher
+ *
+ * Parameters:
+ * aNode - {Object} a config node
+ *
+ * Returns:
+ * {String} the <tr> html corresponding to the node
+ */
+ function getSwitcherLine(aNode, aParent) {
+ var html = '';
+
+ var nodeConfig = aNode.config;
+ html += '<tr id="'+nodeConfig.type+'-'+aNode.name+'"';
+ html += ' class="liz-'+nodeConfig.type;
+ if (aParent)
+ html += ' child-of-group-'+aParent.name;
+ if (('children' in aNode) && aNode['children'].length!=0)
+ html += ' expanded parent';
+ html += '">';
+
+ html += '<td><button class="checkbox" name="'+nodeConfig.type+'" value="'+aNode.name+'" title="'+lizDict['tree.button.checkbox']+'"></button>';
+ html += '<span class="label" title="'+nodeConfig.abstract+'">'+nodeConfig.title+'</span>';
+ html += '</td>';
+
+ html += '<td>';
+ if (nodeConfig.type == 'layer')
+ html += '<span class="loading"> </span>';
+ html += '</td>';
+
+ var legendLink = '';
+ if (nodeConfig.link)
+ legendLink = nodeConfig.link;
+ if (legendLink != '' )
+ html += '<td><button class="link" name="link" title="'+lizDict['tree.button.link']+'" value="'+legendLink+'"/></td>';
+ else
+ html += '<td></td>';
+
+ var removeCache = '';
+ if (nodeConfig.cached && nodeConfig.cached == 'True' && nodeConfig.type == 'layer' && ('removeCache' in config.options))
+ html += '<td><button class="removeCache" name="removeCache" title="'+lizDict['tree.button.removeCache']+'" value="'+aNode.name+'"/></td>';
+ else
+ html += '<td></td>';
+
+ html += '</tr>';
+
+ if (nodeConfig.type == 'layer') {
+ var url = getLayerLegendGraphicUrl(aNode.name, false);
+
+ html += '<tr id="legend-'+aNode.name+'" class="child-of-layer-'+aNode.name+' legendGraphics">';
+ html += '<td colspan="2"><div class="legendGraphics"><img src="'+url+'"/></div></td>';
+ html += '</tr>';
+ }
+
+ return html;
+ }
+
+ /**
+ * PRIVATE function: getSwitcherNode
+ * get the html of a config node for the switcher
+ *
+ * Parameters:
+ * aNode - {Object} a config node
+ *
+ * Returns:
+ * {String} the html corresponding to the node
+ */
+ function getSwitcherNode(aNode,aLevel) {
+ var html = '';
+ if (aLevel == 0
+ && ('rootGroupsAsBlock' in config.options)
+ && config.options['rootGroupsAsBlock'] == 'True') {
+ var children = aNode.children;
+ var previousSibling;
+ for (var i=0, len=children.length; i<len; i++) {
+ var child = children[i];
+ var positionClass = '';
+ if (i == 0)
+ positionClass= 'first-block ';
+ else if (i == len-1)
+ positionClass= 'last-block ';
+ if (('children' in child) && child['children'].length!=0) {
+ if (previousSibling && ( (('children' in previousSibling) && previousSibling['children'].length==0) || !('children' in previousSibling)) ) {
+ html += '</table>';
+ html += '</div>';
+ }
+ html += '<div class="with-blocks '+positionClass+child.name+'">';
+ html += '<table class="tree">';
+ var grandChildren = child.children;
+ for (var j=0, jlen=grandChildren.length; j<jlen; j++) {
+ var grandChild = grandChildren[j];
+ html += getSwitcherLine(grandChild);
+
+ if (('children' in grandChild) && grandChild['children'].length!=0)
+ html += getSwitcherNode(grandChild, aLevel+1);
+ }
+ html += '</table>';
+ html += '</div>';
+ } else {
+ if (previousSibling && ('children' in previousSibling) && previousSibling['children'].length!=0) {
+ html += '<div class="with-blocks '+positionClass+'no-group">';
+ html += '<table class="tree">';
+ }
+ html += getSwitcherLine(child);
+ }
+ previousSibling = child;
+ }
+ if ((('children' in previousSibling) && previousSibling['children'].length==0) || !('children' in previousSibling)) {
+ html += '</table>';
+ html += '</div>';
+ }
+ return html;
+ }
+ if (aLevel == 0) {
+ html += '<div class="without-blocks no-group">';
+ html += '<table class="tree">';
+ }
+
+ var children = aNode.children;
+ for (var i=0, len=children.length; i<len; i++) {
+ var child = children[i];
+ if (aLevel == 0)
+ html += getSwitcherLine(child);
+ else
+ html += getSwitcherLine(child,aNode);
+
+ if (('children' in child) && child['children'].length!=0)
+ html += getSwitcherNode(child, aLevel+1);
+ }
+
+ if (aLevel == 0) {
+ html += '</table>';
+ html += '</div>';
+ }
+ return html;
+ }
+
+ /**
+ * PRIVATE function: createMap
+ * creating the map {<OpenLayers.Map>}
+ */
+ function createMap() {
+ // get and define projection
+ var proj = config.options.projection;
+ if ( !(proj.ref in Proj4js.defs) )
+ Proj4js.defs[proj.ref]=proj.proj4;
+ var projection = new OpenLayers.Projection(proj.ref);
+ if ( !(proj.ref in OpenLayers.Projection.defaults) )
+ OpenLayers.Projection.defaults[proj.ref] = projection;
+
+ // get and define the max extent
+ var bbox = config.options.bbox;
+ var extent = new OpenLayers.Bounds(Number(bbox[0]),Number(bbox[1]),Number(bbox[2]),Number(bbox[3]));
+
+ var restrictedExtent = extent.scale(3);
+ var initialExtent = extent.clone();
+ if ( 'initialExtent' in config.options && config.options.initialExtent.length == 4 ) {
+ var initBbox = config.options.initialExtent;
+ initialExtent = new OpenLayers.Bounds(Number(initBbox[0]),Number(initBbox[1]),Number(initBbox[2]),Number(initBbox[3]));
+ }
+
+ // calculate the map height
+ var mapHeight = $('body').parent()[0].clientHeight;
+ if(!mapHeight)
+ mapHeight = $('window').innerHeight();
+ mapHeight = mapHeight - $('#header').height();
+ mapHeight = mapHeight - $('#headermenu').height();
+ $('#map').height(mapHeight);
+
+ var res = extent.getHeight()/$('#map').height();
+
+ var scales = [];
+ var resolutions = [];
+ if ('resolutions' in config.options)
+ resolutions = config.options.resolutions;
+ else if ('mapScales' in config.options)
+ scales = config.options.mapScales;
+ scales.sort(function(a, b) {
+ return Number(b) - Number(a);
+ });
+ // remove duplicate scales
+ nScales = [];
+ while (scales.length != 0){
+ var scale = scales.pop(0);
+ if ($.inArray( scale, nScales ) == -1 )
+ nScales.push( scale );
+ }
+ scales = nScales;
+
+
+ // creating the map
+ OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; // Avoid some issues with tiles not displayed
+ OpenLayers.Util.DEFAULT_PRECISION=20; // default is 14 : change needed to avoid rounding problem with cache
+ map = new OpenLayers.Map('map'
+ ,{controls:[
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.Permalink('permalink'),
+ new OpenLayers.Control.ZoomBox({alwaysZoom:true})
+ ]
+ ,eventListeners:{
+ zoomend: function(evt){
+ // private treeTable
+ var options = {
+ childPrefix : "child-of-"
+ };
+
+ function childrenOf(node) {
+ return $(node).siblings("tr." + options.childPrefix + node[0].id);
+ };
+
+ function descendantsOf(node) {
+ var descendants = [];
+ var children = [];
+ if (node && node[0])
+ children = childrenOf(node);
+ for (var i=0, len=children.length; i<len; i++) {
+ descendants.push(children[i]);
+ descendants = descendants.concat(descendantsOf([children[i]]));
+ }
+ return descendants;
+ };
+
+ function parentOf(node) {
+ if (node.length == 0 )
+ return null;
+
+ var classNames = node[0].className.split(' ');
+
+ for(var key=0; key<classNames.length; key++) {
+ if(classNames[key].match(options.childPrefix)) {
+ return $(node).siblings("#" + classNames[key].substring(options.childPrefix.length));
+ }
+ }
+
+ return null;
+ };
+
+ function ancestorsOf(node) {
+ var ancestors = [];
+ while(node = parentOf(node)) {
+ ancestors[ancestors.length] = node[0];
+ }
+ return ancestors;
+ };
+ //layer visibility
+ for (var i=0,len=layers.length; i<len; i++) {
+ var layer = layers[i];
+ var b = $('#switcher button[name="layer"][value="'+layer.name+'"]').first();
+ if (layer.inRange && b.button('option','disabled')) {
+ var tr = b.parents('tr').first();
+ tr.removeClass('liz-state-disabled').find('button').button('enable');
+ var ancestors = ancestorsOf(tr);
+ $.each(ancestors,function(i,a) {
+ $(a).removeClass('liz-state-disabled').find('button').button('enable');
+ });
+ if (tr.find('button[name="layer"]').button('option','icons').primary == 'liz-icon-check')
+ layer.setVisibility(true);
+ } else if (!layer.inRange && !b.button('option','disabled')) {
+ var tr = b.parents('tr').first();
+ tr.addClass('liz-state-disabled').find('button').first().button('disable');
+ if (tr.hasClass('liz-layer'))
+ tr.collapse();
+ var ancestors = ancestorsOf(tr);
+ $.each(ancestors,function(i,a) {
+ a = $(a);
+ var count = 0;
+ var checked = 0;
+ var aDesc = childrenOf(a);
+ $.each(aDesc,function(j,trd) {
+ $(trd).find('button.checkbox').each(function(i,b){
+ if ($(b).button('option','disabled'))
+ checked++;
+ count++;
+ });
+ });
+ if (count == checked)
+ a.addClass('liz-state-disabled').find('button').first().button('disable');
+ else
+ a.removeClass('liz-state-disabled').find('button').button('enable');
+ });
+ }
+ }
+
+ //pan button
+ $('#navbar button.pan').click();
+ }
+ }
+
+ ,maxExtent:extent
+ ,restrictedExtent: restrictedExtent
+ ,initialExtent:initialExtent
+ ,maxScale: scales.length == 0 ? config.options.minScale : "auto"
+ ,minScale: scales.length == 0 ? config.options.maxScale : "auto"
+ ,numZoomLevels: scales.length == 0 ? config.options.zoomLevelNumber : scales.length
+ ,scales: scales.length == 0 ? null : scales
+ ,resolutions: resolutions.length == 0 ? null : resolutions
+ ,projection:projection
+ ,units:projection.proj.units
+ ,allOverlays:(baselayers.length == 0)
+ });
+ map.addControl(new OpenLayers.Control.Attribution({div:document.getElementById('attribution')}));
+
+ // add handler to update the map size
+ $(window).resize(function() {
+ updateContentSize();
+ });
+ }
+
+ /**
+ * Get features for locate by layer tool
+ */
+ function updateLocateFeature(aName, aJoinField, aJoinValue) {
+ var locate = config.locateByLayer[aName];
+ var lConfig = config.layers[aName];
+ var features = locate.features;
+ var options = '<option value="-1">'+lConfig.title+'</option>';
+ for (var fid in features) {
+ var feat = features[fid];
+ if (aJoinField && aJoinValue && feat.properties[aJoinField] != aJoinValue)
+ continue;
+ options += '<option value="'+feat.id+'">'+feat.properties[locate.fieldName]+'</option>';
+ }
+ $('#locate-layer-'+aName).html(options).val('-1');
+ }
+
+ /**
+ * Get features for locate by layer tool
+ */
+ function getLocateFeature(aName) {
+ var locate = config.locateByLayer[aName];
+ var fields = ['geometry',locate.fieldName];
+ if ('joinFieldName' in locate)
+ fields.push( locate.joinFieldName );
+ if ('filterFieldName' in locate)
+ fields.push( locate.filterFieldName );
+ var wfsOptions = {
+ 'SERVICE':'WFS'
+ ,'VERSION':'1.0.0'
+ ,'REQUEST':'GetFeature'
+ ,'TYPENAME':aName
+ ,'PROPERTYNAME':fields.join(',')
+ ,'OUTPUTFORMAT':'GeoJSON'
+ };
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ $.get(service
+ ,wfsOptions
+ ,function(data) {
+ var lConfig = config.layers[aName];
+ locate['features'] = {};
+ var features = data.features;
+ if ('filterFieldName' in locate) {
+ // create filter combobox for the layer
+ features.sort(function(a, b) {
+ return a.properties[locate.filterFieldName].localeCompare(b.properties[locate.filterFieldName]);
+ });
+ var fOptions = '<option value="-1">'+lConfig.title+' '+locate.filterFieldName+'</option>';
+ var fValue = '-1';
+ for (var i=0, len=features.length; i<len; i++) {
+ var feat = features[i];
+ if ( fValue != feat.properties[locate.filterFieldName] ) {
+ fValue = feat.properties[locate.filterFieldName];
+ fOptions += '<option value="'+fValue+'">'+fValue+'</option>';
+ }
+ }
+ $('#locate-layer-'+aName).parent().before('<div class="locate-layer"><select id="locate-layer-'+aName+'-'+locate.filterFieldName+'">'+fOptions+'</select></div><br/>');
+ $('#locate-layer-'+aName+'-'+locate.filterFieldName).change(function(){
+ var filterValue = $(this).children(':selected').val();
+ //console.log(filterValue);
+ var lOptions = '<option value="-1">'+lConfig.title+'</option>';
+ for (var fid in locate.features) {
+ var feat = locate.features[fid];
+ if (feat.properties[locate.filterFieldName] != filterValue)
+ continue;
+ lOptions += '<option value="'+feat.id+'">'+feat.properties[locate.fieldName]+'</option>';
+ }
+ $('#locate-layer-'+aName).html(lOptions).val('-1');
+ });
+ $('#locate-layer-'+aName+'-'+locate.filterFieldName).combobox({
+ "selected": function(evt, ui){
+ if ( ui.item ) {
+ var self = $(this);
+ var uiItem = $(ui.item);
+ window.setTimeout(function(){
+ self.val(uiItem.val()).change();
+ }, 1);
+ }
+ }
+ });
+ updateSwitcherSize();
+ }
+
+ // create combobox for the layer
+ features.sort(function(a, b) {
+ return a.properties[locate.fieldName].localeCompare(b.properties[locate.fieldName]);
+ });
+ var options = '<option value="-1">'+lConfig.title+'</option>';
+ for (var i=0, len=features.length; i<len; i++) {
+ var feat = features[i];
+ locate.features[feat.id.toString()] = feat;
+ if ( !('filterFieldName' in locate) )
+ options += '<option value="'+feat.id+'">'+feat.properties[locate.fieldName]+'</option>';
+ }
+ $('#locate-layer-'+aName).html(options).change(function() {
+ var layer = map.getLayersByName('locatelayer')[0];
+ layer.destroyFeatures();
+ var proj = new OpenLayers.Projection(locate.crs);
+
+ var val = $(this).children(':selected').val();
+ if (val == '-1') {
+ // update to join layer
+ if ('joinFieldName' in locate && 'joinLayer' in locate && 'vectorjoins' in locate) {
+ var jName = locate.joinLayer;
+ if ( jName in config.locateByLayer ) {
+ var jLocate = config.locateByLayer[jName];
+ if ( jLocate.joinLayer == aName ) {
+ $('#locate-layer-'+jName).change();
+ return true;
+ }
+ }
+ }
+
+ var bbox = new OpenLayers.Bounds(locate.bbox);
+ bbox.transform(proj, map.getProjection());
+ map.zoomToExtent(bbox);
+ } else {
+ var feat = locate.features[val];
+ var format = new OpenLayers.Format.GeoJSON();
+ feat = format.read(feat)[0];
+ feat.geometry.transform(proj, map.getProjection());
+ map.zoomToExtent(feat.geometry.getBounds());
+ if (locate.displayGeom == 'True')
+ layer.addFeatures([feat]);
+ // update joined layer
+ if ('joinFieldName' in locate && 'joinLayer' in locate) {
+ var jName = locate.joinLayer;
+ if ( jName in config.locateByLayer ) {
+ var jLocate = config.locateByLayer[jName];
+ if ( jLocate.joinLayer == aName && 'vectorjoins' in jLocate ) {
+ // update joined select options
+ updateLocateFeature(jName, jLocate.joinFieldName, feat.attributes[locate.joinFieldName]);
+ // update joined input value
+ $('#locate-layer-'+jName).siblings().first().children('input').val($('#locate-layer-'+jName).children(':selected').text());
+ }
+ }
+ }
+
+ }
+ $(this).blur();
+ return true;
+ });
+ $('#locate-layer-'+aName).combobox({
+ "selected": function(evt, ui){
+ if ( ui.item ) {
+ var self = $(this);
+ var uiItem = $(ui.item);
+ window.setTimeout(function(){
+ self.val(uiItem.val()).change();
+ }, 1);
+ }
+ }
+ });
+ if(mCheckMobile()){
+ // autocompletion items for locatebylayer feature
+ $('div.locate-layer select').show();
+ $('span.custom-combobox').hide();
+ }
+ },'json');
+ }
+
+ /**
+ * create the layer switcher
+ */
+ function createSwitcher() {
+ // set the switcher content
+ $('#switcher').html(getSwitcherNode(tree,0));
+ $('#switcher table.tree').treeTable({
+ onNodeShow: function() {
+ //updateSwitcherSize();
+ var self = $(this);
+ if (self.find('div.legendGraphics').length != 0) {
+ var name = self.attr('id').replace('legend-','');
+ var url = getLayerLegendGraphicUrl(name, true);
+ self.find('div.legendGraphics img').attr('src',url);
+ }
+ },
+ onNodeHide: function() {
+ //updateSwitcherSize();
+ }
+ });
+ $('#close-menu .ui-icon-close-menu').click(function(){
+ $('#menu').hide();
+ if($('#content').hasClass('mobile')) {
+ $('#map-content').show();
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleLegendOn').attr('value'))
+ .parent().attr('class','legend');
+ } else {
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleLegendMapOn').attr('value'))
+ .parent().attr('class','legend');
+ }
+ $('#content .ui-icon-open-menu').show();
+ updateContentSize();
+ });
+ $('#content .ui-icon-open-menu').click(function(){
+ $('#menu').show();
+ if($('#content').hasClass('mobile')) {
+ $('#map-content').hide();
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleMapOn').attr('value'))
+ .parent().attr('class','map');
+ } else {
+ $('#toggleLegend')
+ .attr('data-original-title',$('#toggleMapOn').attr('value'))
+ .parent().attr('class','map');
+ }
+ $(this).hide();
+ updateContentSize();
+ });
+
+
+ // === Private functions
+ var options = {
+ childPrefix : "child-of-"
+ };
+
+ function childrenOf(node) {
+ return $(node).siblings("tr." + options.childPrefix + node[0].id);
+ };
+
+ function descendantsOf(node) {
+ var descendants = [];
+ var children = [];
+ if (node && node[0])
+ children = childrenOf(node);
+ for (var i=0, len=children.length; i<len; i++) {
+ descendants.push(children[i]);
+ descendants = descendants.concat(descendantsOf([children[i]]));
+ }
+ return descendants;
+ };
+
+ function parentOf(node) {
+ if (node.length == 0 )
+ return null;
+
+ var classNames = node[0].className.split(' ');
+
+ for(var key=0; key<classNames.length; key++) {
+ if(classNames[key].match(options.childPrefix)) {
+ return $(node).siblings("#" + classNames[key].substring(options.childPrefix.length));
+ }
+ }
+
+ return null;
+ };
+
+ function ancestorsOf(node) {
+ var ancestors = [];
+ while(node = parentOf(node)) {
+ ancestors[ancestors.length] = node[0];
+ }
+ return ancestors;
+ };
+
+ // activate checkbox buttons
+ $('#switcher button.checkbox').button({
+ //icons:{primary:'liz-icon-check'},
+ icons:{primary:''},
+ text:false
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ if (self.attr('aria-disabled')=='true')
+ return false;
+ var icons = self.button('option','icons');
+ var descendants = [self.parents('tr').first()];
+ descendants = descendants.concat(descendantsOf($(descendants[0])));
+ if (icons.primary != 'liz-icon-check') {
+ $.each(descendants,function(i,tr) {
+ $(tr).find('button.checkbox').button('option','icons',{primary:'liz-icon-check'});
+ $(tr).find('button.checkbox[name="layer"]').each(function(i,b){
+ var name = $(b).val();
+ var layer = map.getLayersByName(name)[0];
+ layer.setVisibility(true);
+ });
+ });
+ } else {
+ $.each(descendants,function(i,tr) {
+ $(tr).find('button.checkbox').button('option','icons',{primary:''});
+ $(tr).find('button.checkbox[name="layer"]').each(function(i,b){
+ var name = $(b).val();
+ var layer = map.getLayersByName(name)[0];
+ layer.setVisibility(false);
+ });
+ });
+ self.button('option','icons',{primary:''});
+ }
+ var ancestors = ancestorsOf(self.parents('tr').first());
+ $.each(ancestors,function(i,tr) {
+ tr = $(tr);
+ var count = 0;
+ var checked = 0;
+ var pchecked = 0;
+ var trDesc = childrenOf(tr);
+ $.each(trDesc,function(j,trd) {
+ $(trd).find('button.checkbox').each(function(i,b){
+ var icons = $(b).button('option','icons');
+ if (icons.primary == 'liz-icon-check')
+ checked++;
+ else if (icons.primary == 'liz-icon-partial-check')
+ pchecked++;
+ count++;
+ });
+ });
+ var trButt = tr.find('button.checkbox');
+ if (count==checked)
+ trButt.button('option','icons',{primary:'liz-icon-check'});
+ else if (checked==0 && pchecked==0)
+ trButt.button('option','icons',{primary:''});
+ else
+ trButt.button('option','icons',{primary:'liz-icon-partial-check'});
+ });
+ });
+
+ // activate link buttons
+ $('#switcher button.link').button({
+ icons:{primary:'liz-icon-info'},
+ text:false
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ if (self.attr('aria-disabled')=='true')
+ return false;
+ var windowLink = self.val();
+ // Test if the link is internal
+ var mediaRegex = /^(\/)?media\//;
+ if(mediaRegex.test(windowLink)){
+ var mediaLink = OpenLayers.Util.urlAppend(lizUrls.media
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ windowLink = mediaLink+'&path=/'+windowLink;
+ }
+ // Open link in a new window
+ window.open(windowLink);
+ });
+
+ // Activate removeCache button
+ $('#switcher button.removeCache').button({
+ icons:{primary:'liz-remove-cache'},
+ text:false
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ if (self.attr('aria-disabled')=='true')
+ return false;
+ var removeCacheServerUrl = OpenLayers.Util.urlAppend(
+ lizUrls.removeCache
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ var windowLink = removeCacheServerUrl + '&layer=' + self.val();
+ // Open link in a new window
+ if (confirm(lizDict['tree.button.removeCache'] + ' ?'))
+ window.open(windowLink);
+ });
+
+ var projection = map.projection;
+
+ // get the baselayer select content
+ // and adding baselayers to the map
+ //var select = '<select class="baselayers">';
+ var select = [];
+ baselayers.reverse();
+ for (var i=0,len=baselayers.length; i<len; i++) {
+ var baselayer = baselayers[i]
+ baselayer.units = projection.proj.units;
+ map.addLayer(baselayer);
+ var blConfig = config.layers[baselayer.name];
+ if (blConfig)
+ select += '<option value="'+blConfig.name+'">'+blConfig.title+'</option>';
+ else
+ select += '<option value="'+baselayer.name+'">'+baselayer.name+'</option>';
+ /*
+ if (blConfig)
+ select.push('<input type="radio" name="baselayers" value="'+blConfig.name+'"><span class="baselayer-radio-label">'+blConfig.title+'</span></input>');
+ else
+ select.push('<input type="radio" name="baselayers" value="'+baselayer.name+'"><span class="baselayer-radio-label">'+baselayer.name+'</span></input>');
+ */
+ }
+ //select += '</select>';
+ //select = select.join('<br/>');
+
+ if (baselayers.length!=0) {
+ // active the select element for baselayers
+ $('#baselayer-select').append(select);
+ $('#baselayer-select')
+ .change(function() {
+ var val = $(this).val();
+ map.setBaseLayer(map.getLayersByName(val)[0]);
+ $(this).blur();
+ });
+ // Hide baselayer-menu if only one base layer inside
+ if (baselayers.length==1)
+ $('#baselayer-menu').hide();
+ } else {
+ // hide elements for baselayers
+ $('#baselayer-menu').hide();
+ map.addLayer(new OpenLayers.Layer.Vector('baselayer',{
+ maxExtent:map.maxExtent
+ ,maxScale: map.maxScale
+ ,minScale: map.minScale
+ ,numZoomLevels: map.numZoomLevels
+ ,scales: map.scales
+ ,projection: map.projection
+ ,units: map.projection.proj.units
+ }));
+ }
+
+ // adding layers to the map
+ layers.sort(function(a, b) {
+ if (a.order == b.order)
+ return 0;
+ return a.order > b.order ? 1 : -1;
+ });
+ layers.reverse();
+ for (var i=0,len=layers.length; i<len; i++) {
+ var l = layers[i];
+ l.units = projection.proj.units;
+ l.events.on({
+ loadstart: function(evt) {
+ $('#layer-'+evt.object.name+' span.loading').addClass('loadstart');
+ },
+ loadend: function(evt) {
+ $('#layer-'+evt.object.name+' span.loading').removeClass('loadstart');
+ }
+ });
+ map.addLayer(l);
+ if (l.isVisible)
+ $('#switcher button.checkbox[name="layer"][value="'+l.name+'"]').click();
+ }
+
+ // Add Locate by layer
+ if ('locateByLayer' in config) {
+ var locateContent = [];
+ for (var lname in config.locateByLayer) {
+ var lConfig = config.layers[lname];
+ var html = '<div class="locate-layer">';
+ html += '<select id="locate-layer-'+lname+'" class="label">';
+ html += '<option>'+lConfig.title+'...</option>';
+ html += '</select>';
+ html += '</div>';
+ //constructing the select
+ locateContent.push(html);
+ }
+ $('#locate').html(locateContent.join('<br/>'));
+ map.addLayer(new OpenLayers.Layer.Vector('locatelayer',{
+ styleMap: new OpenLayers.StyleMap({
+ pointRadius: 6,
+ fill: false,
+ stroke: true,
+ strokeWidth: 3,
+ strokeColor: 'yellow'
+ })
+ }));
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ $.get(service, {
+ 'SERVICE':'WFS'
+ ,'VERSION':'1.0.0'
+ ,'REQUEST':'GetCapabilities'
+ }, function(xml) {
+ var featureTypes = $(xml).find('FeatureType');
+ if (featureTypes.length == 0 ){
+ config.locateByLayer = {};
+ $('#toggleLocate').parent().remove();
+ $('#locate-menu').remove();
+ updateSwitcherSize();
+ } else {
+ featureTypes.each( function(){
+ var self = $(this);
+ var lname = self.find('Name').text();
+ if (lname in config.locateByLayer) {
+ var locate = config.locateByLayer[lname];
+ locate['crs'] = self.find('SRS').text();
+ if ( locate.crs in Proj4js.defs )
+ new OpenLayers.Projection(locate.crs);
+ else
+ $.get(service, {
+ 'REQUEST':'GetProj4'
+ ,'authid': locate.crs
+ }, function ( aText ) {
+ Proj4js.defs[locate.crs] = aText;
+ new OpenLayers.Projection(locate.crs);
+ }, 'text');
+ var bbox = self.find('LatLongBoundingBox');
+ locate['bbox'] = [
+ parseFloat(bbox.attr('minx'))
+ ,parseFloat(bbox.attr('miny'))
+ ,parseFloat(bbox.attr('maxx'))
+ ,parseFloat(bbox.attr('maxy'))
+ ];
+ }
+ } );
+
+ // get joins
+ for (var lName in config.locateByLayer) {
+ var locate = config.locateByLayer[lName];
+ if ('vectorjoins' in locate) {
+ var vectorjoins = locate['vectorjoins'];
+ locate['joinFieldName'] = vectorjoins['targetFieldName'];
+ for (var jName in config.locateByLayer) {
+ var jLocate = config.locateByLayer[jName];
+ if (jLocate.layerId == vectorjoins.joinLayerId) {
+ locate['joinLayer'] = jName;
+ jLocate['joinFieldName'] = vectorjoins['joinFieldName'];
+ jLocate['joinLayer'] = lName;
+ }
+ }
+ }
+ }
+
+ // get features
+ for (var lname in config.locateByLayer) {
+ getLocateFeature(lname);
+ }
+ $('#locate-menu button.btn-locate-clear').click(function() {
+ var layer = map.getLayersByName('locatelayer')[0];
+ layer.destroyFeatures();
+ $('#locate select').val('-1');
+ });
+ }
+ },'xml');
+ $('#locate-menu').show();
+ }
+ }
+
+ /**
+ * PRIVATE function: createOverview
+ * create the overview
+ */
+ function createOverview() {
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ var ovLayer = new OpenLayers.Layer.WMS('overview'
+ ,service
+ ,{
+ layers:'Overview'
+ ,version:'1.3.0'
+ ,exceptions:'application/vnd.ogc.se_inimage'
+ ,format:'image/png'
+ ,transparent:true
+ ,dpi:96
+ },{
+ isBaseLayer:true
+ ,gutter:5
+ ,buffer:0
+ });
+
+ if (config.options.hasOverview) {
+ // get and define the max extent
+ var bbox = config.options.bbox;
+ var extent = new OpenLayers.Bounds(Number(bbox[0]),Number(bbox[1]),Number(bbox[2]),Number(bbox[3]));
+ var res = extent.getHeight()/90;
+ var resW = extent.getWidth()/180;
+ if (res <= resW)
+ res = resW;
+
+ map.addControl(new OpenLayers.Control.OverviewMap(
+ {div: document.getElementById("overviewmap"),
+ size : new OpenLayers.Size(220, 110),
+ mapOptions:{maxExtent:map.maxExtent
+ ,maxResolution:"auto"
+ ,minResolution:"auto"
+ //mieux calculé le coef 64 pour units == "m" et 8 sinon ???
+ //,scales: map.scales == null ? [map.minScale*64] : [Math.max.apply(Math,map.scales)*8]
+ ,scales: [OpenLayers.Util.getScaleFromResolution(res, map.projection.proj.units)]
+ ,projection:map.projection
+ ,units:map.projection.proj.units
+ ,layers:[ovLayer]
+ ,singleTile:true
+ }
+ }
+ ));
+ } else {
+ $('#overviewmap').hide();
+ $('#overview-bar button').hide();
+ }
+
+ /*
+ $('#overviewmap .ui-dialog-titlebar-close').button({
+ text:false,
+ icons:{primary: "ui-icon-closethick"}
+ }).click(function(){
+ $('#overviewmap').toggle();
+ return false;
+ });
+ */
+ $('#overview-bar .button').button({
+ text:false,
+ icons:{primary: "ui-icon-triangle-1-n"}
+ })
+ .removeClass( "ui-corner-all" )
+ .click(function(){
+ var self = $(this);
+ var icons = self.button('option','icons');
+ if (icons.primary == 'ui-icon-triangle-1-n')
+ self.button('option','icons',{primary:'ui-icon-triangle-1-s'});
+ else
+ self.button('option','icons',{primary:'ui-icon-triangle-1-n'});
+ $('#overviewmap').toggle();
+ return false;
+ });
+
+ map.addControl(new OpenLayers.Control.Scale(document.getElementById('scaletext')));
+ map.addControl(new OpenLayers.Control.ScaleLine({div:document.getElementById('scaleline')}));
+
+ if (config.options.hasOverview)
+ if(!mCheckMobile())
+ $('#overviewmap').show();
+ }
+
+ /**
+ * PRIVATE function: createNavbar
+ * create the navigation bar (zoom, scales, etc)
+ */
+ function createNavbar() {
+ $('#navbar div.slider').height(Math.max(50,map.numZoomLevels*5)).slider({
+ orientation:'vertical',
+ min: 0,
+ max: map.numZoomLevels-1,
+ change: function(evt,ui) {
+ if (ui.value > map.baseLayer.numZoomLevels-1) {
+ $('#navbar div.slider').slider('value',map.getZoom())
+ $('#zoom-in-max-msg').show('slow', function() {
+ window.setTimeout(function(){$('#zoom-in-max-msg').hide('slow')},1000)
+ });
+ } else
+ map.zoomTo(ui.value);
+ }
+ });
+ $('#navbar button.pan').button({
+ text:false,
+ icons:{primary: "ui-icon-pan"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var self = $(this);
+ if (self.hasClass('ui-state-select'))
+ return false;
+ $('#navbar button.zoom').removeClass('ui-state-select');
+ self.addClass('ui-state-select');
+ map.getControlsByClass('OpenLayers.Control.ZoomBox')[0].deactivate();
+ map.getControlsByClass('OpenLayers.Control.Navigation')[0].activate();
+ map.getControlsByClass('OpenLayers.Control.WMSGetFeatureInfo')[0].activate();
+ });
+ $('#navbar button.zoom').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var self = $(this);
+ if (self.hasClass('ui-state-select'))
+ return false;
+ $('#navbar button.pan').removeClass('ui-state-select');
+ self.addClass('ui-state-select');
+ map.getControlsByClass('OpenLayers.Control.Navigation')[0].deactivate();
+ map.getControlsByClass('OpenLayers.Control.WMSGetFeatureInfo')[0].deactivate();
+ map.getControlsByClass('OpenLayers.Control.ZoomBox')[0].activate();
+ });
+ $('#navbar button.zoom-extent').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom-extent"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ map.zoomToExtent(map.initialExtent);
+ });
+ $('#navbar button.zoom-in').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom-in"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ if (map.getZoom() == map.baseLayer.numZoomLevels-1)
+ $('#zoom-in-max-msg').show('slow', function() {
+ window.setTimeout(function(){$('#zoom-in-max-msg').hide('slow')},1000)
+ });
+ else
+ map.zoomIn();
+ });
+ $('#navbar button.zoom-out').button({
+ text:false,
+ icons:{primary: "ui-icon-zoom-out"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ map.zoomOut();
+ });
+ if ( ('zoomHistory' in config.options)
+ && config.options['zoomHistory'] == "True") {
+ var hCtrl = new OpenLayers.Control.NavigationHistory();
+ map.addControls([hCtrl]);
+ $('#navbar div.history button.previous').button({
+ text:false,
+ icons:{primary: "ui-icon-previous"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var ctrl = map.getControlsByClass('OpenLayers.Control.NavigationHistory')[0];
+ if (ctrl && ctrl.previousStack.length != 0)
+ ctrl.previousTrigger();
+ if (ctrl && ctrl.previous.active)
+ $(this).addClass('ui-state-usable');
+ else
+ $(this).removeClass('ui-state-usable');
+ if (ctrl && ctrl.next.active)
+ $('#navbar div.history button.next').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.next').removeClass('ui-state-usable');
+ });
+ $('#navbar div.history button.next').button({
+ text:false,
+ icons:{primary: "ui-icon-next"}
+ }).removeClass("ui-corner-all")
+ .click(function(){
+ var ctrl = map.getControlsByClass('OpenLayers.Control.NavigationHistory')[0];
+ if (ctrl && ctrl.nextStack.length != 0)
+ ctrl.nextTrigger();
+ if (ctrl && ctrl.next.active)
+ $(this).addClass('ui-state-usable');
+ else
+ $(this).removeClass('ui-state-usable');
+ if (ctrl && ctrl.previous.active)
+ $('#navbar div.history button.previous').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.previous').removeClass('ui-state-usable');
+ });
+ map.events.on({
+ moveend : function() {
+ var ctrl = map.getControlsByClass('OpenLayers.Control.NavigationHistory')[0];
+ if (ctrl && ctrl.previousStack.length > 1)
+ $('#navbar div.history button.previous').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.previous').removeClass('ui-state-usable');
+ if (ctrl && ctrl.nextStack.length > 0)
+ $('#navbar div.history button.next').addClass('ui-state-usable');
+ else
+ $('#navbar div.history button.next').removeClass('ui-state-usable');
+ }
+ });
+ } else {
+ $('#navbar > .history').remove();
+ }
+ }
+
+ /**
+ * PRIVATE function: createToolbar
+ * create the tool bar (collapse overview and switcher, etc)
+ */
+ function createToolbar() {
+ var configOptions = config.options;
+
+ var info = addFeatureInfo();
+ controls['featureInfo'] = info;
+
+ if ( ('print' in configOptions)
+ && configOptions['print'] == 'True')
+ addPrintControl();
+ else
+ $('#togglePrint').parent().remove();
+
+ if ( ('geolocation' in configOptions)
+ && configOptions['geolocation'] == 'True')
+ addGeolocationControl();
+ else
+ $('#toggleGeolocate').parent().remove();
+
+
+ addEditionControls();
+
+ if ( ('measure' in configOptions)
+ && configOptions['measure'] == 'True')
+ addMeasureControls();
+ else {
+ $('#measure').parent().remove();
+ $('#measure-length-menu').remove();
+ $('#measure-area-menu').remove();
+ $('#measure-perimeter-menu').remove();
+ }
+
+ if ( ('externalSearch' in configOptions)
+ && configOptions['externalSearch'] == 'nominatim')
+ addNominatimSearch();
+ else
+ $('#nominatim-search').remove();
+
+ //addComplexPrintControl();
+ }
+
+ function deactivateToolControls( evt ) {
+ for (var id in controls) {
+ var ctrl = controls[id];
+ if (evt && ('object' in evt) && ctrl == evt.object)
+ continue;
+ if (ctrl.type == OpenLayers.Control.TYPE_TOOL)
+ ctrl.deactivate();
+ }
+ return true;
+ }
+
+ function addFeatureInfo() {
+ var info = new OpenLayers.Control.WMSGetFeatureInfo({
+ url: OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ ),
+ title: 'Identify features by clicking',
+ type:OpenLayers.Control.TYPE_TOGGLE,
+ queryVisible: true,
+ infoFormat: 'text/html',
+ eventListeners: {
+ getfeatureinfo: function(event) {
+ var text = event.text;
+ if (text != ''){
+ if (map.popups.length != 0)
+ map.removePopup(map.popups[0]);
+
+ var popup = new OpenLayers.Popup.LizmapAnchored(
+ "liz_layer_popup",
+ map.getLonLatFromPixel(event.xy),
+ null,
+ text,
+ null,
+ true,
+ function() {
+ map.removePopup(this);
+ if(mCheckMobile()){
+ $('#navbar').show();
+ $('#overview-box').show();
+ }
+ return false;
+ }
+ );
+ popup.panMapIfOutOfView = true;
+ map.addPopup(popup);
+ popup.verifySize();
+ // Hide navbar and overview in mobile mode
+ if(mCheckMobile()){
+ $('#navbar').hide();
+ $('#overview-box').hide();
+ }
+ }
+ }
+ }
+ });
+ if (lizUrls.publicUrlList && lizUrls.publicUrlList.length != 0 ) {
+ var layerUrls = [];
+ for (var j=0, jlen=lizUrls.publicUrlList.length; j<jlen; j++) {
+ layerUrls.push(
+ OpenLayers.Util.urlAppend(
+ lizUrls.publicUrlList[j],
+ OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ );
+ }
+ info.layerUrls = layerUrls;
+ }
+ info.findLayers = function() {
+ var candidates = this.layers || this.map.layers;
+ var layers = [];
+ var layer, url;
+ for(var i=0, len=candidates.length; i<len; ++i) {
+ layer = candidates[i];
+ if(layer instanceof OpenLayers.Layer.WMS &&
+ (!this.queryVisible || (layer.getVisibility() && layer.calculateInRange()))) {
+ var configLayer = config.layers[layer.params['LAYERS']];
+ if( configLayer && configLayer.popup && configLayer.popup == 'True'){
+ url = OpenLayers.Util.isArray(layer.url) ? layer.url[0] : layer.url;
+ // if the control was not configured with a url, set it
+ // to the first layer url
+ if(this.drillDown === false && !this.url) {
+ this.url = url;
+ }
+ if(this.drillDown === true || this.urlMatches(url)) {
+ layers.push(layer);
+ }
+
+ }
+ }
+ }
+ return layers;
+ };
+ map.addControl(info);
+ info.activate();
+ return info;
+ }
+
+ function getPrintScale( scale ) {
+ if (scale >= 9500 && scale <= 950000) {
+ scale = Math.round(scale / 1000) * 1000;
+ } else if (scale >= 950000) {
+ scale = Math.round(scale / 1000000) * 1000000;
+ } else {
+ scale = Math.round(scale);
+ }
+ return scale;
+ }
+
+ function addPrintControl() {
+ // if no composers removed print
+ if (composers.length == 0 ) {
+ $('#togglePrint').parent().remove();
+ return false;
+ }
+ var ptTomm = 0.35277; //conversion pt to mm
+ var printCapabilities = {scales:[],layouts:[]};
+
+ var scales = map.scales;
+ if ( scales == null && map.resolutions != null ) {
+ scales = [];
+ for( var i=0, len=map.resolutions.length; i<len; i++ ){
+ var units = map.getUnits();
+ var res = map.resolutions[i];
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scales.push(scale);
+ }
+ }
+ if ( scales == null ) {
+ $('#togglePrint').parent().remove();
+ return false;
+ }
+
+ var scaleOptions = '';
+ for( var i=0, len=scales.length; i<len; i++ ){
+ var scale = getPrintScale( scales[i] );
+ printCapabilities.scales.push(scale);
+ var scaleText = scale;
+ if (scale >= 9500 && scale <= 950000) {
+ scaleText = Math.round(scale / 1000) + " 000";
+ } else if (scale >= 950000) {
+ scaleText = Math.round(scale / 1000000) + " 000 000";
+ } else {
+ scaleText = Math.round(scale)+'';
+ scaleText = scaleText[0]+' '+scaleText.slice(1);
+ }
+ scaleOptions += '<option value="'+scale+'">'+scaleText+'</option>';
+ }
+ $('#print-menu select.btn-print-scales').html(scaleOptions);
+
+ // creating printCapabilities layouts
+ for( var i=0, len= composers.length; i<len; i++ ){
+ var composer = composers[i];
+ var composerMap = composer.getElementsByTagName('ComposerMap');
+ if (composerMap.length != 0) {
+ composerMap = composerMap[0];
+ var mapWidth = Number(composerMap.getAttribute('width')) / ptTomm;
+ var mapHeight = Number(composerMap.getAttribute('height')) / ptTomm;
+ //for some strange reason we need to provide a "map" and a "size" object with identical content
+ printCapabilities.layouts.push({
+ "name": composer.getAttribute('name'),
+ "map": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "size": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "rotation": false,
+ "composer": composer
+ });
+ }
+ }
+
+ // if no printCapabilities layouts removed print
+ if( printCapabilities.layouts.length == 0 ) {
+ $('#togglePrint').parent().remove();
+ return false;
+ }
+
+ // creating the print layer
+ var layer = map.getLayersByName('Print');
+ if ( layer.length == 0 ) {
+ layer = new OpenLayers.Layer.Vector('Print',{
+ styleMap: new OpenLayers.StyleMap({
+ "default": new OpenLayers.Style({
+ fillColor: "#D43B19",
+ fillOpacity: 0.2,
+ strokeColor: "#CE1F2D",
+ strokeWidth: 1,
+ })
+ })
+ });
+ map.addLayer(layer);
+ layer.setVisibility(false);
+ } else
+ layer = layer[0];
+ if ( layer.features.length == 0 )
+ layer.addFeatures([
+ new OpenLayers.Feature.Vector(
+ new OpenLayers.Geometry.Polygon([
+ new OpenLayers.Geometry.LinearRing([
+ new OpenLayers.Geometry.Point(-1, -1),
+ new OpenLayers.Geometry.Point(1, -1),
+ new OpenLayers.Geometry.Point(1, 1),
+ new OpenLayers.Geometry.Point(-1, 1)
+ ])
+ ])
+ )
+ ]);
+
+ // creating print menu
+ for( var i=0, len= printCapabilities.layouts.length; i<len; i++ ){
+ var layout = printCapabilities.layouts[i];
+ $('#togglePrint ~ .dropdown-menu').append('<li><a href="#'+i+'">'+layout.name+'</a></li>');
+ }
+
+ var dragCtrl = new OpenLayers.Control.DragFeature(layer,{
+ geometryTypes: ['OpenLayers.Geometry.Polygon'],
+ type:OpenLayers.Control.TYPE_TOOL,
+ layout: null,
+ eventListeners: {
+ "activate": function(evt) {
+ if (this.layout == null)
+ return false;
+
+ deactivateToolControls(evt);
+
+ var layout = this.layout;
+ var units = map.getUnits();
+ // get scale and update the select
+ var res = map.getResolution()/2;
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ var scaleIdx = printCapabilities.scales.indexOf( scale );
+ if ( scaleIdx == -1 ) {
+ res = map.getResolution();
+ scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ }
+ $('#print-menu select.btn-print-scales').val(scale);
+
+ var center = map.getCenter();
+ var size = layout.size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+
+ $('#togglePrint').parent().addClass('active');
+ $('#print-menu .title .text').html(layout.name);
+ $('#print-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['print.activate'],'info',true).addClass('print');
+ layer.setVisibility(true);
+ evt.object.clickFeature(feat);
+ },
+ "deactivate": function(evt) {
+ layer.setVisibility(false);
+ $('#togglePrint').parent().removeClass('active');
+ $('#print-menu').hide();
+ updateSwitcherSize();
+ $('#message .print').remove();
+ this.layout = null;
+ }
+ }
+ });
+ map.addControls([dragCtrl]);
+ controls['printDrag'] = dragCtrl;
+
+ // set event listener to togglePrint
+ $('#togglePrint ~ .dropdown-menu').find('a').click(function() {
+ var self = $(this);
+ var layout = printCapabilities.layouts[parseInt( self.attr('href').slice(1) )];
+ //$('#togglePrint').click(function() {
+ if (dragCtrl.active && dragCtrl.layout == layout) {
+ dragCtrl.deactivate();
+ } else if (dragCtrl.active) {
+ dragCtrl.deactivate();
+ dragCtrl.layout = layout;
+ dragCtrl.activate();
+ } else {
+ dragCtrl.layout = layout;
+ dragCtrl.activate();
+ }
+ if ( $('#togglePrint ~ .dropdown-menu').is(':visible') )
+ $('#togglePrint').dropdown('toggle');
+ return false;
+ });
+
+ $('#print-menu button.btn-print-clear').click(function() {
+ dragCtrl.deactivate();
+ return false;
+ });
+ $('#print-menu select.btn-print-scales').change(function() {
+ if ( dragCtrl.active && layer.getVisibility() ) {
+ var self = $(this);
+ var units = map.getUnits();
+ var scale = parseFloat(self.val());
+ var center = map.getCenter();
+ var size = printCapabilities.layouts[0].size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ layer.drawFeature(feat);
+ }
+ });
+ $('#print-menu button.btn-print-launch').click(function() {
+ var composer = dragCtrl.layout.composer;
+ var composerMap = composer.getElementsByTagName('ComposerMap');
+ if (composerMap.length != 0) {
+ composerMap = composerMap[0].getAttribute('name');
+ var extent = dragCtrl.layer.features[0].geometry.getBounds();
+ var url = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ url += '&SERVICE=WMS';
+ //url += '&VERSION='+capabilities.version+'&REQUEST=GetPrint';
+ url += '&VERSION=1.3&REQUEST=GetPrint';
+ url += '&FORMAT=pdf&EXCEPTIONS=application/vnd.ogc.se_inimage&TRANSPARENT=true';
+ url += '&SRS='+map.projection;
+ url += '&DPI=300';
+ url += '&TEMPLATE='+composer.getAttribute('name');
+ url += '&'+composerMap+':extent='+extent;
+ url += '&'+composerMap+':rotation=0';
+ url += '&'+composerMap+':scale='+$('#print-menu select.btn-print-scales').val();
+ var printLayers = [];
+ $.each(map.layers, function(i, l) {
+ if (l.getVisibility() && l.CLASS_NAME == "OpenLayers.Layer.WMS")
+ printLayers.push(l.params['LAYERS']);
+ });
+ url += '&LAYERS='+printLayers.join(',');
+ window.open(url);
+ }
+ return false;
+ });
+ map.events.on({
+ "zoomend": function() {
+ if ( dragCtrl.active && layer.getVisibility() ) {
+ var units = map.getUnits();
+ var res = map.getResolution()/2;
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ var scaleIdx = printCapabilities.scales.indexOf( scale );
+ if ( scaleIdx == -1 ) {
+ res = map.getResolution();
+ scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ scale = getPrintScale( scale );
+ }
+ $('#print-menu select.btn-print-scales').val(scale);
+ var center = map.getCenter();
+ var size = printCapabilities.layouts[0].size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ layer.drawFeature(feat);
+ }
+ }
+ });
+ }
+
+ function addComplexPrintControl() {
+ var ptTomm = 0.35277; //conversion pt to mm
+ var printCapabilities = {scales:[],layouts:[]};
+ for (var i=0, len=composers.length; i<len; i++) {
+ var composer = composers[i];
+ var composerMap = composer.getElementsByTagName('ComposerMap');
+ if (composerMap.length != 0) {
+ composerMap = composerMap[0];
+ var mapWidth = Number(composer.getElementsByTagName('ComposerMap')[0].getAttribute('width')) / ptTomm;
+ var mapHeight = Number(composer.getElementsByTagName('ComposerMap')[0].getAttribute('height')) / ptTomm;
+ //for some strange reason we need to provide a "map" and a "size" object with identical content
+ printCapabilities.layouts.push({
+ "name": composer.getAttribute('name'),
+ "map": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "size": {
+ "width": mapWidth,
+ "height": mapHeight
+ },
+ "rotation": true
+ });
+ }
+ }
+ var layer = map.getLayersByName('Print');
+ if ( layer.length == 0 ) {
+ layer = new OpenLayers.Layer.Vector('Print');
+ map.addLayer(layer);
+ layer.setVisibility(false);
+ } else
+ layer = layer[0];
+ if ( layer.features.length == 0 )
+ layer.addFeatures([
+ new OpenLayers.Feature.Vector(
+ new OpenLayers.Geometry.Polygon([
+ new OpenLayers.Geometry.LinearRing([
+ new OpenLayers.Geometry.Point(-1, -1),
+ new OpenLayers.Geometry.Point(1, -1),
+ new OpenLayers.Geometry.Point(1, 1),
+ new OpenLayers.Geometry.Point(-1, 1)
+ ])
+ ])
+ )
+ ]);
+ var transformCtrl = new OpenLayers.Control.TransformFeature(layer,{
+ preserveAspectRatio: true,
+ rotate: true,
+ geometryTypes: ['OpenLayers.Geometry.Polygon'],
+ eventListeners: {
+ "activate": function(e) {
+ var units = map.getUnits();
+ var res = map.getResolution()/2;
+ var scale = OpenLayers.Util.getScaleFromResolution(res, units);
+ var center = map.getCenter();
+ var size = printCapabilities.layouts[0].size;
+ var unitsRatio = OpenLayers.INCHES_PER_UNIT[units];
+ var w = size.width / 72 / unitsRatio * scale / 2;
+ var h = size.height / 72 / unitsRatio * scale / 2;
+ var bounds = new OpenLayers.Bounds(center.lon - w, center.lat - h,
+ center.lon + w, center.lat + h);
+ var geom = bounds.toGeometry();
+ var feat = layer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ layer.setVisibility(true);
+ //e.object.setFeature(feat);
+ },
+ "deactivate": function(e) {
+ //layer.destroyFeatures();
+ layer.setVisibility(false);
+ },
+ "beforesetfeature": function(e) {
+ },
+ "setfeature": function(e) {
+ },
+ "beforetransform": function(e) {
+ },
+ "transformcomplete": function(e) {
+ }
+ }
+ });
+ map.addControls([transformCtrl]);
+ controls['printTransform'] = transformCtrl;
+ //pour activer il suffit de faire un setFeature
+ //transformCtrl.setFeature(layer.features[0]);
+ return true;
+ }
+
+ function addEditionControls() {
+ // Edition layers
+ if ('editionLayers' in config) {
+ //initialize edition
+ $('#edition-modal').modal();
+ var service = OpenLayers.Util.urlAppend(lizUrls.edition
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if (al.capabilities.modifyGeometry == "False"
+ && al.capabilities.modifyAttribute == "False"
+ && al.capabilities.deleteFeature == "False"
+ && al.capabilities.createFeature == "False") {
+ delete config.editionLayers[alName];
+ continue;
+ }
+ if (alName in config.layers) {
+ var alConfig = config.layers[alName];
+ $('#edition ~ .dropdown-menu').append('<li><a href="#'+alName+'">'+alConfig.title+'</a></li>');
+ }
+ }
+
+ // initiatlize layer
+ // style the sketch fancy
+ var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 6
+ },
+ "Line": {
+ strokeWidth: 4
+ },
+ "Polygon": {
+ strokeWidth: 2
+ }
+ };
+ var style = new OpenLayers.Style();
+ style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+ ]);
+ var styleMap = new OpenLayers.StyleMap({"default": style});
+ var editLayer = new OpenLayers.Layer.Vector('editLayer',{styleMap:styleMap});
+ map.addLayer(editLayer);
+
+ // initialize controls
+ OpenLayers.Control.EditionClick =
+ OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'double': false,
+ 'pixelTolerance': 0,
+ 'stopSingle': true,
+ 'stopDouble': false
+ },
+ layerId: '',
+ clickTolerance: 5,
+ initialize: function(options) {
+ this.handlerOptions = OpenLayers.Util.extend(
+ {}, this.defaultHandlerOptions
+ );
+ OpenLayers.Control.prototype.initialize.apply(
+ this, arguments
+ );
+ this.handler = new OpenLayers.Handler.Click(
+ this, {
+ 'click': this.trigger
+ }, this.handlerOptions
+ );
+ },
+ pixelToBounds: function(pixel) {
+ var llPx = pixel.add(-this.clickTolerance/2, this.clickTolerance/2);
+ var urPx = pixel.add(this.clickTolerance/2, -this.clickTolerance/2);
+ var ll = this.map.getLonLatFromPixel(llPx);
+ var ur = this.map.getLonLatFromPixel(urPx);
+ return new OpenLayers.Bounds(ll.lon, ll.lat, ur.lon, ur.lat);
+ },
+ trigger: function(e) {
+ var bounds = this.pixelToBounds(e.xy);
+ var crs = this.map.getProjectionObject().toString();
+ if ( crs == 'EPSG:900913' )
+ crs = 'EPSG:3857';
+ $.get(service,{
+ layerId: this.layerId,
+ bbox: bounds.toBBOX(),
+ crs: crs
+ }, function(data){
+ $('#edition-modal').html(data);
+ $('#edition-modal form').submit(function() {
+ var self = $(this);
+ var srid = self.find('input[name="liz_srid"]').val();
+ if ( !('EPSG:'+srid in Proj4js.defs) )
+ Proj4js.defs['EPSG:'+srid] = self.find('input[name="liz_proj4"]').val();
+ var geom = self.find('input[name="liz_geometryColumn"]').val();
+ var wkt = self.find('input[name="'+geom+'"]').val();
+ var format = new OpenLayers.Format.WKT({
+ externalProjection: 'EPSG:'+srid,
+ internalProjection: editLayer.projection
+ });
+ var feat = format.read(wkt);
+ feat.fid = self.find('input[name="liz_featureId"]').val();
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val(srid);
+ form.find('input[name="liz_geometryColumn"]').val(geom);
+ form.find('input[name="liz_wkt"]').val(feat.geometry);
+ form.find('input[name="liz_featureId"]').val(feat.fid);
+ editLayer.addFeatures([feat]);
+ $('#edition-modal').modal('hide');
+ return false;
+ });
+ $('#edition-modal').modal('show');
+ });
+ return false;
+ }
+ });
+ var editCtrls = {
+ panel: new OpenLayers.Control({
+ type: OpenLayers.Control.TYPE_TOOL,
+ eventListeners: {
+ activate: function( evt ) {
+ deactivateToolControls( evt );
+ },
+ deactivate: function( evt ) {
+ for ( var c in editCtrls ) {
+ if ( editCtrls[c].active )
+ editCtrls[c].deactivate();
+ }
+ $('#edition-menu').hide();
+ }
+ }
+ }),
+ click: new OpenLayers.Control.EditionClick(),
+ point: new OpenLayers.Control.DrawFeature(editLayer,
+ OpenLayers.Handler.Point),
+ line: new OpenLayers.Control.DrawFeature(editLayer,
+ OpenLayers.Handler.Path),
+ polygon: new OpenLayers.Control.DrawFeature(editLayer,
+ OpenLayers.Handler.Polygon),
+ modify: new OpenLayers.Control.ModifyFeature(editLayer)
+ };
+ for ( var ctrl in editCtrls ) {
+ map.addControls([editCtrls[ctrl]]);
+ }
+ controls['edition'] = editCtrls.panel;
+
+ function manageEditionAdd(aData) {
+ $('#edition-modal').html(aData);
+ $('#edition-modal form').submit(function() {
+ var self = $(this);
+ $.post(self.attr('action'),
+ self.serialize(),
+ function(data) {
+ manageEditionAdd(data);
+ });
+ return false;
+ });
+ if ( $('#edition-modal form').length != 0 ) {
+ $('#edition-modal button[data-dismiss="modal"]').click(
+ function() {
+ editLayer.destroyFeatures();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ }
+ );
+ }
+ if ( $('#edition-modal form').length == 0 ) {
+ for ( var ctrl in editCtrls ) {
+ if ( ctrl !="panel" && editCtrls[ctrl].active)
+ editCtrls[ctrl].deactivate();
+ }
+ var layerId = editCtrls.click.layerId;
+ $.each(layers, function(i, l) {
+ if (config.layers[l.params['LAYERS']].id != layerId)
+ return true;
+ l.redraw(true);
+ return false;
+ });
+ editLayer.destroyFeatures();
+ editCtrls.modify.activate();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ }
+ }
+
+ function manageEditionGeom(aData) {
+ $('#edition-modal').html(aData);
+ $('#edition-modal form').submit(function() {
+ var self = $(this);
+ $.post(self.attr('action'),
+ self.serialize(),
+ function(data) {
+ manageEditionGeom(data);
+ });
+ return false;
+ });
+ if ( $('#edition-modal form').length != 0 ) {
+ $('#edition-modal button[data-dismiss="modal"]').click(
+ function() {
+ var format = new OpenLayers.Format.WKT();
+ var wkt = $('#edition-menu form input[name="liz_wkt"]').val();
+ var wktFeat = format.read(wkt);
+ var geom = wktFeat.geometry.clone();
+ var feat = editLayer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ editLayer.drawFeature(feat);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True")
+ editCtrls.modify.selectControl.select(feat);
+ }
+ );
+ }
+ if ( $('#edition-modal form').length == 0 ) {
+ var layerId = editCtrls.click.layerId;
+ $.each(layers, function(i, l) {
+ if (config.layers[l.params['LAYERS']].id != layerId)
+ return true;
+ l.redraw(true);
+ return false;
+ });
+ editLayer.drawFeature(editLayer.features[0]);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True")
+ editCtrls.modify.selectControl.select(editLayer.features[0]);
+ }
+ }
+
+ // edit layer events
+ editLayer.events.on({
+ featureadded: function(evt) {
+ if ( editCtrls.click.active ) {
+ editCtrls.click.deactivate();
+ $('#lizmap-edition-message').remove();
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True") {
+ editCtrls.modify.activate();
+ editCtrls.modify.selectControl.select(evt.feature);
+ mAddMessage(lizDict['edition.select.modify.activate'],'info',true).attr('id','lizmap-edition-message');
+ }
+ $('#edition-select-unselect').removeClass('disabled');
+ $('#edition-select-attr').removeClass('disabled');
+ $('#edition-select-delete').removeClass('disabled');
+ } else {
+ $.get(service.replace('getFeature','createFeature'),{
+ layerId: editCtrls.click.layerId,
+ }, function(data){
+ manageEditionAdd(data);
+ var form = $('#edition-modal form');
+ var srid = form.find('input[name="liz_srid"]').val();
+ if ( !('EPSG:'+srid in Proj4js.defs) )
+ Proj4js.defs['EPSG:'+srid] = form.find('input[name="liz_proj4"]').val();
+ var gColumn = form.find('input[name="liz_geometryColumn"]').val();
+ var geom = editLayer.features[0].geometry.clone();
+ geom.transform(editLayer.projection,'EPSG:'+srid);
+ $('#edition-modal form input[name="'+gColumn+'"]').val(geom);
+ $('#edition-modal').modal('show');
+ });
+ }
+ },
+ featureselected: function(evt) {
+ $('#edition-menu form input[name="liz_wkt"]').val(evt.feature.geometry);
+ },
+ featureunselected: function(evt) {
+ var wkt = $('#edition-menu form input[name="liz_wkt"]').val();
+ $.get(service.replace('getFeature','modifyFeature'),{
+ layerId: editCtrls.click.layerId,
+ featureId: evt.feature.fid
+ }, function(data){
+ manageEditionGeom(data);
+ var form = $('#edition-modal form');
+ var srid = form.find('input[name="liz_srid"]').val();
+ if ( !('EPSG:'+srid in Proj4js.defs) )
+ Proj4js.defs['EPSG:'+srid] = form.find('input[name="liz_proj4"]').val();
+ var gColumn = form.find('input[name="liz_geometryColumn"]').val();
+ var geom = evt.feature.geometry.clone();
+ geom.transform(editLayer.projection,'EPSG:'+srid);
+ $('#edition-modal form input[name="'+gColumn+'"]').val(geom);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyAttribute == "False") {
+ form.submit();
+ form.hide();
+ }
+ $('#edition-modal').modal('show');
+ });
+ },
+ sketchmodified: function(evt) {
+ if ( evt.vertex.parent == null )
+ return true;
+ var class_name = evt.vertex.parent.CLASS_NAME;
+ if ( $('#edition-draw-clear').hasClass('disabled') ) {
+ if ( class_name == 'OpenLayers.Geometry.LineString' ) {
+ if (evt.vertex.parent.components.length == 2 ) {
+ $('#edition-draw-clear').removeClass('disabled');
+ }
+ } else if ( class_name == 'OpenLayers.Geometry.LinearRing' ) {
+ if (evt.vertex.parent.components.length == 3 ) {
+ $('#edition-draw-clear').removeClass('disabled');
+ }
+ }
+ }
+ if ( $('#edition-draw-save').hasClass('disabled') ) {
+ if ( class_name == 'OpenLayers.Geometry.LineString' ) {
+ if (evt.vertex.parent.components.length > 2 ) {
+ $('#edition-draw-save').removeClass('disabled');
+ }
+ } else if ( class_name == 'OpenLayers.Geometry.LinearRing' ) {
+ if (evt.vertex.parent.components.length > 3 ) {
+ $('#edition-draw-save').removeClass('disabled');
+ }
+ }
+ }
+ },
+ vertexmodified: function(evt) {
+ if ( $('#edition-select-undo').hasClass('disabled') ) {
+ $('#edition-select-undo').removeClass('disabled');
+ }
+ }
+ });
+
+ $('#edition ~ .dropdown-menu').find('a').click(function() {
+ editCtrls.panel.activate();
+ var menu = $('#edition-menu');
+ var alName = $(this).attr('href').slice(1);
+ if (alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( editCtrls.click.layerId == al.layerId) {
+ $('#edition-stop').click();
+ } else {
+ // update toolbar based on capabilities
+ if (al.capabilities.deleteFeature == "False")
+ $('#edition-select-delete').hide()
+ else
+ $('#edition-select-delete').show()
+ if (al.capabilities.modifyAttribute == "False")
+ $('#edition-select-attr').hide()
+ else
+ $('#edition-select-attr').show()
+ if (al.capabilities.modifyGeometry == "False")
+ $('#edition-select-undo').hide()
+ else
+ $('#edition-select-undo').show()
+
+ if ( $('#edition-menu-draw').is(':visible') )
+ $('#edition-draw-cancel').click();
+ if ( $('#edition-menu-select').is(':visible') )
+ $('#edition-select-cancel').click();
+
+ if (alName in config.layers)
+ $('#edition-menu h3 span.title span.text').html(config.layers[alName].title);
+ else
+ $('#edition-menu h3 span.title span.text').html(lizDict['edition.title']);
+ editCtrls.click.layerId = al.layerId;
+ editCtrls.click.layerName = alName;
+ menu.show();
+ if (al.capabilities.createFeature == "False") {
+ $('#edition-draw').hide();
+ $('#edition-select-cancel').hide();
+ $('#edition-select').click();
+ } else {
+ $('#edition-draw').show();
+ $('#edition-select-cancel').show();
+ }
+ if (al.capabilities.modifyGeometry == "False"
+ && al.capabilities.modifyAttribute == "False"
+ && al.capabilities.deleteFeature == "False") {
+ $('#edition-select').hide();
+ $('#edition-draw-cancel').hide();
+ $('#edition-draw').click();
+ } else {
+ $('#edition-select').show();
+ $('#edition-draw-cancel').show();
+ }
+ }
+ }
+ updateSwitcherSize();
+ if ( $('#edition ~ .dropdown-menu').is(':visible') )
+ $('#edition').dropdown('toggle');
+ return false;
+ });
+
+ $('#edition-stop').click(function(){
+ $('#edition-menu h3 span.title span.text').html(lizDict['edition.title']);
+ editCtrls.click.layerId = '';
+ editCtrls.click.layerName = '';
+ editCtrls.panel.deactivate();
+ editLayer.destroyFeatures();
+ $('#edition-menu-draw').hide();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ $('#edition-menu-select').hide();
+ $('#edition-select-unselect').addClass('disabled');
+ $('#edition-select-attr').addClass('disabled');
+ $('#edition-select-undo').addClass('disabled');
+ $('#edition-select-delete').addClass('disabled');
+ $('#edition-menu-start').show();
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val('');
+ form.find('input[name="liz_geometryColumn"]').val('');
+ form.find('input[name="liz_wkt"]').val('');
+ form.find('input[name="liz_featureId"]').val('');
+ updateSwitcherSize();
+ return false;
+ });
+
+ $('#edition-select').click(function(){
+ if ( !$('#edition-menu-start').is(':visible') )
+ return false;
+
+ $('#edition-menu-start').hide();
+ $('#edition-menu-select').show();
+ editCtrls.click.activate();
+ $('#lizmap-edition-message').remove();
+ mAddMessage(lizDict['edition.select.activate'],'info',true).attr('id','lizmap-edition-message');
+ return false;
+ });
+ $('#edition-select-cancel').click(function(){
+ $('#lizmap-edition-message').remove();
+ editLayer.destroyFeatures();
+ editCtrls.click.deactivate();
+ editCtrls.modify.deactivate();
+ $('#edition-select-unselect').addClass('disabled');
+ $('#edition-select-attr').addClass('disabled');
+ $('#edition-select-undo').addClass('disabled');
+ $('#edition-select-delete').addClass('disabled');
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val('');
+ form.find('input[name="liz_geometryColumn"]').val('');
+ form.find('input[name="liz_wkt"]').val('');
+ form.find('input[name="liz_featureId"]').val('');
+ $('#edition-menu-select').hide();
+ $('#edition-menu-start').show();
+ updateSwitcherSize();
+ return false;
+ });
+ $('#edition-select-unselect').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ editLayer.destroyFeatures();
+ editCtrls.modify.deactivate();
+ editCtrls.click.activate();
+ $('#edition-select-unselect').addClass('disabled');
+ $('#edition-select-attr').addClass('disabled');
+ $('#edition-select-undo').addClass('disabled');
+ $('#edition-select-delete').addClass('disabled');
+ var form = $('#edition-menu form');
+ form.find('input[name="liz_srid"]').val('');
+ form.find('input[name="liz_geometryColumn"]').val('');
+ form.find('input[name="liz_wkt"]').val('');
+ form.find('input[name="liz_featureId"]').val('');
+ return false;
+ });
+ $('#edition-select-undo').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var format = new OpenLayers.Format.WKT();
+ var wkt = $('#edition-menu form input[name="liz_wkt"]').val();
+ var wktFeat = format.read(wkt);
+ var geom = wktFeat.geometry.clone();
+ var feat = editLayer.features[0];
+ geom.id = feat.geometry.id;
+ feat.geometry = geom;
+ editLayer.drawFeature(feat);
+ if (config.editionLayers[editCtrls.click.layerName].capabilities.modifyGeometry == "True")
+ editCtrls.modify.selectControl.select(feat);
+ return false;
+ });
+ $('#edition-select-attr').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ editCtrls.modify.selectControl.unselect(editLayer.features[0]);
+ return false;
+ });
+ $('#edition-select-delete').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var featureId = $('#edition-menu form input[name="liz_featureId"]').val();
+ if ( featureId == '' )
+ return false;
+ if ( !confirm( "Are you sure you want to delete the selected feature?" ) )
+ return false;
+ $.get(service.replace('getFeature','deleteFeature'),{
+ layerId: editCtrls.click.layerId,
+ featureId: featureId
+ }, function(data){
+ $('#edition-modal').html(data);
+ $('#edition-modal').modal('show');
+ editLayer.destroyFeatures();
+ $('#edition-select-unselect').click();
+ var layerId = editCtrls.click.layerId;
+ $.each(layers, function(i, l) {
+ if (config.layers[l.params['LAYERS']].id != layerId)
+ return true;
+ l.redraw(true);
+ return false;
+ });
+ });
+ return false;
+ });
+
+ $('#edition-draw').click(function(){
+ if ( !$('#edition-menu-start').is(':visible') )
+ return false;
+
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType == '' )
+ return false;
+
+ var ctrl = editCtrls[geomType];
+ if ( ctrl.active ) {
+ return false;
+ } else {
+ ctrl.activate();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ $('#edition-menu-start').hide();
+ $('#edition-menu-draw').show();
+ updateSwitcherSize();
+ $('#lizmap-edition-message').remove();
+ mAddMessage(lizDict['edition.draw.activate'],'info',true).attr('id','lizmap-edition-message');
+ }
+ return false;
+ });
+ $('#edition-draw-cancel').click(function(){
+ $('#lizmap-edition-message').remove();
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType != '' ) {
+ var ctrl = editCtrls[geomType];
+ ctrl.deactivate();
+ }
+ editLayer.destroyFeatures();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ $('#edition-menu-draw').hide();
+ $('#edition-menu-start').show();
+ updateSwitcherSize();
+ return false;
+ });
+ $('#edition-draw-save').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType != '' ) {
+ var ctrl = editCtrls[geomType];
+ ctrl.finishSketch();
+ }
+ return false;
+ });
+ $('#edition-draw-clear').click(function(){
+ if ( $(this).hasClass('disabled') )
+ return false;
+
+ var layerId = editCtrls.click.layerId;
+ var geomType = '';
+ for (var alName in config.editionLayers) {
+ var al = config.editionLayers[alName];
+ if ( alName in config.layers && al.layerId == layerId)
+ geomType = al.geometryType;
+ }
+ if ( geomType != '' ) {
+ var ctrl = editCtrls[geomType];
+ ctrl.cancel();
+ $('#edition-draw-clear').addClass('disabled');
+ $('#edition-draw-save').addClass('disabled');
+ }
+ return false;
+ });
+
+ $('#edition-menu a[rel="tooltip"]').tooltip();
+
+ } else {
+ $('#edition').parent().remove();
+ $('#edition-menu').remove();
+ $('#edition-modal').remove();
+ }
+ }
+
+ function addMeasureControls() {
+ // style the sketch fancy
+ var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 4,
+ graphicName: "square",
+ fillColor: "white",
+ fillOpacity: 1,
+ strokeWidth: 1,
+ strokeOpacity: 1,
+ strokeColor: "#333333"
+ },
+ "Line": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ strokeColor: "#666666",
+ strokeDashstyle: "dash"
+ },
+ "Polygon": {
+ strokeWidth: 2,
+ strokeOpacity: 1,
+ strokeColor: "#666666",
+ strokeDashstyle: "dash",
+ fillColor: "white",
+ fillOpacity: 0.3
+ }
+ };
+ var style = new OpenLayers.Style();
+ style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+ ]);
+ var styleMap = new OpenLayers.StyleMap({"default": style});
+
+ var measureControls = {
+ length: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Path, {
+ persist: true,
+ geodesic: true,
+ immediate: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ },
+ type:OpenLayers.Control.TYPE_TOOL
+ }
+ ),
+ area: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Polygon, {
+ persist: true,
+ geodesic: true,
+ immediate: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ },
+ type:OpenLayers.Control.TYPE_TOOL
+ }
+ ),
+ perimeter: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Polygon, {
+ persist: true,
+ geodesic: true,
+ immediate: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ },
+ type:OpenLayers.Control.TYPE_TOOL
+ }
+ )
+ };
+ measureControls.length.events.on({
+ activate: function(evt) {
+ deactivateToolControls(evt);
+ $('#measure').parent().addClass('active');
+ $('#measure-length-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['measure.activate.length'],'info',true).attr('id','lizmap-measure-message');
+ },
+ deactivate: function(evt) {
+ $('#measure').parent().removeClass('active');
+ $('#measure-length-menu').hide();
+ updateSwitcherSize();
+ $('#lizmap-measure-message').remove();
+ }
+ });
+ measureControls.area.events.on({
+ activate: function(evt) {
+ deactivateToolControls(evt);
+ $('#measure').parent().addClass('active');
+ $('#measure-area-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['measure.activate.area'],'info',true).attr('id','lizmap-measure-message');
+ },
+ deactivate: function(evt) {
+ $('#measure').parent().removeClass('active');
+ $('#measure-area-menu').hide();
+ updateSwitcherSize();
+ $('#lizmap-measure-message').remove();
+ }
+ });
+ measureControls.perimeter.measure = function(geometry, eventType) {
+ var stat, order;
+ if(geometry.CLASS_NAME.indexOf('LineString') > -1) {
+ stat = this.getBestLength(geometry);
+ order = 1;
+ } else {
+ stat = this.getBestLength(geometry.components[0]);
+ order = 1;
+ }
+ this.events.triggerEvent(eventType, {
+ measure: stat[0],
+ units: stat[1],
+ order: order,
+ geometry: geometry
+ });
+ };
+ measureControls.perimeter.events.on({
+ activate: function(evt) {
+ deactivateToolControls(evt);
+ $('#measure').parent().addClass('active');
+ $('#measure-perimeter-menu').show();
+ updateSwitcherSize();
+ mAddMessage(lizDict['measure.activate.perimeter'],'info',true).attr('id','lizmap-measure-message');
+ },
+ deactivate: function(evt) {
+ $('#measure').parent().removeClass('active');
+ $('#measure-perimeter-menu').hide();
+ updateSwitcherSize();
+ $('#lizmap-measure-message').remove();
+ }
+ });
+
+ function handleMeasurements(evt) {
+ var geometry = evt.geometry;
+ var units = evt.units;
+ var order = evt.order;
+ var measure = evt.measure;
+ var out = "";
+ if(order == 1) {
+ out += lizDict['measure.handle']+" " + measure.toFixed(3) + " " + units;
+ } else {
+ out += lizDict['measure.handle']+" " + measure.toFixed(3) + " " + units + "<sup>2</" + "sup>";
+ }
+ var element = $('#lizmap-measure-message');
+ if ( element.length == 0 ) {
+ element = mAddMessage(out);
+ element.attr('id','lizmap-measure-message');
+ } else {
+ element.html('<p>'+out+'</p>');
+ }
+ }
+ for(var key in measureControls) {
+ var control = measureControls[key];
+ control.events.on({
+ "measure": handleMeasurements,
+ "measurepartial": handleMeasurements,
+ "activate": function(evt) {
+ deactivateToolControls(evt);
+ }
+ });
+ map.addControl(control);
+ controls[key+'Measure'] = control;
+ // click in the navbar
+ $('#measure-'+key).click(function() {
+ var keyId = $(this).attr('id').replace('measure-','');
+ if ( measureControls[keyId].active )
+ measureControls[keyId].deactivate();
+ else
+ measureControls[keyId].activate();
+ $('#measure').dropdown('toggle');
+ return false;
+ });
+ // click to stop
+ $('#measure-'+key+'-stop').click(function() {
+ var keyId = $(this).attr('id').replace('measure-','');
+ keyId = keyId.replace('-stop','');
+ measureControls[keyId].deactivate();
+ });
+ }
+ return measureControls;
+ }
+
+ function addGeolocationControl() {
+ var style = {
+ fillColor: '#0395D6',
+ fillOpacity: 0.1,
+ strokeColor: '#0395D6',
+ strokeWidth: 1
+ };
+ var vector = new OpenLayers.Layer.Vector('geolocation');
+ map.addLayer(vector);
+ var geolocate = new OpenLayers.Control.Geolocate({
+ type: OpenLayers.Control.TYPE_TOGGLE,
+ bind: false,
+ watch: true,
+ geolocationOptions: {
+ enableHighAccuracy: true,
+ maximumAge: 5000,
+ timeout: 30000
+ }
+ });
+ map.addControl(geolocate);
+ var firstGeolocation = true;
+ geolocate.events.on({
+ "locationupdated": function(evt) {
+ vector.destroyFeatures();
+ var circle = new OpenLayers.Feature.Vector(
+ OpenLayers.Geometry.Polygon.createRegularPolygon(
+ evt.point.clone(),
+ evt.position.coords.accuracy/2,
+ 40,
+ 0
+ ),
+ {},
+ style
+ );
+ vector.addFeatures([
+ new OpenLayers.Feature.Vector(
+ evt.point,
+ {},
+ {
+ graphicName: 'circle',
+ strokeColor: '#0395D6',
+ strokeWidth: 1,
+ fillOpacity: 1,
+ fillColor: '#0395D6',
+ pointRadius: 3
+ }
+ ),
+ circle
+ ]);
+ if (firstGeolocation) {
+ map.zoomToExtent(vector.getDataExtent());
+ //pulsate(circle);
+ firstGeolocation = false;
+ if ( $('#geolocate-menu-bind').hasClass('active') )
+ this.bind = true;
+ }
+ },
+ "locationfailed": function(evt) {
+ if ( vector.features.length == 0 )
+ mAddMessage(lizDict['geolocation.failed'],'error',true);
+ },
+ "activate": function(evt) {
+ $('#toggleGeolocate').parent().addClass('active');
+ $('#geolocate-menu').show();
+ updateSwitcherSize();
+ },
+ "deactivate": function(evt) {
+ vector.destroyFeatures();
+ $('#toggleGeolocate').parent().removeClass('active');
+ $('#geolocate-menu').hide();
+ updateSwitcherSize();
+ $('#geolocate-menu-bind').removeClass('btn-info active').addClass('btn-success');
+ geolocate.bind = false;
+ }
+ });
+ controls['geolocation'] = geolocate;
+ $('#toggleGeolocate').click(function() {
+ if (geolocate.active)
+ geolocate.deactivate();
+ else
+ geolocate.activate();
+ return false;
+ });
+ $('#geolocate-menu-center').click(function(){
+ if (vector.features.length != 0 )
+ map.setCenter(vector.getDataExtent().getCenterLonLat());
+ });
+ $('#geolocate-menu-bind').click(function(){
+ var self = $(this);
+ if ( self.hasClass('active') ) {
+ self.removeClass('btn-info active').addClass('btn-success');
+ geolocate.bind = false;
+ } else {
+ self.removeClass('btn-success').addClass('btn-info active');
+ geolocate.bind = true;
+ }
+ });
+ $('#geolocate-menu button.btn-geolocate-clear').click(function(){
+ geolocate.deactivate();
+ });
+ }
+
+
+ function addNominatimSearch() {
+ if ( !('nominatim' in lizUrls) ) {
+ $('#nominatim-search').remove();
+ return false;
+ }
+ var service = OpenLayers.Util.urlAppend(lizUrls.nominatim
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ // Search with nominatim
+ var wgs84 = new OpenLayers.Projection('EPSG:4326');
+ var extent = new OpenLayers.Bounds( map.maxExtent.toArray() );
+ extent.transform(map.getProjectionObject(), wgs84);
+ $('#nominatim-search').submit(function(){
+ $('#nominatim-search .dropdown-inner .items').html('');
+ $.get(service
+ ,{"query":$('#search-query').val(),"bbox":extent.toBBOX()}
+ ,function(data) {
+ var text = '';
+ $.each(data, function(i, e){
+ var bbox = [
+ e.boundingbox[2],
+ e.boundingbox[0],
+ e.boundingbox[3],
+ e.boundingbox[1]
+ ];
+ bbox = new OpenLayers.Bounds(bbox);
+ if ( extent.intersectsBounds(bbox) )
+ text += '<li><a href="#'+bbox.toBBOX()+'">'+e.display_name+'</a></li>';
+ });
+ if (text != '') {
+ $('#nominatim-search .dropdown-inner .items').html(text);
+ $('#nominatim-search').addClass('open');
+ $('#nominatim-search .dropdown-inner .items li > a').click(function() {
+ var bbox = $(this).attr('href').replace('#','');
+ var extent = OpenLayers.Bounds.fromString(bbox);
+ extent.transform(wgs84, map.getProjectionObject());
+ map.zoomToExtent(extent);
+ $('#nominatim-search').removeClass('open');
+ return false;
+ });
+ } else {
+ mAddMessage('Nothing Found','info',true);
+ }
+ }, 'json');
+ return false;
+ });
+ }
+
+ /**
+ * PRIVATE function: parseData
+ * parsing capability
+ *
+ * Parameters:
+ * aData - {String} the WMS capabilities
+ *
+ * Returns:
+ * {Boolean} the capability is OK
+ */
+ function parseData(aData) {
+ var format = new OpenLayers.Format.WMSCapabilities({version:'1.3.0'});
+ var html = "";
+ capabilities = format.read(aData);
+
+ var format = new OpenLayers.Format.XML();
+ composers = format.read(aData).getElementsByTagName('ComposerTemplate');
+
+ var capability = capabilities.capability;
+ if (!capability) {
+ $('#map').html('SERVICE NON DISPONIBLE!');
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * PRIVATE function: mCheckMobile
+ * Check wether in mobile context.
+ *
+ *
+ * Returns:
+ * {Boolean} True if in mobile context.
+ */
+ function mCheckMobile() {
+ var minMapSize = 450;
+ var w = $('body').parent()[0].offsetWidth;
+ /*
+ if($.browser.msie)
+ w = $('body').width();
+ */
+ var leftW = w - minMapSize;
+ if(leftW < minMapSize || w < minMapSize)
+ return true;
+ return false;
+ }
+
+ /**
+ * PRIVATE function: mAddMessage
+ * Write message to the UI
+ *
+ *
+ * Returns:
+ * {jQuery Object} The message added.
+ */
+ function mAddMessage( aMessage, aType, aClose ) {
+ var mType = 'info';
+ var mTypeList = ['info', 'error', 'success'];
+ var mClose = false;
+
+ if ( $.inArray(aType, mTypeList) != -1 )
+ mType = aType;
+
+ if ( aClose )
+ mClose = true;
+
+ var html = '<div class="alert alert-block alert-'+mType+' fade in" data-alert="alert">';
+ if ( mClose )
+ html += '<a class="close" data-dismiss="alert" href="#">×</a>';
+ html += '<p>'+aMessage+'</p>';
+ html += '</div>';
+
+ var elt = $(html);
+ $('#message').append(elt);
+ return elt;
+ }
+
+
+
+ // creating the lizMap object
+ var obj = {
+ /**
+ * Property: map
+ * {<OpenLayers.Map>} The map
+ */
+ map: null,
+ /**
+ * Property: layers
+ * {Array(<OpenLayers.Layer>)} The layers
+ */
+ layers: null,
+ /**
+ * Property: baselayers
+ * {Array(<OpenLayers.Layer>)} The base layers
+ */
+ baselayers: null,
+ /**
+ * Property: events
+ * {<OpenLayers.Events>} An events object that handles all
+ * events on the lizmap
+ */
+ events: null,
+ /**
+ * Property: config
+ * {Object} The map config
+ */
+ config: null,
+ /**
+ * Property: dictionnary
+ * {Object} The map dictionnary
+ */
+ dictionary: null,
+ /**
+ * Property: tree
+ * {Object} The map tree
+ */
+ tree: null,
+
+ /**
+ * Method: checkMobile
+ */
+ checkMobile: function() {
+ return mCheckMobile();
+ },
+
+ /**
+ * Method: cleanName
+ */
+ cleanName: function( aName ) {
+ return cleanName( aName );
+ },
+
+ /**
+ * Method: checkMobile
+ */
+ addMessage: function( aMessage, aType, aClose ) {
+ return mAddMessage( aMessage, aType, aClose );
+ },
+
+ /**
+ * Method: updateSwitcherSize
+ */
+ updateSwitcherSize: function() {
+ return updateSwitcherSize();
+ },
+ /**
+ * Method: init
+ */
+ init: function() {
+ var self = this;
+ //get config
+ $.getJSON(lizUrls.config,lizUrls.params,function(cfgData) {
+ config = cfgData;
+ config.options.hasOverview = false;
+
+ //get capabilities
+ var service = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ $.get(service
+ ,{SERVICE:'WMS',REQUEST:'GetCapabilities',VERSION:'1.3.0'}
+ ,function(data) {
+ //parse capabilities
+ if (!parseData(data))
+ return true;
+
+ //set title and abstract coming from capabilities
+// document.title = capabilities.title ? capabilities.title : capabilities.service.title;
+// $('#title').html('<h1>'+(capabilities.title ? capabilities.title : capabilities.service.title)+'</h1>');
+ //$('#abstract').html(capabilities.abstract ? capabilities.abstract : capabilities.service.abstract);
+ $('#abstract').html(capabilities.abstract ? capabilities.abstract : '');
+
+ // get and analyse tree
+ var capability = capabilities.capability;
+ var firstLayer = capability.nestedLayers[0];
+ getLayerTree(firstLayer,tree);
+ analyseNode(tree);
+ self.config = config;
+ self.tree = tree;
+ self.events.triggerEvent("treecreated", self);
+ if(self.checkMobile()){
+ $('#menu').hide();
+ $('#map-content').css('margin-left','0');
+ }
+
+ // create the map
+ createMap();
+ self.map = map;
+ self.layers = layers;
+ self.baselayers = baselayers;
+ self.controls = controls;
+ self.events.triggerEvent("mapcreated", self);
+
+ // create the switcher
+ createSwitcher();
+ self.events.triggerEvent("layersadded", self);
+
+ // initialize the map
+ $('#switcher').height(0);
+ // Set map extent depending on options
+ /*
+ if(lizPosition['lon']!=null){
+ map.setCenter(
+ new OpenLayers.LonLat(lizPosition['lon'], lizPosition['lat']),
+ lizPosition['zoom']
+ );
+ }else{
+ map.zoomToExtent(map.initialExtent);
+ }
+ */
+ var verifyingVisibility = true;
+ var hrefParam = OpenLayers.Util.getParameters(window.location.href);
+ if (!map.getCenter()) {
+ if (hrefParam.bbox) {
+ map.zoomToExtent(OpenLayers.Bounds.fromArray(hrefParam.bbox));
+ } else {
+ map.zoomToExtent(map.initialExtent);
+ }
+ verifyingVisibility = false;
+ }
+
+ updateContentSize();
+ map.events.triggerEvent("zoomend",{"zoomChanged": true});
+
+ // create overview if 'Overview' layer
+ createOverview();
+
+ // create navigation and toolbar
+ createNavbar();
+ createToolbar();
+
+ // verifying the layer visibility for permalink
+ if (verifyingVisibility) {
+ for (var i=0,len=layers.length; i<len; i++) {
+ var l = layers[i];
+ if ( (hrefParam.layers && l.getVisibility())
+ || (!hrefParam.layers && l.isVisible) )
+ {
+ $('#switcher button.checkbox[name="layer"][value="'+l.name+'"]').click();
+ }
+ }
+ }
+
+ // finalize slider
+ $('#navbar div.slider').slider("value",map.getZoom());
+ map.events.on({
+ zoomend : function() {
+ $('#switcher table.tree tr.legendGraphics.initialized').each(function() {
+ var self = $(this);
+ var name = self.attr('id').replace('legend-','');
+ var url = getLayerLegendGraphicUrl(name, true);
+ self.find('div.legendGraphics img').attr('src',url);
+ });
+ // update slider position
+ $('#navbar div.slider').slider("value",this.getZoom());
+ }
+ });
+
+ // Toggle legend
+ $('#toggleLegend').click(function(){
+ if ($('#menu').is(':visible')) {
+ $('.ui-icon-close-menu').click();
+ $('#metadata').hide();
+ }
+ else{
+ $('.ui-icon-open-menu').click();
+ $('#metadata').hide();
+ }
+ return false;
+ });
+
+ // Toggle locate
+ $('#toggleLocate').click(function(){
+ $('#locate-menu').toggle();
+ if ( $('#locate-menu').is(':visible') )
+ $('#toggleLocate').parent().addClass('active');
+ else
+ $('#toggleLocate').parent().removeClass('active');
+ $('#metadata').hide();
+ updateSwitcherSize();
+ return false;
+ });
+ if ( !('locateByLayer' in config) )
+ $('#toggleLocate').parent().hide();
+ else
+ $('#toggleLocate').parent().addClass('active');
+
+ // Toggle Metadata
+ $('#displayMetadata').click(function(){
+ $('#metadata').toggle();
+ if ( $('#metadata').is(':visible') )
+ $('#displayMetadata').parent().addClass('active');
+ else
+ $('#displayMetadata').parent().removeClass('active');
+ return false;
+ });
+ $('#hideMetadata').click(function(){
+ $('#metadata').hide();
+ $('#displayMetadata').parent().removeClass('active');
+ return false;
+ });
+
+ $('#headermenu .navbar-inner .nav a[rel="tooltip"]').tooltip();
+ self.events.triggerEvent("uicreated", self);
+
+ $('body').css('cursor', 'auto');
+ $('#loading').dialog('close');
+ }, "text");
+ });
+ }
+ };
+ // initializing the lizMap events
+ obj.events = new OpenLayers.Events(
+ obj, null,
+ ['treecreated','mapcreated','layersadded','uicreated'],
+ true,
+ {includeXY: true}
+ );
+ return obj;
+}();
+/*
+ * it's possible to add event listener
+ * before the document is ready
+ * but after this file
+ */
+lizMap.events.on({
+ 'treecreated':function(evt){
+ //console.log('treecreated');
+ if (
+ (('osmMapnik' in evt.config.options)
+ && evt.config.options.osmMapnik == 'True') ||
+ (('osmMapquest' in evt.config.options)
+ && evt.config.options.osmMapquest == 'True') ||
+ (('googleStreets' in evt.config.options)
+ && evt.config.options.googleStreets == 'True') ||
+ (('googleSatellite' in evt.config.options)
+ && evt.config.options.googleSatellite == 'True') ||
+ (('googleHybrid' in evt.config.options)
+ && evt.config.options.googleHybrid == 'True') ||
+ (('googleTerrain' in evt.config.options)
+ && evt.config.options.googleTerrain == 'True') ||
+ (('bingStreets' in evt.config.options)
+ && evt.config.options.bingStreets == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingSatellite' in evt.config.options)
+ && evt.config.options.bingSatellite == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingHybrid' in evt.config.options)
+ && evt.config.options.bingHybrid == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('ignTerrain' in evt.config.options)
+ && evt.config.options.ignTerrain == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignStreets' in evt.config.options)
+ && evt.config.options.ignStreets == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignSatellite' in evt.config.options)
+ && evt.config.options.ignSatellite == 'True'
+ && ('ignKey' in evt.config.options))
+ ) {
+ Proj4js.defs['EPSG:3857'] = Proj4js.defs['EPSG:900913'];
+ var proj = evt.config.options.projection;
+ if ( !(proj.ref in Proj4js.defs) )
+ Proj4js.defs[proj.ref]=proj.proj4;
+ var projection = new OpenLayers.Projection(proj.ref);
+ var projOSM = new OpenLayers.Projection('EPSG:3857');
+ proj.ref = 'EPSG:3857';
+ proj.proj4 = Proj4js.defs['EPSG:3857'];
+
+ // Transform the bbox
+ var bbox = evt.config.options.bbox;
+ var extent = new OpenLayers.Bounds(Number(bbox[0]),Number(bbox[1]),Number(bbox[2]),Number(bbox[3]));
+ extent = extent.transform(projection,projOSM);
+ bbox = extent.toArray();
+
+ var scales = [];
+ if ('mapScales' in evt.config.options)
+ scales = evt.config.options.mapScales;
+ if ( scales.length == 0 )
+ scales = [evt.config.options.maxScale,evt.config.options.minScale];
+
+ evt.config.options.projection = proj;
+ evt.config.options.bbox = bbox;
+ evt.config.options.zoomLevelNumber = 16;
+
+ // Transform the initial bbox
+ if ( 'initialExtent' in evt.config.options && evt.config.options.initialExtent.length == 4 ) {
+ var initBbox = evt.config.options.initialExtent;
+ var initialExtent = new OpenLayers.Bounds(Number(initBbox[0]),Number(initBbox[1]),Number(initBbox[2]),Number(initBbox[3]));
+ initialExtent = initialExtent.transform(projection,projOSM);
+ evt.config.options.initialExtent = initialExtent.toArray();
+ }
+
+ // Specify zoom level number
+ if ((('osmMapnik' in evt.config.options) && evt.config.options.osmMapnik == 'True') ||
+ (('osmMapquest' in evt.config.options) && evt.config.options.osmMapquest == 'True') ||
+ (('bingStreets' in evt.config.options) && evt.config.options.bingStreets == 'True' && ('bingKey' in evt.config.options)) ||
+ (('bingSatellite' in evt.config.options) && evt.config.options.bingSatellite == 'True' && ('bingKey' in evt.config.options)) ||
+ (('bingHybrid' in evt.config.options) && evt.config.options.bingHybrid == 'True' && ('bingKey' in evt.config.options)) ||
+ (('ignTerrain' in evt.config.options) && evt.config.options.ignTerrain == 'True' && ('ignKey' in evt.config.options)) ||
+ (('ignStreets' in evt.config.options) && evt.config.options.ignStreets == 'True') && ('ignKey' in evt.config.options))
+ evt.config.options.zoomLevelNumber = 19;
+ if ((('googleStreets' in evt.config.options) && evt.config.options.googleStreets == 'True') ||
+ (('googleHybrid' in evt.config.options) && evt.config.options.googleHybrid == 'True') ||
+ (('ignSatellite' in evt.config.options) && evt.config.options.ignSatellite == 'True') && ('ignKey' in evt.config.options))
+ evt.config.options.zoomLevelNumber = 20;
+ if ((('googleSatellite' in evt.config.options) && evt.config.options.googleSatellite == 'True'))
+ evt.config.options.zoomLevelNumber = 21;
+ evt.config.options.maxScale = 591659030.3224756;
+ evt.config.options.minScale = 2257.0000851534865;
+ //evt.config.options.mapScales = [];
+ var hasBaselayers = false;
+ for ( var l in evt.config.layers ) {
+ if ( evt.config.layers[l]["baseLayer"] == "True" )
+ hasBaselayers = true;
+ }
+ // for minRes evaluating to scale 100
+ // zoomLevelNumber is equal to 24
+ if (hasBaselayers) {
+ evt.config.options.zoomLevelNumber = 24;
+ }
+
+ var resolutions = [];
+ if (scales.length != 0 ) {
+ scales.sort(function(a, b) {
+ return Number(b) - Number(a);
+ });
+ var maxScale = scales[0];
+ var maxRes = OpenLayers.Util.getResolutionFromScale(maxScale, projOSM.proj.units);
+ var minScale = scales[scales.length-1];
+ var minRes = OpenLayers.Util.getResolutionFromScale(minScale, projOSM.proj.units);
+ var res = 156543.03390625;
+ var n = 1;
+ while ( res > minRes && n < evt.config.options.zoomLevelNumber) {
+ if ( res < maxRes ) {
+ if (resolutions.length == 0 && res != 156543.03390625)
+ resolutions.push(res*2);
+ resolutions.push(res);
+ }
+ res = res/2;
+ n++;
+ }
+ maxRes = resolutions[0];
+ minRes = res;
+ resolutions.push(res);
+ var maxScale = OpenLayers.Util.getScaleFromResolution(maxRes, projOSM.proj.units);
+ var minScale = OpenLayers.Util.getScaleFromResolution(minRes, projOSM.proj.units);
+ }
+ evt.config.options['resolutions'] = resolutions;
+
+ if (resolutions.length != 0 ) {
+ evt.config.options.zoomLevelNumber = resolutions.length;
+ evt.config.options.maxScale = maxScale;
+ evt.config.options.minScale = minScale;
+ }
+ }
+
+ }
+ ,'mapcreated':function(evt){
+ //console.log('mapcreated');
+ if (
+ (('osmMapnik' in evt.config.options)
+ && evt.config.options.osmMapnik == 'True') ||
+ (('osmMapquest' in evt.config.options)
+ && evt.config.options.osmMapquest == 'True') ||
+ (('googleStreets' in evt.config.options)
+ && evt.config.options.googleStreets == 'True') ||
+ (('googleSatellite' in evt.config.options)
+ && evt.config.options.googleSatellite == 'True') ||
+ (('googleHybrid' in evt.config.options)
+ && evt.config.options.googleHybrid == 'True') ||
+ (('googleTerrain' in evt.config.options)
+ && evt.config.options.googleTerrain == 'True') ||
+ (('bingStreets' in evt.config.options)
+ && evt.config.options.bingStreets == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingSatellite' in evt.config.options)
+ && evt.config.options.bingSatellite == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('bingHybrid' in evt.config.options)
+ && evt.config.options.bingHybrid == 'True'
+ && ('bingKey' in evt.config.options)) ||
+ (('ignTerrain' in evt.config.options)
+ && evt.config.options.ignTerrain == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignStreets' in evt.config.options)
+ && evt.config.options.ignStreets == 'True'
+ && ('ignKey' in evt.config.options)) ||
+ (('ignSatellite' in evt.config.options)
+ && evt.config.options.ignSatellite == 'True'
+ && ('ignKey' in evt.config.options))
+ ) {
+ //adding baselayers
+ var maxExtent = null;
+ if ( OpenLayers.Projection.defaults['EPSG:900913'].maxExtent )
+ maxExtent = new OpenLayers.Bounds(OpenLayers.Projection.defaults['EPSG:900913'].maxExtent);
+ else if ( OpenLayers.Projection.defaults['EPSG:3857'].maxExtent )
+ maxExtent = new OpenLayers.Bounds(OpenLayers.Projection.defaults['EPSG:3857'].maxExtent);
+
+ var lOptions = {zoomOffset:0,maxResolution:156543.03390625};
+ if (('resolutions' in evt.config.options)
+ && evt.config.options.resolutions.length != 0 ){
+ var resolutions = evt.config.options.resolutions;
+ var maxRes = resolutions[0];
+ var numZoomLevels = resolutions.length;
+ var zoomOffset = 0;
+ var res = 156543.03390625;
+ while ( res > maxRes ) {
+ zoomOffset += 1;
+ res = 156543.03390625 / Math.pow(2, zoomOffset);
+ }
+ lOptions['zoomOffset'] = zoomOffset;
+ lOptions['maxResolution'] = maxRes;
+ lOptions['numZoomLevels'] = numZoomLevels;
+ }
+
+ if (('osmMapnik' in evt.config.options) && evt.config.options.osmMapnik == 'True') {
+ evt.map.allOverlays = false;
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var osm = new OpenLayers.Layer.OSM('osm',
+ [
+ "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
+ "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
+ "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
+ ]
+ ,options
+ );
+ osm.maxExtent = maxExtent;
+ var osmCfg = {
+ "name":"osm"
+ ,"title":"OpenStreetMap"
+ };
+ evt.config.layers['osm'] = osmCfg;
+ evt.baselayers.push(osm);
+ }
+ if (('osmMapquest' in evt.config.options) && evt.config.options.osmMapquest == 'True') {
+ evt.map.allOverlays = false;
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var mapquest = new OpenLayers.Layer.OSM('mapquest',
+ ["http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
+ "http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
+ "http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
+ "http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png"]
+ ,options
+ );
+ mapquest.maxExtent = maxExtent;
+ var mapquestCfg = {
+ "name":"mapquest"
+ ,"title":"MapQuest OSM"
+ };
+ evt.config.layers['mapquest'] = mapquestCfg;
+ evt.baselayers.push(mapquest);
+ }
+ try {
+ if (('googleSatellite' in evt.config.options) && evt.config.options.googleSatellite == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:21
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var gsat = new OpenLayers.Layer.Google(
+ "Google Satellite",
+ {type: google.maps.MapTypeId.SATELLITE
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ gsat.maxExtent = maxExtent;
+ var gsatCfg = {
+ "name":"gsat"
+ ,"title":"Google Satellite"
+ };
+ evt.config.layers['gsat'] = gsatCfg;
+ evt.baselayers.push(gsat);
+ evt.map.allOverlays = false;
+ }
+ if (('googleHybrid' in evt.config.options) && evt.config.options.googleHybrid == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:20
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ghyb = new OpenLayers.Layer.Google(
+ "Google Hybrid",
+ {type: google.maps.MapTypeId.HYBRID
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ ghyb.maxExtent = maxExtent;
+ var ghybCfg = {
+ "name":"ghyb"
+ ,"title":"Google Hybrid"
+ };
+ evt.config.layers['ghyb'] = ghybCfg;
+ evt.baselayers.push(ghyb);
+ evt.map.allOverlays = false;
+ }
+ if (('googleTerrain' in evt.config.options) && evt.config.options.googleTerrain == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:16
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var gphy = new OpenLayers.Layer.Google(
+ "Google Terrain",
+ {type: google.maps.MapTypeId.TERRAIN
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ gphy.maxExtent = maxExtent;
+ var gphyCfg = {
+ "name":"gphy"
+ ,"title":"Google Terrain"
+ };
+ evt.config.layers['gphy'] = gphyCfg;
+ evt.baselayers.push(gphy);
+ evt.map.allOverlays = false;
+ }
+ if (('googleStreets' in evt.config.options) && evt.config.options.googleStreets == 'True') {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:20
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var gmap = new OpenLayers.Layer.Google(
+ "Google Streets", // the default
+ {numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset}
+ );
+ gmap.maxExtent = maxExtent;
+ var gmapCfg = {
+ "name":"gmap"
+ ,"title":"Google Streets"
+ };
+ evt.config.layers['gmap'] = gmapCfg;
+ evt.baselayers.push(gmap);
+ evt.map.allOverlays = false;
+ }
+ if (('bingStreets' in evt.config.options) && evt.config.options.bingStreets == 'True' && ('bingKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var bmap = new OpenLayers.Layer.Bing({
+ key: evt.config.options.bingKey,
+ type: "Road",
+ name: "Bing Road", // the default
+ numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ });
+ bmap.maxExtent = maxExtent;
+ var bmapCfg = {
+ "name":"bmap"
+ ,"title":"Bing Road"
+ };
+ evt.config.layers['bmap'] = bmapCfg;
+ evt.baselayers.push(bmap);
+ evt.map.allOverlays = false;
+ }
+ if (('bingSatellite' in evt.config.options) && evt.config.options.bingSatellite == 'True' && ('bingKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var baerial = new OpenLayers.Layer.Bing({
+ key: evt.config.options.bingKey,
+ type: "Aerial",
+ name: "Bing Aerial", // the default
+ numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ });
+ baerial.maxExtent = maxExtent;
+ var baerialCfg = {
+ "name":"baerial"
+ ,"title":"Bing Aerial"
+ };
+ evt.config.layers['baerial'] = baerialCfg;
+ evt.baselayers.push(baerial);
+ evt.map.allOverlays = false;
+ }
+ if (('bingHybrid' in evt.config.options) && evt.config.options.bingHybrid == 'True' && ('bingKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var bhybrid = new OpenLayers.Layer.Bing({
+ key: evt.config.options.bingKey,
+ type: "AerialWithLabels",
+ name: "Bing Hybrid", // the default
+ numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ });
+ bhybrid.maxExtent = maxExtent;
+ var bhybridCfg = {
+ "name":"bhybrid"
+ ,"title":"Bing Hybrid"
+ };
+ evt.config.layers['bhybrid'] = bhybridCfg;
+ evt.baselayers.push(bhybrid);
+ evt.map.allOverlays = false;
+ }
+ if (('ignTerrain' in evt.config.options) && evt.config.options.ignTerrain == 'True' && ('ignKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ignmap = new OpenLayers.Layer.WMTS({
+ name: "ignmap",
+ url: "http://gpp3-wxs.ign.fr/"+evt.config.options.ignKey+"/wmts",
+ layer: "GEOGRAPHICALGRIDSYSTEMS.MAPS",
+ matrixSet: "PM",
+ style: "normal",
+ projection: new OpenLayers.Projection("EPSG:3857"),
+ attribution: 'Fond : ©IGN <a href="http://www.geoportail.fr/" target="_blank"><img src="http://api.ign.fr/geoportail/api/js/2.0.0beta/theme/geoportal/img/logo_gp.g…"></a> <a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" alt="TOS" title="TOS" target="_blank">Conditions d\'utilisation</a>'
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ ,zoomOffset: options.zoomOffset
+
+ });
+ ignmap.maxExtent = maxExtent;
+ var ignmapCfg = {
+ "name":"ignmap"
+ ,"title":"IGN Scan"
+ };
+ evt.config.layers['ignmap'] = ignmapCfg;
+ evt.baselayers.push(ignmap);
+ evt.map.allOverlays = false;
+ }
+ if (('ignStreets' in evt.config.options) && evt.config.options.ignStreets == 'True' && ('ignKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:19
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ignplan = new OpenLayers.Layer.WMTS({
+ name: "ignplan",
+ url: "http://gpp3-wxs.ign.fr/"+evt.config.options.ignKey+"/wmts",
+ layer: "GEOGRAPHICALGRIDSYSTEMS.PLANIGN",
+ matrixSet: "PM",
+ style: "normal",
+ projection: new OpenLayers.Projection("EPSG:3857"),
+ attribution: 'Fond : ©IGN <a href="http://www.geoportail.fr/" target="_blank"><img src="http://api.ign.fr/geoportail/api/js/2.0.0beta/theme/geoportal/img/logo_gp.g…"></a> <a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" alt="TOS" title="TOS" target="_blank">Conditions d\'utilisation</a>'
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ ,zoomOffset: options.zoomOffset
+
+ });
+ ignplan.maxExtent = maxExtent;
+ var ignplanCfg = {
+ "name":"ignplan"
+ ,"title":"IGN Plan"
+ };
+ evt.config.layers['ignplan'] = ignplanCfg;
+ evt.baselayers.push(ignplan);
+ evt.map.allOverlays = false;
+ }
+ if (('ignSatellite' in evt.config.options) && evt.config.options.ignSatellite == 'True' && ('ignKey' in evt.config.options)) {
+ var options = {
+ zoomOffset: 0,
+ maxResolution:156543.03390625,
+ numZoomLevels:20
+ };
+ if (lOptions.zoomOffset != 0) {
+ options.zoomOffset = lOptions.zoomOffset;
+ options.maxResolution = lOptions.maxResolution;
+ }
+ if (lOptions.zoomOffset+lOptions.numZoomLevels <= options.numZoomLevels)
+ options.numZoomLevels = lOptions.numZoomLevels;
+ else
+ options.numZoomLevels = options.numZoomLevels - lOptions.zoomOffset;
+ var ignphoto = new OpenLayers.Layer.WMTS({
+ name: "ignphoto",
+ url: "http://gpp3-wxs.ign.fr/"+evt.config.options.ignKey+"/wmts",
+ layer: "ORTHOIMAGERY.ORTHOPHOTOS",
+ matrixSet: "PM",
+ style: "normal",
+ projection: new OpenLayers.Projection("EPSG:3857"),
+ attribution: 'Fond : ©IGN <a href="http://www.geoportail.fr/" target="_blank"><img src="http://api.ign.fr/geoportail/api/js/2.0.0beta/theme/geoportal/img/logo_gp.g…"></a> <a href="http://www.geoportail.gouv.fr/depot/api/cgu/licAPI_CGUF.pdf" alt="TOS" title="TOS" target="_blank">Conditions d\'utilisation</a>'
+ , numZoomLevels: options.numZoomLevels, maxResolution: options.maxResolution, minZoomLevel:options.zoomOffset
+ ,zoomOffset: options.zoomOffset
+
+ });
+ ignphoto.maxExtent = maxExtent;
+ var ignphotoCfg = {
+ "name":"ignphoto"
+ ,"title":"IGN Photos"
+ };
+ evt.config.layers['ignphoto'] = ignphotoCfg;
+ evt.baselayers.push(ignphoto);
+ evt.map.allOverlays = false;
+ }
+ } catch(e) {
+ //problems with google
+ var myError = e;
+ //console.log(myError);
+ }
+ }
+
+ if('lizmapExternalBaselayers' in evt.config){
+
+ var externalService = OpenLayers.Util.urlAppend(lizUrls.wms
+ ,OpenLayers.Util.getParameterString(lizUrls.params)
+ );
+ if (lizUrls.publicUrlList && lizUrls.publicUrlList.length > 1 ) {
+ externalService = [];
+ for (var j=0, jlen=lizUrls.publicUrlList.length; j<jlen; j++) {
+ externalService.push(
+ OpenLayers.Util.urlAppend(
+ lizUrls.publicUrlList[j],
+ OpenLayers.Util.getParameterString(lizUrls.params)
+ )
+ );
+ }
+ }
+
+ for (id in evt.config['lizmapExternalBaselayers']) {
+
+ var layerConfig = evt.config['lizmapExternalBaselayers'][id];
+
+ if (!('repository' in layerConfig) || !('project' in layerConfig))
+ continue;
+
+ var layerName = evt.cleanName(layerConfig.layerName);
+
+ var layerWmsParams = {
+ layers:layerConfig.layerName
+ ,version:'1.3.0'
+ ,exceptions:'application/vnd.ogc.se_inimage'
+ ,format:(layerConfig.imageFormat) ? layerConfig.imageFormat : 'image/png'
+ ,dpi:96
+ };
+ if (layerWmsParams.format != 'image/jpeg')
+ layerWmsParams['transparent'] = true;
+
+ // Change repository and project in service URL
+ var reg = new RegExp('repository\=(.+)&project\=(.+)', 'g');
+ var url = externalService.replace(reg, 'repository='+layerConfig.repository+'&project='+layerConfig.project);
+
+ // creating the base layer
+ layerConfig.title = layerConfig.layerTitle
+ layerConfig.name = layerConfig.layerName
+ layerConfig.baselayer = true;
+ layerConfig.singleTile = "False";
+ evt.config.layers[layerName] = layerConfig;
+ evt.baselayers.push(new OpenLayers.Layer.WMS(layerName,url
+ ,layerWmsParams
+ ,{isBaseLayer:true
+ ,gutter:5
+ ,buffer:0
+ ,singleTile:(layerConfig.singleTile == 'True')
+ }));
+ evt.map.allOverlays = false;
+
+ }
+ }
+
+ }
+ ,'uicreated':function(evt){
+ //console.log('uicreated')
+
+ }
+});
+
+$(document).ready(function () {
+ // start waiting
+ $('body').css('cursor', 'wait');
+ $('#loading').dialog({
+ modal: true
+ , draggable: false
+ , resizable: false
+ , closeOnEscape: false
+ , dialogClass: 'liz-dialog-wait'
+ })
+ .parent().removeClass('ui-corner-all')
+ .children('.ui-dialog-titlebar').removeClass('ui-corner-all');
+ // configurate OpenLayers
+ OpenLayers.DOTS_PER_INCH = 96;
+ // initialize LizMap
+ lizMap.init();
+});
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/js/map.js
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/admin.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/admin.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/admin.css 2014-07-07 09:40:55 UTC (rev 1036)
@@ -0,0 +1,8 @@
+.jforms-error-list {
+ background-color: #C43C35;
+ background-image: -moz-linear-gradient(center top , #EE5F5B, #C43C35);
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.jforms-error-list li {
+ color: #FFF;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/admin.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/123_click.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/123_click.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/bt_jaune.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/bt_jaune.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/download_layer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/download_layer.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_18.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_18.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20_tools.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_20_tools.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_menu.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_menu.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_menu_tools.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_menu_tools.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_timemanager.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/images/sprite_timemanager.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/250x250_mappemonde.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/250x250_mappemonde.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/loading.gif
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/loading.gif
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/logo_footer.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/logo_footer.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/overview_replacement.gif
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/overview_replacement.gif
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/overview_replacement.png
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/img/overview_replacement.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css 2014-07-07 09:40:55 UTC (rev 1036)
@@ -0,0 +1,80 @@
+body {
+ background : #EFEFEF;
+}
+
+/* for ie 8*/
+a {
+ color: #2B2B2B\9;
+ text-decoration:none\9;
+}
+.active > a,
+a:focus,
+a:hover {
+ color:white\9;
+ text-decoration:none\9;
+}
+/* END for ie 8*/
+
+#header {
+ background : #2B2B2B;
+ color : #FBFBFB;
+}
+#logo {
+ background : url('img/logo.png') no-repeat;
+}
+
+#headermenu {
+ background-color:#93C01F;
+}
+
+#auth {
+ background: transparent;
+}
+.navbar .nav > li > a {
+ color: #2B2B2B;
+}
+.navbar .nav .active > a,
+.navbar .nav > li > a:focus ,
+.navbar .nav > li > a:hover {
+ color: white;
+ background:transparent !important;
+}
+.navbar .nav li.dropdown.open > .dropdown-toggle,
+.navbar .nav li.dropdown.active > .dropdown-toggle,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle {
+ color : #585858;
+}
+.navbar .nav > li > .dropdown-menu:after {
+ border-bottom: 6px solid #F5F5F5;
+}
+.dropdown-menu {
+ background-color: #F5F5F5;
+}
+.navbar .nav > li.dropdown > a.dropdown-toggle:hover .caret {
+ border-top-color:white;
+ border-bottom-color:white;
+}
+.navbar .navbar-inner .icon {
+ background-image:url("images/sprite_20_tools.png");
+}
+.navbar .nav .login .icon {
+ background-position: -80px -60px;
+}
+.navbar .nav .login a:hover .icon,
+.navbar .nav .login.active a .icon {
+ background-position: -80px -40px;
+}
+.navbar .nav .user .icon {
+ background-position: 0px -60px;
+}
+.navbar .nav .user a:hover .icon,
+.navbar .nav .user.active a .icon {
+ background-position: 0px -40px;
+}
+.navbar .nav .home .icon {
+ background-position: -80px -20px;
+}
+.navbar .nav .home a:hover .icon,
+.navbar .nav .home.active a .icon {
+ background-position: -80px 0px;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/main.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css 2014-07-07 09:40:55 UTC (rev 1036)
@@ -0,0 +1,475 @@
+
+#title h1 {
+ color : #AAAAAA;
+}
+#title h2 {
+ color : #585858;
+}
+#headermenu .navbar-search .icon {
+ background-color: transparent;
+ background-position: -100px -20px;
+}
+#headermenu .dropdown-menu {
+ background-color: rgb(255,255,255);
+}
+#headermenu .dropdown-caret .caret-inner {
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid rgb(255,255,255);
+}
+#headermenu .dropdown-caret .caret-outer {
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid rgba(0,0,0,0.2);
+}
+#headermenu .dropdown-inner .items li > a {
+ color: rgb(51,51,51);
+}
+
+.navbar .nav .information .icon {
+ background-position: -120px -20px;
+}
+.navbar .nav .information a:hover .icon,
+.navbar .nav .information.active a .icon {
+ background-position: -120px 0px;
+}
+
+.navbar .nav .map .icon {
+ background-position: -40px -60px;
+}
+.navbar .nav .map a:hover .icon,
+.navbar .nav .map.active a .icon {
+ background-position: -40px -40px;
+}
+.navbar .nav .legend .icon {
+ background-position: -40px -100px;
+}
+.navbar .nav .legend a:hover .icon,
+.navbar .nav .legend.active a .icon {
+ background-position: -40px -80px;
+}
+.navbar .nav .locate .icon {
+ background-position: -20px -100px;
+}
+.navbar .nav .locate a:hover .icon,
+.navbar .nav .locate.active a .icon {
+ background-position: -20px -80px;
+}
+.navbar .nav .print .icon {
+ background-position: -160px -20px;
+}
+.navbar .nav .print a:hover .icon,
+.navbar .nav .print.active a .icon {
+ background-position: -160px 0px;
+}
+.navbar .nav .edition .icon {
+ background-position: -200px -20px;
+}
+.navbar .nav .edition a:hover .icon,
+.navbar .nav .edition.active a .icon {
+ background-position: -200px 0px;
+}
+.navbar .nav .measure .icon {
+ background-position: -140px -20px;
+}
+.navbar .nav .measure a:hover .icon,
+.navbar .nav .measure.active a .icon {
+ background-position: -140px 0px;
+}
+.navbar .nav .geolocate .icon {
+ background-position: -20px -60px;
+}
+.navbar .nav .geolocate a:hover .icon,
+.navbar .nav .geolocate.active a .icon {
+ background-position: -20px -40px;
+}
+
+#content .ui-icon {
+ background-image : url("images/sprite_menu.png");
+}
+#content .ui-icon-open-menu {
+ background-position : -16px -80px;
+ background-color : #F0F0F0;
+}
+#content .ui-icon-close-menu {
+ background-position : 0px -96px;
+}
+
+#metadata {
+ background-color:#EFEFEF;
+ color:grey;
+}
+
+#metadata h2{
+ color:#80B219;
+}
+
+#menu {
+ background : #F0F0F0;
+}
+
+#menu .ui-icon-locate-open {
+ background-position : -16px -16px;
+}
+#toolbar h3 .icon,
+#menu h3 .icon {
+ background-image : url(images/sprite_20_tools.png);
+}
+#toolbar .baselayer h3 .icon,
+#menu .baselayer h3 .icon {
+ background-position : -40px 0px;
+}
+#toolbar .switcher h3 .icon,
+#menu .switcher h3 .icon {
+ background-position : -40px -160px;
+}
+#toolbar .locate h3 .icon,
+#menu .locate h3 .icon {
+ background-position : -20px -80px;
+}
+#toolbar .geolocate h3 .icon,
+#menu .geolocate h3 .icon {
+ background-position: -20px -60px;
+}
+#toolbar .print h3 .icon,
+#menu .print h3 .icon {
+ background-position: -160px 0px;
+}
+#toolbar .measure h3 .icon,
+#menu .measure h3 .icon {
+ background-position: -140px 0px;
+}
+#toolbar .edition h3 .icon,
+#menu .edition h3 .icon {
+ background-position : -200px 0px;
+}
+
+/*
+Timemanager
+*/
+#toolbar #timemanager-menu h3 .icon,
+#menu #timemanager-menu h3 .icon {
+ background-image : url(images/sprite_timemanager.png);
+}
+.navbar .navbar-inner .timemanager .icon {
+ background-image:url("images/sprite_timemanager.png");
+}
+.navbar .nav .timemanager .icon {
+ background-position: 0px 0px;
+}
+.navbar .nav .timemanager a:hover .icon,
+.navbar .nav .timemanager.active a .icon {
+ background-position: -20px 0px;
+}
+#toolbar .timemanager h3 .icon,
+#menu .timemanager h3 .icon {
+ background-position: -20px 0px;
+}
+
+
+#map-content {
+ background : #F0F0F0;
+}
+
+#close-menu {
+ border-bottom : solid 1px #DDDDDD;
+}
+
+#content.mobile #toolbar{
+ background : #F0F0F0;
+}
+
+#toolbar .title .btn, #menu .title .btn {
+ background : url(images/sprite_menu_tools.png) no-repeat right;
+}
+#toolbar .title .btn.btn-error {
+ background:none;
+ color:#DA4F49;
+}
+#toolbar .title .btn.btn-locate-clear {
+ background-position : 0px 0px;
+}
+#toolbar .title .btn.btn-locate-clear:hover {
+ background-position : -20px 0px;
+}
+#toolbar .title .btn.btn-print-clear {
+ background-position : -20px -100px;
+}
+#toolbar .title .btn.btn-print-clear:hover {
+ background-position : 0px -100px;
+}
+#toolbar .title .btn.btn-stop {
+ background-position : 0px -20px;
+}
+#toolbar .title .btn.btn-stop:hover {
+ background-position : -20px -20px;
+}
+#toolbar .menu-content .btn.btn-success{
+ background-color: #93C01F;
+ background-image: -moz-linear-gradient(center top, #9BC144, #93C01F);
+}
+
+#baselayer-menu div.baselayer-select,
+#locate div.locate-layer {
+ border : solid 1px #606060;
+ background: url(images/123_click.png) no-repeat right;
+}
+
+#baselayer-menu div.baselayer-select select,
+#locate div.locate-layer select {
+ background: transparent;
+ color : rgb(51,51,51);
+}
+
+#locate div.locate-layer .custom-combobox-toggle {
+ background: url(images/123_click.png) no-repeat right;
+}
+#locate div.locate-layer .custom-combobox-input {
+ background: none;
+ color : rgb(51,51,51);
+}
+.ui-autocomplete.ui-menu .ui-menu-item a {
+ background: none;
+ color : rgb(51,51,51);
+}
+.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-active,
+.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-focus {
+ background: #0094D6;
+}
+
+#menu .ui-accordion-content {
+ background-color : white;
+ border : solid 1px rgb(251,216,80);
+}
+
+#switcher tr.liz-state-disabled span {
+ color:#AAA;
+}
+#switcher button{
+ background: none;
+}
+
+#switcher span.label{
+ color : rgb(51,51,51);
+ background: none;
+}
+#switcher .treeTable tr.expanded td a.expander {
+ background-image : url("images/sprite_menu.png");
+ background-position : -16px -48px;
+}
+#switcher .treeTable tr.collapsed td a.expander {
+ background-image : url("images/sprite_menu.png");
+ background-position : -32px -64px;
+}
+#switcher .treeTable span.selected {
+ background-color : rgb(153,153,153);
+ text-shadow : 0px -1px 0px rgba(0,0,0,0.25);
+ color : white;
+}
+#switcher .treeTable span.loading {
+ background-image : url("images/download_layer.gif");
+}
+
+#baselayer-select-input {
+ background : none repeat scroll 0% 0% rgb(240, 240, 240);
+ border : solid 1px #DDD;
+ border-left : none;
+}
+
+/*navbar*/
+#navbar div.slider{
+ background : #C81F2D;
+ border : solid 1px white;
+}
+#navbar div.slider a{
+ background : black;
+ border : solid 1px black;
+}
+#navbar button.ui-button-icon-only{
+ background : #CE1F2D;
+ border : solid 1px white;
+}
+#navbar button.ui-state-select{
+ background-color : #3A3C3D;
+}
+#navbar .ui-state-default .ui-icon {
+ background-image : url("images/sprite_20.png");
+}
+#navbar .ui-button-icon-only .ui-icon-pan {
+ background-position : 0px -20px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom {
+ background-position : -20px -20px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom-extent {
+ background-position : -20px -40px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom-out {
+ background-position : -20px 0px;
+}
+#navbar .ui-button-icon-only .ui-icon-zoom-in {
+ background-position : 0px 0px;
+}
+#navbar .ui-button-icon-only.ui-state-usable .ui-icon-previous {
+ background-position : 0px -80px;
+}
+#navbar .ui-button-icon-only .ui-icon-next {
+ background-position : -25px -60px;
+}
+#navbar .ui-button-icon-only.ui-state-usable .ui-icon-next {
+ background-position : -25px -80px;
+}
+
+/*Overview map*/
+#overview-bar {
+ background : none repeat scroll 0% 0% rgb(240, 240, 240);
+ border : solid 1px #606060;
+}
+
+#overview-bar .label {
+ color : rgb(51,51,51);
+ background: none;
+}
+
+#overview-bar .button {
+ border-left : solid 1px #606060;
+ background : #DDD;
+}
+#overview-bar .ui-icon {
+ background-image : url("images/sprite_menu.png");
+}
+
+#overview-bar .button .ui-icon-triangle-1-s {
+ background-position : -16px 0px;
+}
+#overview-bar .button .ui-icon-triangle-1-n {
+ background-position : 0px 0px;
+}
+
+#overviewmap{
+ background : none repeat scroll 0% 0% rgb(240, 240, 240);
+ border : solid 1px #606060;
+ border-bottom : none;
+}
+.olControlOverviewMapElement {
+ background-color: rgb(240,240,240);
+}
+.olControlOverviewMapExtentRectangle {
+ border: 2px solid #59B4D4;
+}
+.olControlOverviewMapRectReplacement {
+ background-image:url(img/overview_replacement.gif);
+}
+
+#attribution-box {
+ background-color : rgba(255,255,255,0.7);
+}
+
+#permalink-box {
+ background : rgba(255,255,255,0.5);
+}
+
+.alert-info {
+ background-color : #3a3c3d;
+ border-color : #fbfbfb;
+ color : #fbfbfb;
+}
+.alert-info .close{
+ color : #fbfbfb;
+}
+
+/**
+ * Icones lizMap
+ */
+.liz-icon-check {
+ /* sprite de 16x16 mais button de 14x14 */
+ background-position : -48px -80px;
+ background-color : #0094D6;
+}
+.liz-icon-partial-check {
+ /* sprite de 16x16 mais button de 14x14 */
+ background-position: -32px -80px;
+ background-color : #0094D6;
+}
+.liz-state-disabled .liz-icon-check {
+ background-color : #B3B3B3;
+}
+.liz-state-disabled .liz-icon-partial-check {
+ background-color : #B3B3B3;
+}
+.liz-icon-legend-collapsed {
+ background-position: -32px -16px;
+}
+.liz-icon-legend-open {
+ background-position: -64px -16px;
+}
+.liz-icon-info {
+ background-position: 0px -80px;
+}
+.liz-remove-cache {
+ background-position: -48px -100px;
+}
+
+.liz-icon-overview {
+ background-position: -208px -128px;
+}
+.liz-icon-switcher-open {
+ background-position: -16px -96px;
+}
+.liz-icon-switcher-collapsed {
+ background-position: 0 -96px;
+}
+
+/*Popup OpenLayers*/
+.lizmapPopup.olPopup,
+#map-content .lizmapPopup{
+ background: #F6F6F6 !important;
+ border: 1px solid #C9C9C9 !important;
+ color: black !important;
+}
+
+.lizmapPopup.olPopup .lizmapPopupContent h4,
+#map-content .lizmapPopupContent h4{
+ background: #2B2B2B !important;
+ color : #FBFBFB !important;
+}
+.lizmapPopup.olPopup .lizmapPopupContent a,
+#map-content .lizmapPopupContent a{
+ color:black;
+}
+.lizmapPopup.olPopup .lizmapPopupTable,
+#map-content .lizmapPopupTable{
+ border: 1px solid #2B2B2B !important;
+}
+.lizmapPopup.olPopup .lizmapPopupTable thead,
+#map-content .lizmapPopupTable thead {
+ color: white;
+ background-color: #81B00E;
+ border-bottom: 1px solid #2B2B2B !important;
+}
+.lizmapPopup.olPopup .lizmapPopupTable th.left,
+#map-content .lizmapPopupTable th.left{
+ border-right: 1px solid #C9C9C9 !important;
+}
+
+#edition-modal form {
+ margin: 0;
+}
+
+/*dialog wait*/
+.liz-dialog-wait {
+ background: #F6F6F6;
+ border: 1px solid #606060;
+}
+.liz-dialog-wait .ui-dialog-titlebar{
+ background : #2B2B2B;
+ color : #FBFBFB;
+}
+.liz-dialog-wait .ui-dialog-titlebar-close{
+ display:none;
+}
+.ui-widget-overlay {
+ opacity : 0.8;
+ background : black;
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/map.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css 2014-07-07 09:40:55 UTC (rev 1036)
@@ -0,0 +1,90 @@
+/* #### Mobile Phones Portrait #### */
+@media screen and (max-device-width: 480px) and (orientation: portrait){
+ /* some CSS here */
+}
+
+/* #### Mobile Phones Landscape #### */
+@media screen and (max-device-width: 640px) and (orientation: landscape){
+ /* some CSS here */
+}
+
+/* #### Mobile Phones Portrait or Landscape #### */
+@media screen and (max-device-width: 640px){
+ /* some CSS here */
+}
+
+/* #### Retina screen (iphone4, samsung note, etc.) Portrait or Landscape #### */
+@media
+only screen and (-webkit-min-device-pixel-ratio: 2),
+only screen and ( min--moz-device-pixel-ratio: 2),
+only screen and ( -o-min-device-pixel-ratio: 2/1),
+only screen and ( min-device-pixel-ratio: 2),
+only screen and ( min-resolution: 192dpi),
+only screen and ( min-resolution: 2dppx),
+only screen and ( max-height : 640px) ,
+only screen and ( max-device-height : 640px) {
+
+ /* Retina-specific stuff here */
+ body{
+ padding-top : 60px;
+ }
+ #header {
+ height : 30px;
+ }
+ #logo {
+ height : 30px;
+ margin: 0px 5px;
+ background : none;
+ }
+ #logo h1 {
+ font-size : 1.5em;
+ margin-left: 10px;
+ margin: 5px 5px;
+ line-height: 20px;
+ }
+ #title{
+ height : 30px;
+ margin : 0px 5px;
+ padding-right:5px;
+ }
+ #title h1 {
+ margin : 0px 5px;
+ font-size : 1.5em;
+ line-height: 30px;
+ }
+ #headermenu{
+/* height:30px;*/
+ position: fixed;
+ top: 30px;
+ }
+ .navbar-inner {
+ min-height:30px;
+ padding: 0px 10px;
+ }
+
+ /* for ie*/
+/* .navbar-inner ul {*/
+/* height:30px\9;*/
+/* }*/
+
+ /* for ie*/
+ .navbar-inner ul li{
+ display:inline\9;
+ }
+
+ #overview-box {
+ right:10px;
+ bottom:1em;
+ }
+
+}
+
+/* #### Tablets Portrait or Landscape #### */
+@media screen and (min-device-width: 768px) and (max-device-width: 1024px){
+ /* some CSS here */
+}
+
+/* #### Desktops #### */
+@media screen and (min-width: 1024px){
+ /* some CSS here */
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/media.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css 2014-07-07 09:40:55 UTC (rev 1036)
@@ -0,0 +1,7 @@
+.thumbnail {
+ background-color: white;
+}
+.liz-project-desc {
+ color: white;
+ background-color: rgba(0, 0, 0, 0.5);
+}
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/theme/css/view.css
___________________________________________________________________
Added: svn:executable
+ *
1
0
r1035 - in trunk: echobase-services echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial echobase-ui echobase-ui/src/main/java/fr/ifremer/echobase/ui
by sbavencoff@users.forge.codelutin.com 04 Jul '14
by sbavencoff@users.forge.codelutin.com 04 Jul '14
04 Jul '14
Author: sbavencoff
Date: 2014-07-04 09:14:57 +0200 (Fri, 04 Jul 2014)
New Revision: 1035
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1035
Log:
refs #4194 : fix dependencies and lizmpa repository id
Modified:
trunk/echobase-services/pom.xml
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
trunk/echobase-ui/pom.xml
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
Modified: trunk/echobase-services/pom.xml
===================================================================
--- trunk/echobase-services/pom.xml 2014-07-03 14:56:06 UTC (rev 1034)
+++ trunk/echobase-services/pom.xml 2014-07-04 07:14:57 UTC (rev 1035)
@@ -223,12 +223,6 @@
<scope>test</scope>
</dependency>
- <!-- base sqlite for Lizmap -->
- <dependency>
- <groupId>org.xerial</groupId>
- <artifactId>sqlite-jdbc</artifactId>
- </dependency>
-
</dependencies>
<profiles>
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-07-03 14:56:06 UTC (rev 1034)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-07-04 07:14:57 UTC (rev 1035)
@@ -264,7 +264,7 @@
String repository = host + port + dbname;
- repository = StringUtils.replaceEach(repository, new String[]{"-"}, new String[]{""});
+ repository = StringUtils.replaceEach(repository, new String[]{"-", "."}, new String[]{"", ""});
return repository;
}
Modified: trunk/echobase-ui/pom.xml
===================================================================
--- trunk/echobase-ui/pom.xml 2014-07-03 14:56:06 UTC (rev 1034)
+++ trunk/echobase-ui/pom.xml 2014-07-04 07:14:57 UTC (rev 1035)
@@ -264,6 +264,13 @@
<scope>runtime</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.xerial</groupId>
+ <artifactId>sqlite-jdbc</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
<!-- commons dependencies -->
<dependency>
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2014-07-03 14:56:06 UTC (rev 1034)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2014-07-04 07:14:57 UTC (rev 1035)
@@ -48,7 +48,6 @@
static {
try {
Class.forName("org.postgresql.Driver");
- Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
if (log.isErrorEnabled()) {
log.error("Could not find pg driver", e);
@@ -61,6 +60,14 @@
log.error("Could not find h2 driver", e);
}
}
+ try {
+ Class.forName("org.sqlite.JDBC");
+ } catch (ClassNotFoundException e) {
+ if (log.isErrorEnabled()) {
+ log.error("Could not find sqlite driver", e);
+ }
+ }
+
}
@Override
1
0
03 Jul '14
Author: sbavencoff
Date: 2014-07-03 16:56:06 +0200 (Thu, 03 Jul 2014)
New Revision: 1034
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1034
Log:
refs #4194 : create one repository by data base
Modified:
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java
trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties
trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties
trunk/echobase-services/pom.xml
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/workingDb/WorkingDbConfigurationService.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/Show.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/show.jsp
trunk/echobase-ui/src/main/webapp/css/screen.css
trunk/pom.xml
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -287,6 +287,19 @@
return file;
}
+ public File getLizmapConfig() {
+ File file = applicationConfig.getOptionAsFile(
+ EchoBaseConfigurationOption.LIZMAP_CONFIG.key);
+ Preconditions.checkNotNull(file);
+ return file;
+ }
+
+ public String getLizmapJdbcUrl() {
+ String jdbcUrl = applicationConfig.getOption(
+ EchoBaseConfigurationOption.LIZMAP_JDBC_URL.key);
+ return jdbcUrl;
+ }
+
public String getLizmapUrl(){
String url = applicationConfig.getOption(EchoBaseConfigurationOption.LIZMAP_URL.key);
return url;
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -107,10 +107,18 @@
n("echobase.config.lizmap.target.file.description"),
"${echobase.data.directory}/lizmap/projects",
File.class),
+ LIZMAP_CONFIG("echobase.lizmap.config.file",
+ n("echobase.config.lizmap.config.file.description"),
+ "/var/www/lizmap-web-client-2.9.4/lizmap/var/config/lizmapConfig.ini.php",
+ File.class),
LIZMAP_URL("echobase.lizmap.url",
n("echobase.config.lizmap.url.description"),
- "http://localhost/lizmap-web-client-2.9.4/lizmap/www/index.php/view/map/",
+ "http://localhost/lizmap-web-client-2.9.4/lizmap/www/index.php/view/",
String.class),
+ LIZMAP_JDBC_URL("echobase.lizmap.jdbc.url",
+ n("echobase.config.lizmap.jdbc.url.description"),
+ "jdbc:sqlite:/var/www/lizmap-web-client-2.9.4/lizmap/var/jauth.db",
+ String.class),
LIZMAP_REPOSITORY("echobase.lizmap.repository",
n("echobase.config.lizmap.url.description"),
"echobase",
Modified: trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties
===================================================================
--- trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties 2014-07-03 14:56:06 UTC (rev 1034)
@@ -35,6 +35,8 @@
echobase.config.h2Version.description=H2 jdbc driver version
echobase.config.internal.db.directory.description=Directory of the internal database
echobase.config.lib.directory.description=Directory where to put internal libraries (jdbc drivers, embedded war)
+echobase.config.lizmap.config.file.description=Lizmap configuration file
+echobase.config.lizmap.jdbc.url.description=JDBC URL for lizmap data base
echobase.config.lizmap.target.file.description=Repository directory of Qgis and LizMap files
echobase.config.lizmap.template.file.description=Lizmap configuration file template
echobase.config.lizmap.url.description=Lizmap URL
Modified: trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties
===================================================================
--- trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties 2014-07-03 14:56:06 UTC (rev 1034)
@@ -35,6 +35,8 @@
echobase.config.h2Version.description=Version du pilote jdbc H2
echobase.config.internal.db.directory.description=Répertoire de la base interne
echobase.config.lib.directory.description=Chemin où sont stockés les libraires internes (drivers + application embarquée)
+echobase.config.lizmap.config.file.description=Fichier de configuration de lizmap
+echobase.config.lizmap.jdbc.url.description=URL JDBC de la base lizmap
echobase.config.lizmap.target.file.description=Le répertoire de dépôt des fichiers Qgis et lizmap
echobase.config.lizmap.template.file.description=Le modièle du fichier de configuration de Lizmap
echobase.config.lizmap.url.description=L'URL de Lizmap
Modified: trunk/echobase-services/pom.xml
===================================================================
--- trunk/echobase-services/pom.xml 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-services/pom.xml 2014-07-03 14:56:06 UTC (rev 1034)
@@ -138,6 +138,10 @@
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
@@ -219,6 +223,12 @@
<scope>test</scope>
</dependency>
+ <!-- base sqlite for Lizmap -->
+ <dependency>
+ <groupId>org.xerial</groupId>
+ <artifactId>sqlite-jdbc</artifactId>
+ </dependency>
+
</dependencies>
<profiles>
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -711,6 +711,10 @@
return persistenceContext.getVoyageDao().forMissionEquals(mission).findAll();
}
+ public List<Voyage> getAllVoyages() {
+ return persistenceContext.getVoyageDao().findAll();
+ }
+
public long countVoyage() {
return persistenceContext.getVoyageDao().count();
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -24,11 +24,16 @@
import com.google.common.base.Charsets;
import com.google.common.base.Preconditions;
import fr.ifremer.echobase.EchoBaseTechnicalException;
+import fr.ifremer.echobase.entities.WorkingDbConfiguration;
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.io.EchoBaseIOUtil;
import fr.ifremer.echobase.persistence.JdbcConfiguration;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import fr.ifremer.echobase.services.service.UserDbPersistenceService;
+import fr.ifremer.echobase.services.service.workingDb.WorkingDbConfigurationService;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.HierarchicalINIConfiguration;
+import org.apache.commons.configuration.SubnodeConfiguration;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -40,6 +45,10 @@
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
import java.util.Scanner;
/**
@@ -66,6 +75,10 @@
@Inject
private UserDbPersistenceService persistenceService;
+ @Inject
+ private WorkingDbConfigurationService workingDbConfigurationService;
+
+
public void addSpatialSupport() {
// add spatial structure
@@ -157,24 +170,113 @@
/**
- * Generate map files for this database and this voyage.
+ * Generate maps files for this database.
* @param conf data base connexion configuration
- * @param voyageId voyage identifier for this map
- * @return Name of project map
+ * @return Name of repository maps
*/
- public String generateMap(JdbcConfiguration conf, String voyageId) {
- Preconditions.checkState(StringUtils.isNotBlank(voyageId));
- Voyage voyage = persistenceService.getVoyage(voyageId);
- return generateMap(conf, voyage);
+ public String generateMaps(JdbcConfiguration conf) {
+
+ WorkingDbConfiguration workingDbConfiguration
+ = workingDbConfigurationService.getWorkingDbConfigurationByUrl(conf.getUrl());
+
+ File lizmapTarget = getConfiguration().getLizmapTarget();
+
+ File lizmapConfig = getConfiguration().getLizmapConfig();
+
+ String lizmapJdbcUrl = getConfiguration().getLizmapJdbcUrl();
+
+ if (!lizmapTarget.isDirectory()) {
+ throw new EchoBaseTechnicalException("Map target (" + lizmapTarget.getAbsolutePath() + ") is not directory");
+ }
+
+ String repositoryName = getRepositoryName(conf);
+ File repository = new File(lizmapTarget, repositoryName);
+
+ if (!repository.isDirectory()) {
+ repository.mkdir();
+ }
+
+ // Add repository in Lizmap
+
+ try {
+ HierarchicalINIConfiguration lizmapIni = new HierarchicalINIConfiguration(lizmapConfig);
+ SubnodeConfiguration section = lizmapIni.getSection("repository:" + repositoryName);
+ section.setProperty("label", workingDbConfiguration.getDescription());
+ section.setProperty("path", repository.getAbsolutePath() + "/");
+ lizmapIni.save(new FileWriter(lizmapConfig));
+
+ } catch (ConfigurationException e) {
+ throw new EchoBaseTechnicalException("Could not load Lizmap config", e);
+ } catch (IOException e) {
+ throw new EchoBaseTechnicalException("Could not save Lizmap config", e);
+ }
+
+ // Add authorization
+ Connection connection = null;
+ Statement statement = null;
+
+ try {
+ connection = DriverManager.getConnection(lizmapJdbcUrl);
+ statement = connection.createStatement();
+ statement.execute("INSERT OR REPLACE INTO jacl2_rights " +
+ "(id_aclsbj, id_aclgrp, id_aclres, canceled) " +
+ "VALUES " +
+ "('lizmap.repositories.view', '__anonymous', '" + repositoryName + "', 0);");
+ statement.execute("INSERT OR REPLACE INTO jacl2_rights " +
+ "(id_aclsbj, id_aclgrp, id_aclres, canceled) " +
+ "VALUES " +
+ "('lizmap.repositories.view', 'admins', '" + repositoryName + "', 0);");
+
+ } catch (SQLException e) {
+ throw new EchoBaseTechnicalException("Could not create rights in lizmap", e);
+ } finally {
+ try {
+ if (statement != null) {
+ statement.close();
+ }
+ if (connection != null) {
+ connection.close();
+ }
+ } catch (SQLException e) {
+ throw new EchoBaseTechnicalException("Could not create rights in lizmap", e);
+ }
+ }
+
+
+ for (Voyage voyage : persistenceService.getAllVoyages()) {
+ generateMap(conf, voyage, repository);
+ }
+
+ return repositoryName;
}
+ protected String getRepositoryName(JdbcConfiguration conf) {
+
+ String url = conf.getUrl();
+
+ int hostIndex = START_JDBC_URL.length() - 1;
+ int portIndex = url.indexOf(':', hostIndex);
+ int dbnameIndex = url.indexOf("/", portIndex);
+
+ String dbname = url.substring(dbnameIndex + 1);
+ String host = url.substring(hostIndex + 1, portIndex);
+ String port = url.substring(portIndex + 1, dbnameIndex);
+
+ String repository = host + port + dbname;
+
+ repository = StringUtils.replaceEach(repository, new String[]{"-"}, new String[]{""});
+
+ return repository;
+ }
+
/**
* Generate map files for this database and this voyage.
* @param conf data base connexion configuration
* @param voyage voyage for this map
+ * @param repository Lizmap repository
* @return Name of project map
*/
- public String generateMap (JdbcConfiguration conf, Voyage voyage) {
+ protected String generateMap (JdbcConfiguration conf, Voyage voyage, File repository) {
Preconditions.checkNotNull(conf);
Preconditions.checkNotNull(voyage);
@@ -182,12 +284,10 @@
String[] templateValues = getTemplateValues(conf, voyage);
- generateMapFile(getConfiguration().getQgisTemplate(), project, templateValues);
+ generateMapFile(getConfiguration().getQgisTemplate(), repository, project, templateValues);
- generateMapFile(getConfiguration().getLizmapTemplate(), project, templateValues);
+ generateMapFile(getConfiguration().getLizmapTemplate(), repository, project, templateValues);
-
-
return project;
}
@@ -195,22 +295,17 @@
/**
* Generate file from template and values
* @param template file template to used
+ * @param repository lizmap repository
* @param project project name
* @param templateValues values to used in the template
* @return file generated
*/
- protected File generateMapFile(File template, String project, String[] templateValues) {
+ protected File generateMapFile(File template, File repository, String project, String[] templateValues) {
- File lizmapTarget = getConfiguration().getLizmapTarget();
-
- if (!lizmapTarget.isDirectory()) {
- throw new EchoBaseTechnicalException("Map target (" + lizmapTarget.getAbsolutePath() + ") is not directory");
- }
-
String name = template.getName();
name = project + name.substring(name.indexOf("."));
- File target = new File(lizmapTarget, name);
+ File target = new File(repository, name);
if (!target.isFile()) {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/workingDb/WorkingDbConfigurationService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/workingDb/WorkingDbConfigurationService.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/workingDb/WorkingDbConfigurationService.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -180,6 +180,13 @@
}
}
+ public WorkingDbConfiguration getWorkingDbConfigurationByUrl(String url) {
+
+ WorkingDbConfiguration configuration = getDao().forUrlEquals(url).findUnique();
+
+ return configuration;
+ }
+
protected WorkingDbConfiguration getExistingConf(String id) throws WorkingDbConfigurationNotFoundException {
WorkingDbConfiguration entity = getDao().findByTopiaId(id);
if (entity == null) {
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationListener.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -48,6 +48,7 @@
static {
try {
Class.forName("org.postgresql.Driver");
+ Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
if (log.isErrorEnabled()) {
log.error("Could not find pg driver", e);
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/Show.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/Show.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/Show.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -21,13 +21,13 @@
* #L%
*/
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.services.service.UserDbPersistenceService;
+import fr.ifremer.echobase.persistence.JdbcConfiguration;
import fr.ifremer.echobase.services.service.spatial.SpatialService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.inject.Inject;
-import java.util.Map;
/**
* To configure and show spatial datas.
@@ -39,12 +39,11 @@
private static final long serialVersionUID = 1L;
- @Inject
- protected transient UserDbPersistenceService userDbPersistenceService;
+ private static final Log log = LogFactory.getLog(Show.class);
@Inject
protected transient SpatialService spatialService;
-
+
protected final ShowSpatialModel model = new ShowSpatialModel();
public ShowSpatialModel getModel() {
@@ -53,13 +52,18 @@
protected boolean canAddSpatial;
- /** Universe of existing voyages. */
- protected Map<String, String> voyages;
+ protected String lizmapRepository;
- public Map<String, String> getVoyages() {
- return voyages;
+ public String getLizmapUrl() {
+ String url = getServiceContext().getConfiguration().getLizmapUrl() + "?" +
+ "repository=" + lizmapRepository;
+ return url;
}
+ public String getLizmapRepository() {
+ return lizmapRepository;
+ }
+
public boolean isCanAddSpatial() {
return canAddSpatial;
}
@@ -67,15 +71,20 @@
@Override
public String execute() throws Exception {
- voyages = userDbPersistenceService.loadSortAndDecorate(Voyage.class);
+ JdbcConfiguration dbConf = getEchoBaseSession().getWorkingDbConfiguration();
+ lizmapRepository = spatialService.generateMaps(dbConf);
+
+ if (log.isInfoEnabled()) {
+ log.info("Loading spatial view for repository: " + lizmapRepository);
+ }
+
model.setJdbcUrl(getServiceContext().getUserDbUrl());
model.setWithSpatial(spatialService.isSpatialAware());
// can add postgis if working db is postgresql and has still no echobase
// spatial db
canAddSpatial = !model.isWithSpatial() && spatialService.isPostgresql();
-
return SUCCESS;
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java 2014-07-03 14:56:06 UTC (rev 1034)
@@ -21,14 +21,8 @@
* #L%
*/
-import fr.ifremer.echobase.persistence.JdbcConfiguration;
-import fr.ifremer.echobase.services.service.spatial.SpatialService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import javax.inject.Inject;
-
/**
* To display only the spatial data map.
* <p/>
@@ -39,52 +33,4 @@
*/
public class ShowMap extends EchoBaseActionSupport {
- private static final long serialVersionUID = 1L;
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(ShowMap.class);
-
- @Inject
- protected transient SpatialService spatialService;
-
- protected String voyageId;
-
- protected String lizmpaProject;
-
- public String getVoyageId() {
- return voyageId;
- }
-
- public void setVoyageId(String voyageId) {
- this.voyageId = voyageId;
- }
-
- public String getLizmapUrl() {
- String url = getServiceContext().getConfiguration().getLizmapUrl() + "?" +
- "repository=" + getServiceContext().getConfiguration().getLizmapRepository() + "&" +
- "project=" + lizmpaProject;
- return url;
- }
-
- public String getLizmapRepository() {
- return getServiceContext().getConfiguration().getLizmapRepository();
- }
-
- public String getLizmapProject() {
- return lizmpaProject;
- }
-
-
- @Override
- public String execute() throws Exception {
-
- JdbcConfiguration dbConf = getEchoBaseSession().getWorkingDbConfiguration();
-
- lizmpaProject = spatialService.generateMap(dbConf, voyageId);
-
- if (log.isInfoEnabled()) {
- log.info("Loading spatial view for voyage: " + voyageId);
- }
- return SUCCESS;
- }
}
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/show.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/show.jsp 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/show.jsp 2014-07-03 14:56:06 UTC (rev 1034)
@@ -39,41 +39,13 @@
</li>
</ul>
</div>
+ </s:form>
- <fieldset>
- <legend>
- <s:text name="echobase.legend.showData.configure"/>
- </legend>
+ <iframe id="spatialViewContent" src="${lizmapUrl}"></iframe>
- <div class="cleanBoth help">
- <s:a href="%{getDocumentation('showSpatialData.html', null)}" target="doc">
- <s:text name="echobase.action.show.showSpatialData.documentation"/>
- </s:a>
- </div>
- <br/>
+</div>
- <div class="label">
- <s:property value="getText('echobase.common.voyage')"/> :
- </div>
- <ul>
- <s:iterator value="voyages">
- <li>
- <s:url action="showMap" id="showMapUrl">
- <s:param name="voyageId" value="%{key}"/>
- </s:url>
- <s:a href="%{showMapUrl}" target="_blank">
- <s:property value="%{value}"/>
- </s:a>
- </li>
- </s:iterator>
- </ul>
-
- <s:hidden key="model.withSpatial" label=' '/>
-
- </fieldset>
-
- </s:form>
</s:if>
<s:else>
Modified: trunk/echobase-ui/src/main/webapp/css/screen.css
===================================================================
--- trunk/echobase-ui/src/main/webapp/css/screen.css 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/echobase-ui/src/main/webapp/css/screen.css 2014-07-03 14:56:06 UTC (rev 1034)
@@ -762,3 +762,8 @@
}
#errorStack { padding:5px; width:80%; overflow:auto; }
+
+#spatialViewContent {
+ width: 99%;
+ height: 800px;
+}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-06-18 16:03:21 UTC (rev 1033)
+++ trunk/pom.xml 2014-07-03 14:56:06 UTC (rev 1034)
@@ -268,6 +268,12 @@
</dependency>
<dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.10</version>
+ </dependency>
+
+ <dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
@@ -287,6 +293,14 @@
<version>${h2Version}</version>
</dependency>
+ <!-- base sqlite for Lizmap -->
+ <dependency>
+ <groupId>org.xerial</groupId>
+ <artifactId>sqlite-jdbc</artifactId>
+ <version>3.7.2</version>
+ </dependency>
+
+
<!-- Struts 2 -->
<dependency>
1
0
r1033 - in trunk: echobase-domain/src/main/java/fr/ifremer/echobase/config echobase-domain/src/main/resources/i18n echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial echobase-ui/src/main/java/fr/ifremer/echobase/ui echobase-ui/src/main/resources echobase-ui/src/main/resources/lizmap echobase-ui/src/main/resources/lizmap/resources echobase-ui/src/main/resources/lizmap/templates src/site/rst
by sbavencoff@users.forge.codelutin.com 18 Jun '14
by sbavencoff@users.forge.codelutin.com 18 Jun '14
18 Jun '14
Author: sbavencoff
Date: 2014-06-18 18:03:21 +0200 (Wed, 18 Jun 2014)
New Revision: 1033
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1033
Log:
refs #4194 : change lizmap directories and files names, create lizmap files is not exists
Added:
trunk/echobase-ui/src/main/resources/lizmap/
trunk/echobase-ui/src/main/resources/lizmap/resources/
trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.dbf
trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.prj
trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.qpj
trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.shp
trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.shx
trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.avl
trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.dbf
trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.qix
trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.shp
trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.shx
trunk/echobase-ui/src/main/resources/lizmap/templates/
trunk/echobase-ui/src/main/resources/lizmap/templates/LizmapTemplate.qgs.cfg
trunk/echobase-ui/src/main/resources/lizmap/templates/QgisTemplate.qgs
Modified:
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java
trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties
trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationContext.java
trunk/src/site/rst/install.rst.vm
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java 2014-06-18 16:03:21 UTC (rev 1033)
@@ -266,6 +266,13 @@
return file;
}
+ public File getQgisResources() {
+ File file = applicationConfig.getOptionAsFile(
+ EchoBaseConfigurationOption.QGIS_RESOURCES.key);
+ Preconditions.checkNotNull(file);
+ return file;
+ }
+
public File getLizmapTemplate() {
File file = applicationConfig.getOptionAsFile(
EchoBaseConfigurationOption.LIZMAP_TEMPLATE.key);
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java 2014-06-18 16:03:21 UTC (rev 1033)
@@ -93,15 +93,19 @@
URL.class),
QGIS_TEMPLATE("echobase.qgis.template.file",
n("echobase.config.qgis.template.file.description"),
- "${echobase.data.directory}/lizmap/templates/{{voyageName}}.qgs",
+ "${echobase.data.directory}/lizmap/templates/QgisTemplate.qgs",
File.class),
+ QGIS_RESOURCES("echobase.qgis.resources.file",
+ n("echobase.config.qgis.resources.file.description"),
+ "${echobase.data.directory}/lizmap/resources/",
+ File.class),
LIZMAP_TEMPLATE("echobase.lizmap.template.file",
n("echobase.config.lizmap.template.file.description"),
- "${echobase.data.directory}/lizmap/templates/{{voyageName}}.qgs.cfg",
+ "${echobase.data.directory}/lizmap/templates/LizmapTemplate.qgs.cfg",
File.class),
LIZMAP_TARGET("echobase.lizmap.target.file",
n("echobase.config.lizmap.target.file.description"),
- "${echobase.data.directory}/lizmap/qgis",
+ "${echobase.data.directory}/lizmap/projects",
File.class),
LIZMAP_URL("echobase.lizmap.url",
n("echobase.config.lizmap.url.description"),
Modified: trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties
===================================================================
--- trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/echobase-domain/src/main/resources/i18n/echobase-domain_en_GB.properties 2014-06-18 16:03:21 UTC (rev 1033)
@@ -40,6 +40,7 @@
echobase.config.lizmap.url.description=Lizmap URL
echobase.config.log.config.file.description=Log configuration file
echobase.config.postgresqlVersion.description=Postgresql driver version
+echobase.config.qgis.resources.file.description=Resources directory for Qgis files
echobase.config.qgis.template.file.description=Qgis file template
echobase.config.version.description=Application version
echobase.config.war.location.description=Location of the war used to create embedded applications
Modified: trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties
===================================================================
--- trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/echobase-domain/src/main/resources/i18n/echobase-domain_fr_FR.properties 2014-06-18 16:03:21 UTC (rev 1033)
@@ -40,6 +40,7 @@
echobase.config.lizmap.url.description=L'URL de Lizmap
echobase.config.log.config.file.description=Fichier de configuration des logs
echobase.config.postgresqlVersion.description=Version du pilote jdbc Postgresql
+echobase.config.qgis.resources.file.description=Répertoire des ressources des fichier Qgis
echobase.config.qgis.template.file.description=Le modèle du fichier Qgis
echobase.config.version.description=Version de l'application
echobase.config.war.location.description=Chemin d'accèss au war embarqué à utiliser pour créer des applications embarquées
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-06-18 16:03:21 UTC (rev 1033)
@@ -59,7 +59,7 @@
public static final String POSTGIS_VIEW_SQL = "/postgis-view.sql";
- public static final String[] TEMPLATE_MARKUP = {"{{dbname}}", "{{host}}", "{{port}}", "{{userName}}", "{{password}}", "{{voyageName}}", "{{voyageId}}" };
+ public static final String[] TEMPLATE_MARKUP = {"{{dbname}}", "{{host}}", "{{port}}", "{{userName}}", "{{password}}", "{{voyageName}}", "{{voyageId}}", "{{resourcesPath}}" };
public static final String START_JDBC_URL = "jdbc:postgresql://";
@@ -178,26 +178,28 @@
Preconditions.checkNotNull(conf);
Preconditions.checkNotNull(voyage);
+ String project = voyage.getName();
+
String[] templateValues = getTemplateValues(conf, voyage);
- File qgisFile = generateMapFile(getConfiguration().getQgisTemplate(), templateValues);
+ generateMapFile(getConfiguration().getQgisTemplate(), project, templateValues);
- generateMapFile(getConfiguration().getLizmapTemplate(), templateValues);
+ generateMapFile(getConfiguration().getLizmapTemplate(), project, templateValues);
- String name = qgisFile.getName();
- name = name.substring(0, name.lastIndexOf("."));
- return name;
+ return project;
+
}
/**
* Generate file from template and values
* @param template file template to used
+ * @param project project name
* @param templateValues values to used in the template
* @return file generated
*/
- protected File generateMapFile(File template, String[] templateValues) {
+ protected File generateMapFile(File template, String project, String[] templateValues) {
File lizmapTarget = getConfiguration().getLizmapTarget();
@@ -206,7 +208,7 @@
}
String name = template.getName();
- name = StringUtils.replaceEach(name, TEMPLATE_MARKUP, templateValues);
+ name = project + name.substring(name.indexOf("."));
File target = new File(lizmapTarget, name);
@@ -280,6 +282,8 @@
templateValues[5] = voyage.getName();
// voyage id
templateValues[6] = voyage.getTopiaId();
+ // ressourcesPath
+ templateValues[7] = getConfiguration().getQgisResources().getAbsolutePath();
return templateValues;
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationContext.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationContext.java 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/EchoBaseApplicationContext.java 2014-06-18 16:03:21 UTC (rev 1033)
@@ -25,6 +25,7 @@
import com.google.common.collect.Sets;
import com.google.common.io.Files;
import com.opensymphony.xwork2.ActionContext;
+import fr.ifremer.echobase.EchoBaseTechnicalException;
import fr.ifremer.echobase.config.EchoBaseConfiguration;
import fr.ifremer.echobase.converter.FloatConverter;
import fr.ifremer.echobase.entities.DriverType;
@@ -45,6 +46,7 @@
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.Converter;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -63,6 +65,7 @@
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
+import java.net.URL;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -85,6 +88,13 @@
private static final String APPLICATION_CONTEXT_PARAMETER =
"echobaseApplicationContext";
+ public static final String QGIS_TEMPLATE = "/lizmap/templates/QgisTemplate.qgs";
+
+ public static final String LIZMAP_TEMPLATE = "/lizmap/templates/LizmapTemplate.qgs.cfg";
+
+ public static final String QGIS_RESOURCES = "/lizmap/resources/";
+
+
/** Set of all loggued user sessions to be close at shutdown time. */
protected Set<EchoBaseSession> sessions;
@@ -211,6 +221,8 @@
} catch (IOException e) {
throw new TopiaException("Could not extract files (drivers + embedded war)", e);
}
+
+ initLizamp();
}
public EchoBaseConfiguration getConfiguration() {
@@ -410,4 +422,33 @@
EmbeddedApplicationService.copyEmbeddedBinaryFile(embeddedWarFileName, embeddedWarDirectory);
}
}
+
+ protected void initLizamp() {
+ try {
+ if (!configuration.getQgisTemplate().exists()) {
+ URL qgisTemplateUrl = EchoBaseApplicationContext.class.getResource(QGIS_TEMPLATE);
+ File qgisTemplate = new File(qgisTemplateUrl.getFile());
+ FileUtils.copyFile(qgisTemplate, configuration.getQgisTemplate());
+ }
+
+ if (!configuration.getLizmapTemplate().exists()) {
+ URL lizmapTemplateUrl = EchoBaseApplicationContext.class.getResource(LIZMAP_TEMPLATE);
+ File lizmapTemplate = new File(lizmapTemplateUrl.getFile());
+ FileUtils.copyFile(lizmapTemplate, configuration.getLizmapTemplate());
+ }
+
+ if (!configuration.getQgisResources().exists()) {
+ URL resourcesUrl = EchoBaseApplicationContext.class.getResource(QGIS_RESOURCES);
+ File resources = new File(resourcesUrl.getFile());
+ FileUtils.copyDirectory(resources, configuration.getQgisResources());
+ }
+
+ if (!configuration.getLizmapTarget().exists()) {
+ configuration.getLizmapTarget().mkdirs();
+ }
+ } catch (IOException e) {
+ throw new EchoBaseTechnicalException("Could not create lizmap files", e);
+ }
+
+ }
}
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.dbf
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.dbf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.prj
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.prj (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.prj 2014-06-18 16:03:21 UTC (rev 1033)
@@ -0,0 +1 @@
+GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.qpj
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.qpj (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.qpj 2014-06-18 16:03:21 UTC (rev 1033)
@@ -0,0 +1 @@
+GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.shp
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.shp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.shx
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/France&Spain.shx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.avl
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.avl (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.avl 2014-06-18 16:03:21 UTC (rev 1033)
@@ -0,0 +1,1134 @@
+/3.1
+(ODB.1
+ FirstRootClassName: "Legend"
+ Roots: 2
+ Version: 32
+)
+
+(Legend.2
+ LegType: 0x04
+ ClassType: 0x03
+ FieldNames: 3
+ Symbols: 4
+ Class: 192
+ Class: 193
+ Class: 194
+ Class: 195
+ Class: 196
+ Class: 197
+ Class: 198
+ Class: 199
+ Class: 200
+ Class: 201
+ Class: 202
+ StdDevs: 1.00000000000000
+ NullSym: 203
+ NullValues: 210
+ StatValues: 211
+)
+
+(AVStr.3
+ S: "D4"
+)
+
+(SymList.4
+ Child: 5
+ Child: 23
+ Child: 41
+ Child: 59
+ Child: 77
+ Child: 95
+ Child: 113
+ Child: 131
+ Child: 149
+ Child: 167
+ Child: 185
+)
+
+(CMkSym.5
+ Color: 6
+ Symbols: 7
+ BgColor: 22
+ Size: 1.00000000000000
+)
+
+(TClr.6
+ Red: 0xffff
+)
+
+(SymList.7
+ Child: 8
+ Child: 15
+)
+
+(BMkSym.8
+ Color: 9
+ BgColor: 10
+ Font: 11
+ Size: 1.00000000000000
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.9
+ Red: 0xffff
+)
+
+(TClr.10
+ Name: "Transparent"
+)
+
+(NFont.11
+ Family: 12
+ Name: 13
+ Style: 14
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.12
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.13
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.14
+ S: "Normal"
+)
+
+(BMkSym.15
+ Color: 16
+ ColorLock: 1
+ BgColor: 17
+ Font: 18
+ Size: 1.00000000000000
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.16
+)
+
+(TClr.17
+ Name: "Transparent"
+)
+
+(NFont.18
+ Family: 19
+ Name: 20
+ Style: 21
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.19
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.20
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.21
+ S: "Normal"
+)
+
+(TClr.22
+ Name: "Transparent"
+)
+
+(CMkSym.23
+ Color: 24
+ Symbols: 25
+ BgColor: 40
+ Size: 3.55555555555556
+)
+
+(TClr.24
+ Red: 0xffff
+)
+
+(SymList.25
+ Child: 26
+ Child: 33
+)
+
+(BMkSym.26
+ Color: 27
+ BgColor: 28
+ Font: 29
+ Size: 3.55555555555556
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.27
+ Red: 0xffff
+)
+
+(TClr.28
+ Name: "Transparent"
+)
+
+(NFont.29
+ Family: 30
+ Name: 31
+ Style: 32
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.30
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.31
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.32
+ S: "Normal"
+)
+
+(BMkSym.33
+ Color: 34
+ ColorLock: 1
+ BgColor: 35
+ Font: 36
+ Size: 3.55555555555556
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.34
+)
+
+(TClr.35
+ Name: "Transparent"
+)
+
+(NFont.36
+ Family: 37
+ Name: 38
+ Style: 39
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.37
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.38
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.39
+ S: "Normal"
+)
+
+(TClr.40
+ Name: "Transparent"
+)
+
+(CMkSym.41
+ Color: 42
+ Symbols: 43
+ BgColor: 58
+ Size: 6.11111111111111
+)
+
+(TClr.42
+ Red: 0xffff
+)
+
+(SymList.43
+ Child: 44
+ Child: 51
+)
+
+(BMkSym.44
+ Color: 45
+ BgColor: 46
+ Font: 47
+ Size: 6.11111111111111
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.45
+ Red: 0xffff
+)
+
+(TClr.46
+ Name: "Transparent"
+)
+
+(NFont.47
+ Family: 48
+ Name: 49
+ Style: 50
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.48
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.49
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.50
+ S: "Normal"
+)
+
+(BMkSym.51
+ Color: 52
+ ColorLock: 1
+ BgColor: 53
+ Font: 54
+ Size: 6.11111111111111
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.52
+)
+
+(TClr.53
+ Name: "Transparent"
+)
+
+(NFont.54
+ Family: 55
+ Name: 56
+ Style: 57
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.55
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.56
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.57
+ S: "Normal"
+)
+
+(TClr.58
+ Name: "Transparent"
+)
+
+(CMkSym.59
+ Color: 60
+ Symbols: 61
+ BgColor: 76
+ Size: 8.66666666666667
+)
+
+(TClr.60
+ Red: 0xffff
+)
+
+(SymList.61
+ Child: 62
+ Child: 69
+)
+
+(BMkSym.62
+ Color: 63
+ BgColor: 64
+ Font: 65
+ Size: 8.66666666666667
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.63
+ Red: 0xffff
+)
+
+(TClr.64
+ Name: "Transparent"
+)
+
+(NFont.65
+ Family: 66
+ Name: 67
+ Style: 68
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.66
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.67
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.68
+ S: "Normal"
+)
+
+(BMkSym.69
+ Color: 70
+ ColorLock: 1
+ BgColor: 71
+ Font: 72
+ Size: 8.66666666666667
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.70
+)
+
+(TClr.71
+ Name: "Transparent"
+)
+
+(NFont.72
+ Family: 73
+ Name: 74
+ Style: 75
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.73
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.74
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.75
+ S: "Normal"
+)
+
+(TClr.76
+ Name: "Transparent"
+)
+
+(CMkSym.77
+ Color: 78
+ Symbols: 79
+ BgColor: 94
+ Size: 11.22222222222222
+)
+
+(TClr.78
+ Red: 0xffff
+)
+
+(SymList.79
+ Child: 80
+ Child: 87
+)
+
+(BMkSym.80
+ Color: 81
+ BgColor: 82
+ Font: 83
+ Size: 11.22222222222222
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.81
+ Red: 0xffff
+)
+
+(TClr.82
+ Name: "Transparent"
+)
+
+(NFont.83
+ Family: 84
+ Name: 85
+ Style: 86
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.84
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.85
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.86
+ S: "Normal"
+)
+
+(BMkSym.87
+ Color: 88
+ ColorLock: 1
+ BgColor: 89
+ Font: 90
+ Size: 11.22222222222222
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.88
+)
+
+(TClr.89
+ Name: "Transparent"
+)
+
+(NFont.90
+ Family: 91
+ Name: 92
+ Style: 93
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.91
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.92
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.93
+ S: "Normal"
+)
+
+(TClr.94
+ Name: "Transparent"
+)
+
+(CMkSym.95
+ Color: 96
+ Symbols: 97
+ BgColor: 112
+ Size: 13.77777777777778
+)
+
+(TClr.96
+ Red: 0xffff
+)
+
+(SymList.97
+ Child: 98
+ Child: 105
+)
+
+(BMkSym.98
+ Color: 99
+ BgColor: 100
+ Font: 101
+ Size: 13.77777777777778
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.99
+ Red: 0xffff
+)
+
+(TClr.100
+ Name: "Transparent"
+)
+
+(NFont.101
+ Family: 102
+ Name: 103
+ Style: 104
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.102
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.103
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.104
+ S: "Normal"
+)
+
+(BMkSym.105
+ Color: 106
+ ColorLock: 1
+ BgColor: 107
+ Font: 108
+ Size: 13.77777777777778
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.106
+)
+
+(TClr.107
+ Name: "Transparent"
+)
+
+(NFont.108
+ Family: 109
+ Name: 110
+ Style: 111
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.109
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.110
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.111
+ S: "Normal"
+)
+
+(TClr.112
+ Name: "Transparent"
+)
+
+(CMkSym.113
+ Color: 114
+ Symbols: 115
+ BgColor: 130
+ Size: 16.33333333333333
+)
+
+(TClr.114
+ Red: 0xffff
+)
+
+(SymList.115
+ Child: 116
+ Child: 123
+)
+
+(BMkSym.116
+ Color: 117
+ BgColor: 118
+ Font: 119
+ Size: 16.33333333333333
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.117
+ Red: 0xffff
+)
+
+(TClr.118
+ Name: "Transparent"
+)
+
+(NFont.119
+ Family: 120
+ Name: 121
+ Style: 122
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.120
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.121
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.122
+ S: "Normal"
+)
+
+(BMkSym.123
+ Color: 124
+ ColorLock: 1
+ BgColor: 125
+ Font: 126
+ Size: 16.33333333333333
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.124
+)
+
+(TClr.125
+ Name: "Transparent"
+)
+
+(NFont.126
+ Family: 127
+ Name: 128
+ Style: 129
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.127
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.128
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.129
+ S: "Normal"
+)
+
+(TClr.130
+ Name: "Transparent"
+)
+
+(CMkSym.131
+ Color: 132
+ Symbols: 133
+ BgColor: 148
+ Size: 18.88888888888889
+)
+
+(TClr.132
+ Red: 0xffff
+)
+
+(SymList.133
+ Child: 134
+ Child: 141
+)
+
+(BMkSym.134
+ Color: 135
+ BgColor: 136
+ Font: 137
+ Size: 18.88888888888889
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.135
+ Red: 0xffff
+)
+
+(TClr.136
+ Name: "Transparent"
+)
+
+(NFont.137
+ Family: 138
+ Name: 139
+ Style: 140
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.138
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.139
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.140
+ S: "Normal"
+)
+
+(BMkSym.141
+ Color: 142
+ ColorLock: 1
+ BgColor: 143
+ Font: 144
+ Size: 18.88888888888889
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.142
+)
+
+(TClr.143
+ Name: "Transparent"
+)
+
+(NFont.144
+ Family: 145
+ Name: 146
+ Style: 147
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.145
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.146
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.147
+ S: "Normal"
+)
+
+(TClr.148
+ Name: "Transparent"
+)
+
+(CMkSym.149
+ Color: 150
+ Symbols: 151
+ BgColor: 166
+ Size: 21.44444444444444
+)
+
+(TClr.150
+ Red: 0xffff
+)
+
+(SymList.151
+ Child: 152
+ Child: 159
+)
+
+(BMkSym.152
+ Color: 153
+ BgColor: 154
+ Font: 155
+ Size: 21.44444444444444
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.153
+ Red: 0xffff
+)
+
+(TClr.154
+ Name: "Transparent"
+)
+
+(NFont.155
+ Family: 156
+ Name: 157
+ Style: 158
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.156
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.157
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.158
+ S: "Normal"
+)
+
+(BMkSym.159
+ Color: 160
+ ColorLock: 1
+ BgColor: 161
+ Font: 162
+ Size: 21.44444444444444
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.160
+)
+
+(TClr.161
+ Name: "Transparent"
+)
+
+(NFont.162
+ Family: 163
+ Name: 164
+ Style: 165
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.163
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.164
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.165
+ S: "Normal"
+)
+
+(TClr.166
+ Name: "Transparent"
+)
+
+(CMkSym.167
+ Color: 168
+ Symbols: 169
+ BgColor: 184
+ Size: 24.00000000000000
+)
+
+(TClr.168
+ Red: 0xffff
+)
+
+(SymList.169
+ Child: 170
+ Child: 177
+)
+
+(BMkSym.170
+ Color: 171
+ BgColor: 172
+ Font: 173
+ Size: 24.00000000000000
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.171
+ Red: 0xffff
+)
+
+(TClr.172
+ Name: "Transparent"
+)
+
+(NFont.173
+ Family: 174
+ Name: 175
+ Style: 176
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.174
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.175
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.176
+ S: "Normal"
+)
+
+(BMkSym.177
+ Color: 178
+ ColorLock: 1
+ BgColor: 179
+ Font: 180
+ Size: 24.00000000000000
+ Pattern: 83
+ Angle: 360.00000000000000
+)
+
+(TClr.178
+)
+
+(TClr.179
+ Name: "Transparent"
+)
+
+(NFont.180
+ Family: 181
+ Name: 182
+ Style: 183
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.181
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.182
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.183
+ S: "Normal"
+)
+
+(TClr.184
+ Name: "Transparent"
+)
+
+(BMkSym.185
+ Color: 186
+ BgColor: 187
+ Font: 188
+ Size: 8.00000000000000
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.186
+ Name: "Transparent"
+)
+
+(TClr.187
+ Name: "Transparent"
+)
+
+(NFont.188
+ Family: 189
+ Name: 190
+ Style: 191
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.189
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.190
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.191
+ S: "Normal"
+)
+
+(LClass.192
+ Label: "1 - 3"
+ MinNum: 1.00000000000000
+ MaxNum: 3.00000000000000
+)
+
+(LClass.193
+ Label: "4 - 15"
+ MinNum: 4.00000000000000
+ MaxNum: 15.00000000000000
+)
+
+(LClass.194
+ Label: "16 - 30"
+ MinNum: 16.00000000000000
+ MaxNum: 30.00000000000000
+)
+
+(LClass.195
+ Label: "31 - 70"
+ MinNum: 31.00000000000000
+ MaxNum: 70.00000000000000
+)
+
+(LClass.196
+ Label: "71 - 120"
+ MinNum: 71.00000000000000
+ MaxNum: 120.00000000000000
+)
+
+(LClass.197
+ Label: "121 - 188"
+ MinNum: 121.00000000000000
+ MaxNum: 188.00000000000000
+)
+
+(LClass.198
+ Label: "189 - 313"
+ MinNum: 189.00000000000000
+ MaxNum: 313.00000000000000
+)
+
+(LClass.199
+ Label: "314 - 550"
+ MinNum: 314.00000000000000
+ MaxNum: 550.00000000000000
+)
+
+(LClass.200
+ Label: "551 - 1016"
+ MinNum: 551.00000000000000
+ MaxNum: 1016.00000000000000
+)
+
+(LClass.201
+ Label: "1017 - 2286"
+ MinNum: 1017.00000000000000
+ MaxNum: 2286.00000000000000
+)
+
+(LClass.202
+ IsNoData: 1
+ Label: "Pas de donn�es"
+ MaxNum: -1.00000000000000
+ Precision: -3
+)
+
+(BMkSym.203
+ Color: 204
+ BgColor: 205
+ Font: 206
+ Size: 8.00000000000000
+ Pattern: 35
+ Angle: 360.00000000000000
+)
+
+(TClr.204
+ Name: "Transparent"
+)
+
+(TClr.205
+ Name: "Transparent"
+)
+
+(NFont.206
+ Family: 207
+ Name: 208
+ Style: 209
+ Weight: 1
+ Wideness: 1
+)
+
+(AVStr.207
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.208
+ S: "ESRI Geometric Symbols"
+)
+
+(AVStr.209
+ S: "Normal"
+)
+
+(NameDict.210
+)
+
+(NameDict.211
+)
+
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.dbf
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.dbf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.qix
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.qix
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.shp
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.shp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.shx
===================================================================
(Binary files differ)
Property changes on: trunk/echobase-ui/src/main/resources/lizmap/resources/pelgas09.shx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/echobase-ui/src/main/resources/lizmap/templates/LizmapTemplate.qgs.cfg
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/templates/LizmapTemplate.qgs.cfg (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/templates/LizmapTemplate.qgs.cfg 2014-06-18 16:03:21 UTC (rev 1033)
@@ -0,0 +1,323 @@
+{
+ "layers": {
+ "Sardine biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "Anchovy_biomass_copier{{voyageId}}",
+ "title": "Sardine biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Sardine biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Horse mackerel biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "Sprat_biomass_copier{{voyageId}}",
+ "title": "Horse mackerel biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Horse mackerel biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Blue whitting biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "Mackerel_biomass_copier{{voyageId}}",
+ "title": "Blue whitting biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Blue whitting biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Anchovy biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "cellesduviewspeciesbiomass{{voyageId}}",
+ "title": "Anchovy biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Anchovy biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Blue whitting mean biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "meanmapcellbiomassmicrpou{{voyageId}}",
+ "title": "Blue whitting mean biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Blue whitting mean biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Mackerel mean biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "meanmapcellbiomassscomsco{{voyageId}}",
+ "title": "Mackerel mean biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Mackerel mean biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Pelagic trawl catch": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "totalcatchspopwide{{voyageId}}",
+ "title": "Pelagic trawl catch",
+ "singleTile": "True",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Pelagic trawl catch",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Sardine mean biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "meanmapcellbiomasssardpil{{voyageId}}",
+ "title": "Sardine mean biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Sardine mean biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Anchovy mean biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "meanmapcellbiomassengrenc{{voyageId}}",
+ "title": "Anchovy mean biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Anchovy mean biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Bathymetry": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "pelgas{{voyageId}}",
+ "title": "Bathymetry",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Bathymetry",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Sprat mean biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "meanmapcellbiomassspraspr{{voyageId}}",
+ "title": "Sprat mean biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Sprat mean biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Country": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "country{{voyageId}}",
+ "title": "Country",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Country",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Sprat biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "Sardine_biomass_copier{{voyageId}}",
+ "title": "Sprat biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Sprat biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Mackerel biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "Horse_mackerel_biomass_copier{{voyageId}}",
+ "title": "Mackerel biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Mackerel biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ },
+ "Horse mackerel mean biomass": {
+ "abstract": "",
+ "baseLayer": "False",
+ "noLegendImage": "False",
+ "id": "meanmapcellbiomasstractru{{voyageId}}",
+ "title": "Horse mackerel mean biomass",
+ "singleTile": "False",
+ "groupAsLayer": "False",
+ "popup": "False",
+ "clientCacheExpiration": 300,
+ "link": "",
+ "toggled": "True",
+ "name": "Horse mackerel mean biomass",
+ "cached": "False",
+ "type": "layer",
+ "maxScale": 1000000000000,
+ "imageFormat": "image/png",
+ "minScale": 1
+ }
+ },
+ "options": {
+ "projection": {
+ "proj4": "+proj=longlat +datum=WGS84 +no_defs",
+ "ref": "EPSG:4326"
+ },
+ "initialExtent": [
+ -7.68500431446,
+ 42.5244137172,
+ 4.50530473346,
+ 49.5897853926
+ ],
+ "maxScale": 5000000,
+ "tmTimeFrameType": "seconds",
+ "mapScales": [
+ 10000,
+ 25000,
+ 50000,
+ 100000,
+ 250000,
+ 500000,
+ 1000000,
+ 2500000,
+ 5000000
+ ],
+ "tmTimeFrameSize": 10,
+ "tmAnimationFrameLength": 1000,
+ "bbox": [
+ -7.68500431446,
+ 42.5244137172,
+ 4.50530473346,
+ 49.5897853926
+ ],
+ "minScale": 10000
+ }
+}
Added: trunk/echobase-ui/src/main/resources/lizmap/templates/QgisTemplate.qgs
===================================================================
--- trunk/echobase-ui/src/main/resources/lizmap/templates/QgisTemplate.qgs (rev 0)
+++ trunk/echobase-ui/src/main/resources/lizmap/templates/QgisTemplate.qgs 2014-06-18 16:03:21 UTC (rev 1033)
@@ -0,0 +1,4530 @@
+<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
+<qgis projectname="{{voyagenName}}" version="2.2.0-Valmiera">
+ <title>{{voyageName}}</title>
+ <relations/>
+ <mapcanvas>
+ <units>degrees</units>
+ <extent>
+ <xmin>-3.96649059493348632</xmin>
+ <ymin>43.98854181775456595</ymin>
+ <xmax>-0.91891333295472366</xmax>
+ <ymax>45.75488473660361421</ymax>
+ </extent>
+ <projections>1</projections>
+ <destinationsrs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </destinationsrs>
+ <layer_coordinate_transform_info/>
+ </mapcanvas>
+ <legend updateDrawingOrder="true" activeLayer="totalcatchspopwide{{voyageId}}">
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Country" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="country{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Unchecked" name="Anchovy biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="cellesduviewspeciesbiomass{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Sardine biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="Anchovy_biomass_copier{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Sprat biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="Sardine_biomass_copier{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Horse mackerel biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="Sprat_biomass_copier{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Mackerel biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="Horse_mackerel_biomass_copier{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Blue whitting biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="Mackerel_biomass_copier{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Pelagic trawl catch" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="totalcatchspopwide{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Unchecked" name="Sprat mean biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="meanmapcellbiomassspraspr{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Unchecked" name="Horse mackerel mean biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="meanmapcellbiomasstractru{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Unchecked" name="Mackerel mean biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="meanmapcellbiomassscomsco{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="false" checked="Qt::Unchecked" name="Sardine mean biomass" showFeatureCount="0">
+ <filegroup open="false" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="meanmapcellbiomasssardpil{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="false" checked="Qt::Unchecked" name="Blue whitting mean biomass" showFeatureCount="0">
+ <filegroup open="false" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="meanmapcellbiomassmicrpou{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Unchecked" name="Anchovy mean biomass" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="meanmapcellbiomassengrenc{{voyageId}}" visible="0"/>
+ </filegroup>
+ </legendlayer>
+ <legendlayer drawingOrder="-1" open="false" checked="Qt::Checked" name="Bathymetry" showFeatureCount="0">
+ <filegroup open="false" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="pelgas{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ </legend>
+ <projectlayers layercount="15">
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>Anchovy_biomass_copier{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."cellesduviewspeciesbiomass" (coordinate) sql="baracoudacode" ='SARD-PIL'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Sardine biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="1.084138" label="0.0000 - 1.0841"/>
+ <range symbol="1" lower="1.084138" upper="2.168277" label="1.0841 - 2.1683"/>
+ <range symbol="2" lower="2.168277" upper="3.252415" label="2.1683 - 3.2524"/>
+ <range symbol="3" lower="3.252415" upper="4.336553" label="3.2524 - 4.3366"/>
+ <range symbol="4" lower="4.336553" upper="5.420692" label="4.3366 - 5.4207"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="247,251,255,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="1">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="199,220,239,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="2">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="114,178,215,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="3">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="40,120,184,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="4">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="8,48,107,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="136,5,223,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="247,251,255,255"/>
+ <prop k="color2" v="8,48,107,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.13;222,235,247,255:0.26;198,219,239,255:0.39;158,202,225,255:0.52;107,174,214,255:0.65;66,146,198,255:0.78;33,113,181,255:0.9;8,81,156,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="nbresults"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>C:/Users/mdoray.IFR/Desktop</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>Horse_mackerel_biomass_copier{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."cellesduviewspeciesbiomass" (coordinate) sql="baracoudacode" ='SCOM-SCO'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Mackerel biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.955572" label="0.0000 - 0.9556"/>
+ <range symbol="1" lower="0.955572" upper="1.911144" label="0.9556 - 1.9111"/>
+ <range symbol="2" lower="1.911144" upper="2.866717" label="1.9111 - 2.8667"/>
+ <range symbol="3" lower="2.866717" upper="3.822289" label="2.8667 - 3.8223"/>
+ <range symbol="4" lower="3.822289" upper="4.777861" label="3.8223 - 4.7779"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="255,245,240,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="1">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="252,189,164,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="2">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="251,112,80,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="3">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="211,32,32,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="4">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="103,0,13,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="136,5,223,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="255,245,240,255"/>
+ <prop k="color2" v="103,0,13,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.13;254,224,210,255:0.26;252,187,161,255:0.39;252,146,114,255:0.52;251,106,74,255:0.65;239,59,44,255:0.78;203,24,29,255:0.9;165,15,21,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="nbresults"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>C:/Users/mdoray.IFR/Desktop</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>Mackerel_biomass_copier{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."cellesduviewspeciesbiomass" (coordinate) sql="baracoudacode" ='MICR-POU'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Blue whitting biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.955572" label="0.0000 - 0.9556"/>
+ <range symbol="1" lower="0.955572" upper="1.911144" label="0.9556 - 1.9111"/>
+ <range symbol="2" lower="1.911144" upper="2.866717" label="1.9111 - 2.8667"/>
+ <range symbol="3" lower="2.866717" upper="3.822289" label="2.8667 - 3.8223"/>
+ <range symbol="4" lower="3.822289" upper="4.777861" label="3.8223 - 4.7779"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="240,249,232,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="1">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="186,228,188,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="2">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="123,204,196,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="3">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="67,162,202,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="4">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="8,104,172,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="136,5,223,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="240,249,232,255"/>
+ <prop k="color2" v="8,104,172,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.25;186,228,188,255:0.5;123,204,196,255:0.75;67,162,202,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="nbresults"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>C:/Users/mdoray.IFR/Desktop</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>Sardine_biomass_copier{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."cellesduviewspeciesbiomass" (coordinate) sql="baracoudacode" ='SPRA-SPR'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Sprat biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="1.065658" label="0.0000 - 1.0657"/>
+ <range symbol="1" lower="1.065658" upper="2.131317" label="1.0657 - 2.1313"/>
+ <range symbol="2" lower="2.131317" upper="3.196975" label="2.1313 - 3.1970"/>
+ <range symbol="3" lower="3.196975" upper="4.262634" label="3.1970 - 4.2626"/>
+ <range symbol="4" lower="4.262634" upper="5.328292" label="4.2626 - 5.3283"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="250,250,250,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="1">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="188,188,188,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="2">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="127,127,127,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="3">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="66,66,66,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="4">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="5,5,5,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="136,5,223,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="250,250,250,255"/>
+ <prop k="color2" v="5,5,5,255"/>
+ <prop k="discrete" v="0"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="nbresults"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>C:/Users/mdoray.IFR/Desktop</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>Sprat_biomass_copier{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."cellesduviewspeciesbiomass" (coordinate) sql="baracoudacode" ='TRAC-TRU'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Horse mackerel biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="1.065658" label="0.0000 - 1.0657"/>
+ <range symbol="1" lower="1.065658" upper="2.131317" label="1.0657 - 2.1313"/>
+ <range symbol="2" lower="2.131317" upper="3.196975" label="2.1313 - 3.1970"/>
+ <range symbol="3" lower="3.196975" upper="4.262634" label="3.1970 - 4.2626"/>
+ <range symbol="4" lower="4.262634" upper="5.328292" label="4.2626 - 5.3283"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="255,255,212,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="1">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="254,217,142,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="2">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="254,153,41,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="3">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="217,95,14,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="4">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="153,52,4,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="136,5,223,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="255,255,212,255"/>
+ <prop k="color2" v="153,52,4,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.25;254,217,142,255:0.5;254,153,41,255:0.75;217,95,14,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="nbresults"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>C:/Users/mdoray.IFR/Desktop</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>cellesduviewspeciesbiomass{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."cellesduviewspeciesbiomass" (coordinate) sql="baracoudacode" = 'ENGR-ENC'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Anchovy biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="1.084138" label="0.0000 - 1.0841"/>
+ <range symbol="1" lower="1.084138" upper="2.168277" label="1.0841 - 2.1683"/>
+ <range symbol="2" lower="2.168277" upper="3.252415" label="2.1683 - 3.2524"/>
+ <range symbol="3" lower="3.252415" upper="4.336553" label="3.2524 - 4.3366"/>
+ <range symbol="4" lower="4.336553" upper="5.420692" label="4.3366 - 5.4207"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="247,252,245,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="1">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="201,233,194,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="2">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="122,199,123,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="3">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="41,146,74,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="marker" name="4">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="0,68,27,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="136,5,223,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="2"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="247,252,245,255"/>
+ <prop k="color2" v="0,68,27,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.13;229,245,224,255:0.26;199,233,192,255:0.39;161,217,155,255:0.52;116,196,118,255:0.65;65,171,93,255:0.78;35,139,69,255:0.9;0,109,44,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="nbresults"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>.</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>country{{voyageId}}</id>
+ <datasource>{{resourcesPath}}/France&Spain.shp</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Country</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">ogr</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 symbollevels="0" type="singleSymbol">
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="0,170,127,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="11"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>CNTRYNAME</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="Ubuntu"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="CNTRYABBR"/>
+ <edittype labelontop="0" editable="1" type="0" name="CNTRYNAME"/>
+ <edittype labelontop="0" editable="1" type="0" name="NATION"/>
+ </edittypes>
+ <editform>../../../Bureau</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>../../../Bureau</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>meanmapcellbiomassengrenc{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POLYGON table="public"."meanmapcellbiomassengrenc" (shape) sql=</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Anchovy mean biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.318132" label="0.0000 - 0.3181"/>
+ <range symbol="1" lower="0.318132" upper="0.636265" label="0.3181 - 0.6363"/>
+ <range symbol="2" lower="0.636265" upper="0.954397" label="0.6363 - 0.9544"/>
+ <range symbol="3" lower="0.954397" upper="1.272530" label="0.9544 - 1.2725"/>
+ <range symbol="4" lower="1.272530" upper="1.590662" label="1.2725 - 1.5907"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="247,252,245,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="201,233,194,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="122,199,123,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="41,146,74,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="0,68,27,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="80,223,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="247,252,245,255"/>
+ <prop k="color2" v="0,68,27,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.13;229,245,224,255:0.26;199,233,192,255:0.39;161,217,155,255:0.52;116,196,118,255:0.65;65,171,93,255:0.78;35,139,69,255:0.9;0,109,44,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="name"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>.</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>meanmapcellbiomassmicrpou{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POLYGON table="public"."meanmapcellbiomassmicrpou" (shape) sql=</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Blue whitting mean biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.318132" label="0.0000 - 0.3181"/>
+ <range symbol="1" lower="0.318132" upper="0.636265" label="0.3181 - 0.6363"/>
+ <range symbol="2" lower="0.636265" upper="0.954397" label="0.6363 - 0.9544"/>
+ <range symbol="3" lower="0.954397" upper="1.272530" label="0.9544 - 1.2725"/>
+ <range symbol="4" lower="1.272530" upper="1.590662" label="1.2725 - 1.5907"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="240,249,232,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="186,228,188,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="123,204,196,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="67,162,202,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="8,104,172,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="80,223,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="240,249,232,255"/>
+ <prop k="color2" v="8,104,172,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.25;186,228,188,255:0.5;123,204,196,255:0.75;67,162,202,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="name"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>meanmapcellbiomasssardpil{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POLYGON table="public"."meanmapcellbiomasssardpil" (shape) sql=</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Sardine mean biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.318132" label="0.0000 - 0.3181"/>
+ <range symbol="1" lower="0.318132" upper="0.636265" label="0.3181 - 0.6363"/>
+ <range symbol="2" lower="0.636265" upper="0.954397" label="0.6363 - 0.9544"/>
+ <range symbol="3" lower="0.954397" upper="1.272530" label="0.9544 - 1.2725"/>
+ <range symbol="4" lower="1.272530" upper="1.590662" label="1.2725 - 1.5907"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="247,251,255,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="199,220,239,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="114,178,215,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="40,120,184,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="8,48,107,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="80,223,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="247,251,255,255"/>
+ <prop k="color2" v="8,48,107,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.13;222,235,247,255:0.26;198,219,239,255:0.39;158,202,225,255:0.52;107,174,214,255:0.65;66,146,198,255:0.78;33,113,181,255:0.9;8,81,156,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="name"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>meanmapcellbiomassscomsco{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POLYGON table="public"."meanmapcellbiomassscomsco" (shape) sql=</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Mackerel mean biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.318132" label="0.0000 - 0.3181"/>
+ <range symbol="1" lower="0.318132" upper="0.636265" label="0.3181 - 0.6363"/>
+ <range symbol="2" lower="0.636265" upper="0.954397" label="0.6363 - 0.9544"/>
+ <range symbol="3" lower="0.954397" upper="1.272530" label="0.9544 - 1.2725"/>
+ <range symbol="4" lower="1.272530" upper="1.590662" label="1.2725 - 1.5907"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="255,245,240,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="252,189,164,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="251,112,80,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="211,32,32,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="103,0,13,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="80,223,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="255,245,240,255"/>
+ <prop k="color2" v="103,0,13,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.13;254,224,210,255:0.26;252,187,161,255:0.39;252,146,114,255:0.52;251,106,74,255:0.65;239,59,44,255:0.78;203,24,29,255:0.9;165,15,21,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="name"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>meanmapcellbiomassspraspr{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POLYGON table="public"."meanmapcellbiomassspraspr" (shape) sql=</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Sprat mean biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.318132" label="0.0000 - 0.3181"/>
+ <range symbol="1" lower="0.318132" upper="0.636265" label="0.3181 - 0.6363"/>
+ <range symbol="2" lower="0.636265" upper="0.954397" label="0.6363 - 0.9544"/>
+ <range symbol="3" lower="0.954397" upper="1.272530" label="0.9544 - 1.2725"/>
+ <range symbol="4" lower="1.272530" upper="1.590662" label="1.2725 - 1.5907"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="250,250,250,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="188,188,188,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="127,127,127,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="66,66,66,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="5,5,5,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="80,223,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="250,250,250,255"/>
+ <prop k="color2" v="5,5,5,255"/>
+ <prop k="discrete" v="0"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="name"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>meanmapcellbiomasstractru{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POLYGON table="public"."meanmapcellbiomasstractru" (shape) sql=</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Horse mackerel mean biomass</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr=" log10( resultvalue+1)" symbollevels="0" type="graduatedSymbol">
+ <ranges>
+ <range symbol="0" lower="0.000000" upper="0.318132" label="0.0000 - 0.3181"/>
+ <range symbol="1" lower="0.318132" upper="0.636265" label="0.3181 - 0.6363"/>
+ <range symbol="2" lower="0.636265" upper="0.954397" label="0.6363 - 0.9544"/>
+ <range symbol="3" lower="0.954397" upper="1.272530" label="0.9544 - 1.2725"/>
+ <range symbol="4" lower="1.272530" upper="1.590662" label="1.2725 - 1.5907"/>
+ </ranges>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="255,255,212,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="254,217,142,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="254,153,41,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="217,95,14,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="153,52,4,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <source-symbol>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="80,223,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </source-symbol>
+ <colorramp type="gradient" name="[source]">
+ <prop k="color1" v="255,255,212,255"/>
+ <prop k="color2" v="153,52,4,255"/>
+ <prop k="discrete" v="0"/>
+ <prop k="stops" v="0.25;254,217,142,255:0.5;254,153,41,255:0.75;217,95,14,255"/>
+ </colorramp>
+ <invertedcolorramp value="0"/>
+ <mode name="equal"/>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="baracoudacode"/>
+ <edittype labelontop="0" editable="1" type="0" name="cellname"/>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="name"/>
+ <edittype labelontop="0" editable="1" type="0" name="resultvalue"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>C:/Users/mdoray.IFR/Desktop</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="1">
+ <id>pelgas{{voyageId}}</id>
+ <datasource>{{resourcesPath}}/pelgas09.shp</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Bathymetry</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">ogr</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 attr="SONDE" symbollevels="0" type="categorizedSymbol">
+ <categories>
+ <category symbol="0" value="" label=""/>
+ <category symbol="1" value="0" label="0"/>
+ <category symbol="2" value="20" label="20"/>
+ <category symbol="3" value="50" label="50"/>
+ <category symbol="4" value="100" label="100"/>
+ <category symbol="5" value="200" label="200"/>
+ <category symbol="6" value="500" label="500"/>
+ <category symbol="7" value="1000" label="1000"/>
+ <category symbol="8" value="2000" label="2000"/>
+ <category symbol="9" value="3000" label="3000"/>
+ <category symbol="10" value="4000" label="4000"/>
+ <category symbol="11" value="5000" label="5000"/>
+ <category symbol="12" value="6000" label="6000"/>
+ </categories>
+ <symbols>
+ <symbol alpha="1" type="fill" name="0">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="8,48,107,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="solid"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="1">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="0,170,127,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="10">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="40,120,184,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="11">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="21,98,169,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="12">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="8,75,147,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="2">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="230,240,249,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="3">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="215,230,244,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="4">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="199,220,239,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="5">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="175,209,231,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="6">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="147,196,222,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="7">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="114,178,215,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="8">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="87,160,206,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ <symbol alpha="1" type="fill" name="9">
+ <layer pass="0" class="SimpleFill" locked="0">
+ <prop k="border_width_unit" v="MM"/>
+ <prop k="color" v="61,141,195,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="style" v="solid"/>
+ <prop k="style_border" v="no"/>
+ <prop k="width_border" v="0.26"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>DEEPEST</displayfield>
+ <label>0</label>
+ <labelfield>DEEPEST</labelfield>
+ <labelattributes>
+ <label fieldname="DEEPEST" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="13"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="DEEPEST"/>
+ <edittype labelontop="0" editable="1" type="0" name="SONDE"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>.</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
+ <id>totalcatchspopwide{{voyageId}}</id>
+ <datasource>dbname='{{dbname}}' host='{{host}}' port='{{port}}' user='{{userName}}' password='{{password}}' sslmode=require key='id' srid=4326 type=POINT table="public"."totalcatchspopwide" (coordinate) sql= "voyagename" = '{{voyageName}}'</datasource>
+ <title></title>
+ <abstract></abstract>
+ <keywordList>
+ <value></value>
+ </keywordList>
+ <layername>Pelagic trawl catch</layername>
+ <srs>
+ <spatialrefsys>
+ <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
+ <srsid>3452</srsid>
+ <srid>4326</srid>
+ <authid>EPSG:4326</authid>
+ <description>WGS 84</description>
+ <projectionacronym>longlat</projectionacronym>
+ <ellipsoidacronym>WGS84</ellipsoidacronym>
+ <geographicflag>true</geographicflag>
+ </spatialrefsys>
+ </srs>
+ <provider encoding="System">postgres</provider>
+ <previewExpression></previewExpression>
+ <vectorjoins/>
+ <renderer-v2 symbollevels="0" type="singleSymbol">
+ <symbols>
+ <symbol alpha="1" type="marker" name="0">
+ <layer pass="0" class="SimpleMarker" locked="0">
+ <prop k="angle" v="0"/>
+ <prop k="color" v="92,179,189,255"/>
+ <prop k="color_border" v="0,0,0,255"/>
+ <prop k="horizontal_anchor_point" v="1"/>
+ <prop k="name" v="circle"/>
+ <prop k="offset" v="0,0"/>
+ <prop k="offset_unit" v="MM"/>
+ <prop k="outline_style" v="solid"/>
+ <prop k="outline_width" v="0"/>
+ <prop k="outline_width_unit" v="MM"/>
+ <prop k="scale_method" v="area"/>
+ <prop k="size" v="0"/>
+ <prop k="size_unit" v="MM"/>
+ <prop k="vertical_anchor_point" v="1"/>
+ </layer>
+ </symbol>
+ </symbols>
+ <rotation/>
+ <sizescale scalemethod="area"/>
+ </renderer-v2>
+ <customproperties>
+ <property key="labeling" value="pal"/>
+ <property key="labeling/addDirectionSymbol" value="false"/>
+ <property key="labeling/angleOffset" value="0"/>
+ <property key="labeling/blendMode" value="0"/>
+ <property key="labeling/bufferBlendMode" value="0"/>
+ <property key="labeling/bufferColorA" value="255"/>
+ <property key="labeling/bufferColorB" value="255"/>
+ <property key="labeling/bufferColorG" value="255"/>
+ <property key="labeling/bufferColorR" value="255"/>
+ <property key="labeling/bufferDraw" value="false"/>
+ <property key="labeling/bufferJoinStyle" value="64"/>
+ <property key="labeling/bufferNoFill" value="false"/>
+ <property key="labeling/bufferSize" value="1"/>
+ <property key="labeling/bufferSizeInMapUnits" value="false"/>
+ <property key="labeling/bufferTransp" value="0"/>
+ <property key="labeling/centroidWhole" value="false"/>
+ <property key="labeling/decimals" value="3"/>
+ <property key="labeling/displayAll" value="false"/>
+ <property key="labeling/dist" value="0"/>
+ <property key="labeling/distInMapUnits" value="false"/>
+ <property key="labeling/enabled" value="false"/>
+ <property key="labeling/fieldName" value=""/>
+ <property key="labeling/fontBold" value="false"/>
+ <property key="labeling/fontCapitals" value="0"/>
+ <property key="labeling/fontFamily" value="MS Shell Dlg 2"/>
+ <property key="labeling/fontItalic" value="false"/>
+ <property key="labeling/fontLetterSpacing" value="0"/>
+ <property key="labeling/fontLimitPixelSize" value="false"/>
+ <property key="labeling/fontMaxPixelSize" value="10000"/>
+ <property key="labeling/fontMinPixelSize" value="3"/>
+ <property key="labeling/fontSize" value="8.25"/>
+ <property key="labeling/fontSizeInMapUnits" value="false"/>
+ <property key="labeling/fontStrikeout" value="false"/>
+ <property key="labeling/fontUnderline" value="false"/>
+ <property key="labeling/fontWeight" value="50"/>
+ <property key="labeling/fontWordSpacing" value="0"/>
+ <property key="labeling/formatNumbers" value="false"/>
+ <property key="labeling/isExpression" value="false"/>
+ <property key="labeling/labelOffsetInMapUnits" value="true"/>
+ <property key="labeling/labelPerPart" value="false"/>
+ <property key="labeling/leftDirectionSymbol" value="<"/>
+ <property key="labeling/limitNumLabels" value="false"/>
+ <property key="labeling/maxCurvedCharAngleIn" value="20"/>
+ <property key="labeling/maxCurvedCharAngleOut" value="-20"/>
+ <property key="labeling/maxNumLabels" value="2000"/>
+ <property key="labeling/mergeLines" value="false"/>
+ <property key="labeling/minFeatureSize" value="0"/>
+ <property key="labeling/multilineAlign" value="0"/>
+ <property key="labeling/multilineHeight" value="1"/>
+ <property key="labeling/namedStyle" value="Normal"/>
+ <property key="labeling/obstacle" value="true"/>
+ <property key="labeling/placeDirectionSymbol" value="0"/>
+ <property key="labeling/placement" value="0"/>
+ <property key="labeling/placementFlags" value="0"/>
+ <property key="labeling/plussign" value="false"/>
+ <property key="labeling/preserveRotation" value="true"/>
+ <property key="labeling/previewBkgrdColor" value="#ffffff"/>
+ <property key="labeling/priority" value="5"/>
+ <property key="labeling/quadOffset" value="4"/>
+ <property key="labeling/reverseDirectionSymbol" value="false"/>
+ <property key="labeling/rightDirectionSymbol" value=">"/>
+ <property key="labeling/scaleMax" value="10000000"/>
+ <property key="labeling/scaleMin" value="1"/>
+ <property key="labeling/scaleVisibility" value="false"/>
+ <property key="labeling/shadowBlendMode" value="6"/>
+ <property key="labeling/shadowColorB" value="0"/>
+ <property key="labeling/shadowColorG" value="0"/>
+ <property key="labeling/shadowColorR" value="0"/>
+ <property key="labeling/shadowDraw" value="false"/>
+ <property key="labeling/shadowOffsetAngle" value="135"/>
+ <property key="labeling/shadowOffsetDist" value="1"/>
+ <property key="labeling/shadowOffsetGlobal" value="true"/>
+ <property key="labeling/shadowOffsetUnits" value="1"/>
+ <property key="labeling/shadowRadius" value="1.5"/>
+ <property key="labeling/shadowRadiusAlphaOnly" value="false"/>
+ <property key="labeling/shadowRadiusUnits" value="1"/>
+ <property key="labeling/shadowScale" value="100"/>
+ <property key="labeling/shadowTransparency" value="30"/>
+ <property key="labeling/shadowUnder" value="0"/>
+ <property key="labeling/shapeBlendMode" value="0"/>
+ <property key="labeling/shapeBorderColorA" value="255"/>
+ <property key="labeling/shapeBorderColorB" value="128"/>
+ <property key="labeling/shapeBorderColorG" value="128"/>
+ <property key="labeling/shapeBorderColorR" value="128"/>
+ <property key="labeling/shapeBorderWidth" value="0"/>
+ <property key="labeling/shapeBorderWidthUnits" value="1"/>
+ <property key="labeling/shapeDraw" value="false"/>
+ <property key="labeling/shapeFillColorA" value="255"/>
+ <property key="labeling/shapeFillColorB" value="255"/>
+ <property key="labeling/shapeFillColorG" value="255"/>
+ <property key="labeling/shapeFillColorR" value="255"/>
+ <property key="labeling/shapeJoinStyle" value="64"/>
+ <property key="labeling/shapeOffsetUnits" value="1"/>
+ <property key="labeling/shapeOffsetX" value="0"/>
+ <property key="labeling/shapeOffsetY" value="0"/>
+ <property key="labeling/shapeRadiiUnits" value="1"/>
+ <property key="labeling/shapeRadiiX" value="0"/>
+ <property key="labeling/shapeRadiiY" value="0"/>
+ <property key="labeling/shapeRotation" value="0"/>
+ <property key="labeling/shapeRotationType" value="0"/>
+ <property key="labeling/shapeSVGFile" value=""/>
+ <property key="labeling/shapeSizeType" value="0"/>
+ <property key="labeling/shapeSizeUnits" value="1"/>
+ <property key="labeling/shapeSizeX" value="0"/>
+ <property key="labeling/shapeSizeY" value="0"/>
+ <property key="labeling/shapeTransparency" value="0"/>
+ <property key="labeling/shapeType" value="0"/>
+ <property key="labeling/textColorA" value="255"/>
+ <property key="labeling/textColorB" value="0"/>
+ <property key="labeling/textColorG" value="0"/>
+ <property key="labeling/textColorR" value="0"/>
+ <property key="labeling/textTransp" value="0"/>
+ <property key="labeling/upsidedownLabels" value="0"/>
+ <property key="labeling/wrapChar" value=""/>
+ <property key="labeling/xOffset" value="0"/>
+ <property key="labeling/yOffset" value="0"/>
+ </customproperties>
+ <blendMode>0</blendMode>
+ <featureBlendMode>0</featureBlendMode>
+ <layerTransparency>0</layerTransparency>
+ <displayfield>voyagename</displayfield>
+ <label>0</label>
+ <labelattributes>
+ <label fieldname="" text="Étiquette"/>
+ <family fieldname="" name="MS Shell Dlg 2"/>
+ <size fieldname="" units="pt" value="12"/>
+ <bold fieldname="" on="0"/>
+ <italic fieldname="" on="0"/>
+ <underline fieldname="" on="0"/>
+ <strikeout fieldname="" on="0"/>
+ <color fieldname="" red="0" blue="0" green="0"/>
+ <x fieldname=""/>
+ <y fieldname=""/>
+ <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
+ <angle fieldname="" value="0" auto="0"/>
+ <alignment fieldname="" value="center"/>
+ <buffercolor fieldname="" red="255" blue="255" green="255"/>
+ <buffersize fieldname="" units="pt" value="1"/>
+ <bufferenabled fieldname="" on=""/>
+ <multilineenabled fieldname="" on=""/>
+ <selectedonly on=""/>
+ </labelattributes>
+ <SingleCategoryDiagramRenderer diagramType="Pie">
+ <DiagramCategory penColor="#000000" labelPlacementMethod="XHeight" penWidth="0" diagramOrientation="Up" minimumSize="0" barWidth="5" penAlpha="255" maxScaleDenominator="-1" font="MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0" backgroundColor="#ffffff" transparency="0" width="10" scaleDependency="Area" backgroundAlpha="255" angleOffset="1440" height="10" sizeType="MM" minScaleDenominator="-1">
+ <attribute field=""totalcatchengrenc"" color="#00aa00"/>
+ <attribute field=""totalcatchsardpil"" color="#180aee"/>
+ <attribute field=""totalcatchspraspr"" color="#000000"/>
+ <attribute field=""totalcatchmicrpou"" color="#ffd0d0"/>
+ <attribute field=""totalcatchscomsco"" color="#ff0000"/>
+ <attribute field=""totalcatchtractru"" color="#ffff00"/>
+ </DiagramCategory>
+ </SingleCategoryDiagramRenderer>
+ <DiagramLayerSettings yPosColumn="-1" linePlacementFlags="0" placement="1" dist="0" xPosColumn="-1" priority="0" obstacle="0"/>
+ <edittypes>
+ <edittype labelontop="0" editable="1" type="0" name="id"/>
+ <edittype labelontop="0" editable="1" type="0" name="operationname"/>
+ <edittype labelontop="0" editable="1" type="0" name="totalcatchengrenc"/>
+ <edittype labelontop="0" editable="1" type="0" name="totalcatchmicrpou"/>
+ <edittype labelontop="0" editable="1" type="0" name="totalcatchsardpil"/>
+ <edittype labelontop="0" editable="1" type="0" name="totalcatchscomsco"/>
+ <edittype labelontop="0" editable="1" type="0" name="totalcatchspraspr"/>
+ <edittype labelontop="0" editable="1" type="0" name="totalcatchtractru"/>
+ <edittype labelontop="0" editable="1" type="0" name="voyagename"/>
+ </edittypes>
+ <editform>.</editform>
+ <editforminit></editforminit>
+ <featformsuppress>0</featformsuppress>
+ <annotationform>.</annotationform>
+ <editorlayout>generatedlayout</editorlayout>
+ <excludeAttributesWMS/>
+ <excludeAttributesWFS/>
+ <attributeactions/>
+ </maplayer>
+ </projectlayers>
+ <properties>
+ <WMSContactPerson type="QString"></WMSContactPerson>
+ <WMSOnlineResource type="QString"></WMSOnlineResource>
+ <WMSContactOrganization type="QString"></WMSContactOrganization>
+ <WMSExtent type="QStringList">
+ <value>-7.68500431446</value>
+ <value>42.5244137172</value>
+ <value>4.50530473346</value>
+ <value>49.5897853926</value>
+ </WMSExtent>
+ <WMSKeywordList type="QStringList">
+ <value></value>
+ </WMSKeywordList>
+ <WFSUrl type="QString"></WFSUrl>
+ <Paths>
+ <Absolute type="bool">false</Absolute>
+ </Paths>
+ <WMSServiceTitle type="QString">{{voyageName}}</WMSServiceTitle>
+ <WFSLayers type="QStringList"/>
+ <WMSContactMail type="QString"></WMSContactMail>
+ <PositionPrecision>
+ <DecimalPlaces type="int">2</DecimalPlaces>
+ <Automatic type="bool">true</Automatic>
+ <DegreeFormat type="QString">D</DegreeFormat>
+ </PositionPrecision>
+ <WCSUrl type="QString"></WCSUrl>
+ <WMSContactPhone type="QString"></WMSContactPhone>
+ <WMSServiceCapabilities type="QString">True</WMSServiceCapabilities>
+ <WMSServiceAbstract type="QString"></WMSServiceAbstract>
+ <WMSAddWktGeometry type="bool">false</WMSAddWktGeometry>
+ <Measure>
+ <Ellipsoid type="QString">WGS84</Ellipsoid>
+ </Measure>
+ <WFSTLayers>
+ <Insert type="QStringList"/>
+ <Update type="QStringList"/>
+ <Delete type="QStringList"/>
+ </WFSTLayers>
+ <PAL>
+ <SearchMethod type="int">0</SearchMethod>
+ <ShowingShadowRects type="bool">false</ShowingShadowRects>
+ <CandidatesPolygon type="int">8</CandidatesPolygon>
+ <ShowingCandidates type="bool">false</ShowingCandidates>
+ <ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
+ <CandidatesLine type="int">8</CandidatesLine>
+ <CandidatesPoint type="int">8</CandidatesPoint>
+ <ShowingAllLabels type="bool">true</ShowingAllLabels>
+ </PAL>
+ <Gui>
+ <SelectionColorBluePart type="int">0</SelectionColorBluePart>
+ <CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
+ <CanvasColorRedPart type="int">255</CanvasColorRedPart>
+ <SelectionColorRedPart type="int">255</SelectionColorRedPart>
+ <SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
+ <SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
+ <CanvasColorBluePart type="int">255</CanvasColorBluePart>
+ </Gui>
+ <Identify>
+ <disabledLayers type="QStringList"/>
+ </Identify>
+ <Macros>
+ <pythonCode type="QString"></pythonCode>
+ </Macros>
+ <WMSAccessConstraints type="QString"></WMSAccessConstraints>
+ <WCSLayers type="QStringList"/>
+ <SpatialRefSys>
+ <ProjectCRSProj4String type="QString">+proj=longlat +datum=WGS84 +no_defs</ProjectCRSProj4String>
+ <ProjectCrs type="QString">EPSG:4326</ProjectCrs>
+ <ProjectCRSID type="int">3452</ProjectCRSID>
+ <ProjectionsEnabled type="int">1</ProjectionsEnabled>
+ </SpatialRefSys>
+ <DefaultStyles>
+ <Fill type="QString"></Fill>
+ <Line type="QString"></Line>
+ <Marker type="QString"></Marker>
+ <RandomColors type="bool">true</RandomColors>
+ <AlphaInt type="int">255</AlphaInt>
+ <ColorRamp type="QString"></ColorRamp>
+ </DefaultStyles>
+ <WMSFees type="QString"></WMSFees>
+ <WMSUrl type="QString"></WMSUrl>
+ </properties>
+</qgis>
Modified: trunk/src/site/rst/install.rst.vm
===================================================================
--- trunk/src/site/rst/install.rst.vm 2014-06-18 09:24:50 UTC (rev 1032)
+++ trunk/src/site/rst/install.rst.vm 2014-06-18 16:03:21 UTC (rev 1033)
@@ -141,14 +141,14 @@
| |-- logs
| | `-- echobase.log
| `-- lizmap
- | |-- data
+ | |-- resources
| | |-- France&Spain.shp
| | |-- pelgas09.shp
| | `-- ...
- | |-- qgis
+ | |-- projects
| `-- templates
- | |-- {{voyageName}}.qgs
- | |-- {{voyageName}}.qgs.cfg
+ | |-- QgisTemplate.qgs
+ | |-- LizmapTemplate.qgs.cfg
| `-- ...
|-- echobase.war
`-- war
@@ -253,10 +253,10 @@
* **/var/local/echobase/data/lizmap/templates** contient deux fichiers de modèles :
- * **{{voyageName}}.qgs** est le fichier de project Qgis
- * **{{voyageName}}.qgs.cfg** est généré par le plugin lizmap de Qgis.
+ * **QgisTemplate.qgs** est le fichier de project Qgis
+ * **LizmapTemplate.qgs.cfg** est généré par le plugin lizmap de Qgis.
- Dans ses fichiers, les références à la base de données et au voyage sont remplacer par des balises suivantes :
+ Dans ses fichiers, les références à la base de données, au voyage et aux resources externes sont remplacer par des balises suivantes :
* *{{dbName}}* : le nom de la base de données,
* *{{host}}* : l'adresse du serveur de base,
@@ -264,13 +264,14 @@
* *{{userName}}* : le identitfiant de connexion,
* *{{password}}* : le mot de passe,
* *{{voyageName}}* : le label du voyage,
- * *{{voyageId}}* : l'identifiant du voyage.
+ * *{{voyageId}}* : l'identifiant du voyage,
+ * *{{resourcesPath}}* : le chemin du répertoire des ressources.
.. Attention::
Deux fichiers Qgis ne doivent pas avoir des claques avec le même identifiant. Il faut donc ajouter à leurs valeurs l'indentifiant du voyage.
- * **{{voyageName}}.qgs**
+ * **QgisTemplate.qgs**
::
<qgis projectname="{{voyagenName}}" version="2.2.0-Valmiera">
@@ -290,7 +291,7 @@
<id>country{{voyageId}}</id>
...
- * **{{voyageName}}.qgs.cfg**
+ * **LizmapTemplate.qgs.cfg**
::
{
@@ -300,16 +301,17 @@
"id": "country{{voyageId}}",
...
- * **/var/local/echobase/data/lizmap/data** contient les fichiers de données utiles aux fichiers Qgis
+ * **/var/local/echobase/data/lizmap/resources** contient les fichiers de données utiles aux fichiers Qgis
- * **/var/local/echobase/data/lizmap/Qgis** répertoire de dépôt des fichiers de modèles une fois adaptés à une base de donnée et à un voyage.
+ * **/var/local/echobase/data/lizmap/projects** répertoire de dépôt des fichiers de modèles une fois adaptés à une base de donnée et à un voyage.
Ces répetoires et fichiers sont définis par les propriétées :
* echobase.qgis.template.file : le modèle du fichier Qgis
+ * echobase.qgis.resources.file : le répertoire de ressources des fichiers Qgis
* echobase.lizmap.template.file : le modièle du fichier de configuration de Lizmap
- * echobase.lizmap.target.file : le répertoire de dépôt des fichiers Qgis et lizmap
+ * echobase.lizmap.projects.file : le répertoire de dépôt des fichiers Qgis et lizmap
2. Configuration de lizmap
@@ -326,7 +328,7 @@
* *id* : l'identifiant du dépôt, doit etre identique à la propriété **echobase.lizmap.repository** (par défaut "echobase")
* *Label* : Le label utilisé par lizmap
- * *path* : le répertoire de dépôt des fichiers Qgis et lizmap (par défaut **/var/local/echobase/data/lizmap/Qgis/**) doit finir par un "/"
+ * *path* : le répertoire de dépôt des fichiers Qgis et lizmap (par défaut **/var/local/echobase/data/lizmap/projects/**) doit finir par un "/"
Cliquez sur *save*
1
0
Author: sbavencoff
Date: 2014-06-18 11:24:50 +0200 (Wed, 18 Jun 2014)
New Revision: 1032
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1032
Log:
refs #4194 : add VoyageId in layerId
Modified:
trunk/src/site/rst/install.rst.vm
Modified: trunk/src/site/rst/install.rst.vm
===================================================================
--- trunk/src/site/rst/install.rst.vm 2014-06-17 08:02:20 UTC (rev 1031)
+++ trunk/src/site/rst/install.rst.vm 2014-06-18 09:24:50 UTC (rev 1032)
@@ -266,6 +266,40 @@
* *{{voyageName}}* : le label du voyage,
* *{{voyageId}}* : l'identifiant du voyage.
+
+ .. Attention::
+ Deux fichiers Qgis ne doivent pas avoir des claques avec le même identifiant. Il faut donc ajouter à leurs valeurs l'indentifiant du voyage.
+
+ * **{{voyageName}}.qgs**
+ ::
+
+ <qgis projectname="{{voyagenName}}" version="2.2.0-Valmiera">
+ <title>{{voyageName}}</title>
+ <relations/>
+ <mapcanvas> ... </mapcanvas>
+ <legend updateDrawingOrder="true" activeLayer="country{{voyageId}}">
+ <legendlayer drawingOrder="-1" open="true" checked="Qt::Checked" name="Country" showFeatureCount="0">
+ <filegroup open="true" hidden="false">
+ <legendlayerfile isInOverview="0" layerid="country{{voyageId}}" visible="1"/>
+ </filegroup>
+ </legendlayer>
+ ...
+ </legend>
+ <projectlayers layercount="15">
+ <maplayer ...>
+ <id>country{{voyageId}}</id>
+ ...
+
+ * **{{voyageName}}.qgs.cfg**
+ ::
+
+ {
+ "layers": {
+ "country": {
+ ...
+ "id": "country{{voyageId}}",
+ ...
+
* **/var/local/echobase/data/lizmap/data** contient les fichiers de données utiles aux fichiers Qgis
* **/var/local/echobase/data/lizmap/Qgis** répertoire de dépôt des fichiers de modèles une fois adaptés à une base de donnée et à un voyage.
1
0
r1031 - in trunk: echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial
by sbavencoff@users.forge.codelutin.com 17 Jun '14
by sbavencoff@users.forge.codelutin.com 17 Jun '14
17 Jun '14
Author: sbavencoff
Date: 2014-06-17 10:02:20 +0200 (Tue, 17 Jun 2014)
New Revision: 1031
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/1031
Log:
refs #4194 : fixe bluid error in jenkins
Modified:
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-06-16 07:54:40 UTC (rev 1030)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-06-17 08:02:20 UTC (rev 1031)
@@ -21,6 +21,7 @@
* #L%
*/
+import com.google.common.base.Charsets;
import com.google.common.base.Preconditions;
import fr.ifremer.echobase.EchoBaseTechnicalException;
import fr.ifremer.echobase.entities.data.Voyage;
@@ -37,9 +38,8 @@
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.FileWriter;
import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
import java.util.Scanner;
/**
@@ -155,12 +155,25 @@
}
}
+
+ /**
+ * Generate map files for this database and this voyage.
+ * @param conf data base connexion configuration
+ * @param voyageId voyage identifier for this map
+ * @return Name of project map
+ */
public String generateMap(JdbcConfiguration conf, String voyageId) {
Preconditions.checkState(StringUtils.isNotBlank(voyageId));
Voyage voyage = persistenceService.getVoyage(voyageId);
return generateMap(conf, voyage);
}
+ /**
+ * Generate map files for this database and this voyage.
+ * @param conf data base connexion configuration
+ * @param voyage voyage for this map
+ * @return Name of project map
+ */
public String generateMap (JdbcConfiguration conf, Voyage voyage) {
Preconditions.checkNotNull(conf);
Preconditions.checkNotNull(voyage);
@@ -178,6 +191,12 @@
}
+ /**
+ * Generate file from template and values
+ * @param template file template to used
+ * @param templateValues values to used in the template
+ * @return file generated
+ */
protected File generateMapFile(File template, String[] templateValues) {
File lizmapTarget = getConfiguration().getLizmapTarget();
@@ -194,19 +213,19 @@
if (!target.isFile()) {
Scanner scanner = null;
- BufferedWriter writer = null;
+ BufferedWriter bufferedWriter = null;
try {
- scanner = new Scanner(template, StandardCharsets.UTF_8.name());
+ scanner = new Scanner(template, Charsets.UTF_8.name());
- writer = Files.newBufferedWriter(target.toPath(), StandardCharsets.UTF_8);
+ bufferedWriter = new BufferedWriter(new FileWriter(target));
String line;
while(scanner.hasNextLine() ) {
line = scanner.nextLine();
line = StringUtils.replaceEach(line, TEMPLATE_MARKUP, templateValues);
- writer.write(line);
- writer.newLine();
+ bufferedWriter.write(line);
+ bufferedWriter.newLine();
}
} catch (FileNotFoundException e) {
throw new EchoBaseTechnicalException(e);
@@ -214,9 +233,9 @@
throw new EchoBaseTechnicalException(e);
} finally {
scanner.close();
- if (writer != null) {
+ if (bufferedWriter != null) {
try {
- writer.close();
+ bufferedWriter.close();
} catch (IOException e) {
throw new EchoBaseTechnicalException(e);
}
@@ -228,6 +247,12 @@
}
+ /**
+ * Extract data value to used in template
+ * @param conf data base connexion configuration
+ * @param voyage voyage for this map
+ * @return values table
+ */
protected String[] getTemplateValues(JdbcConfiguration conf, Voyage voyage) {
String[] templateValues = new String[TEMPLATE_MARKUP.length];
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java 2014-06-16 07:54:40 UTC (rev 1030)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowMap.java 2014-06-17 08:02:20 UTC (rev 1031)
@@ -21,16 +21,13 @@
* #L%
*/
-import fr.ifremer.echobase.EchoBaseTechnicalException;
import fr.ifremer.echobase.persistence.JdbcConfiguration;
import fr.ifremer.echobase.services.service.spatial.SpatialService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.http.client.utils.URIBuilder;
import javax.inject.Inject;
-import java.net.URISyntaxException;
/**
* To display only the spatial data map.
@@ -63,16 +60,9 @@
}
public String getLizmapUrl() {
- String url = null;
- try {
- URIBuilder uriBuilder = new URIBuilder(getServiceContext().getConfiguration().getLizmapUrl());
- uriBuilder.addParameter("repository", getServiceContext().getConfiguration().getLizmapRepository());
- uriBuilder.addParameter("project", lizmpaProject);
- url = uriBuilder.build().toString();
-
- } catch (URISyntaxException e) {
- throw new EchoBaseTechnicalException(e);
- }
+ String url = getServiceContext().getConfiguration().getLizmapUrl() + "?" +
+ "repository=" + getServiceContext().getConfiguration().getLizmapRepository() + "&" +
+ "project=" + lizmpaProject;
return url;
}
1
0