Skip to content

Commit

Permalink
Merge pull request mviewer#856 from mviewer/develop
Browse files Browse the repository at this point in the history
Release 3.10
  • Loading branch information
lecault authored Dec 21, 2023
2 parents c4508ce + 37b01a5 commit bfdd3ae
Show file tree
Hide file tree
Showing 116 changed files with 7,544 additions and 1,141 deletions.
16 changes: 9 additions & 7 deletions apps/default.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
<application title="Mviewer" mouseposition="false" logo="" help="mviewer_help.html" measuretools="true" exportpng="true" style="css/themes/wet_asphalt.css" togglealllayersfromtheme="true"/>
<application title="Mviewer" mouseposition="false" logo="" help="mviewer_help.html" measuretools="true" mapprint="true" exportpng="true" style="css/themes/wet_asphalt.css" togglealllayersfromtheme="true"/>
<mapoptions maxzoom="19" projection="EPSG:3857" center="-220750.13768758904,6144925.57790189" zoom="8" projextent="-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244" />

<baselayers style="gallery">
<baselayer type="WMTS" id="ortho" label="Photo aérienne IGN" title="GéoPortail" maxscale="1000" thumbgallery="img/basemap/ortho.jpg"
url="https://wxs.ign.fr/essentiels/geoportail/wmts" layers="ORTHOIMAGERY.ORTHOPHOTOS" format="image/jpeg" visible="false" fromcapacity="false"
attribution="&lt;a href='https://geoservices.ign.fr/services-web-decouverte' target='_blank'>&lt;img src='img/basemap/geoservices.png'>&lt;/a>" style="normal" matrixset="PM" maxzoom="22"/>
<baselayer type="OSM" id="osm1" label="OpenStreetMap" title="OpenSTreetMap" thumbgallery="img/basemap/osm.png"
url="http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution="Données : les contributeurs d'&lt;a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap &lt;/a>, &lt;a href='https://www.openstreetmap.org/copyright' target='_blank'>ODbL &lt;/a>" visible="true"/>
url="https://data.geopf.fr/wmts" layers="ORTHOIMAGERY.ORTHOPHOTOS" format="image/jpeg" visible="false" fromcapacity="false"
attribution="&lt;a href='https://geoservices.ign.fr/services-geoplateforme-diffusion' target='_blank'>&lt;img src='img/basemap/geoservices.png'>&lt;/a>" style="normal" matrixset="PM" maxzoom="22"/>
<baselayer type="WMS" id="osm" label="OpenStreetMap" title="Plan OSM Géobretagne" thumbgallery="img/basemap/osm.png"
url="https://tile.geobretagne.fr/osm/service" layers="osm:grey" format="image/png" visible="true"
attribution="GéoBretagne. Données : les contributeurs d'&lt;a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap &lt;/a>, &lt;a href='https://www.openstreetmap.org/copyright' target='_blank'>ODbL &lt;/a>" />
</baselayers>
<proxy url=""/>
<olscompletion url="https://api-adresse.data.gouv.fr/search/" type="ban" attribution="La recherche d'adresse est un service proposé par la BAN"/>
<!-- <olscompletion url="https://api-adresse.data.gouv.fr/search/" type="ban" attribution="La recherche d'adresse est un service proposé par la BAN"/> -->
<olscompletion url="https://data.geopf.fr/geocodage/completion" type="ign" attribution="IGN"/>

<searchparameters bbox="false" localities="true" features="false" />

<themes>
Expand Down
90 changes: 90 additions & 0 deletions css/print.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
*
* Mviewer - print.css
* Propriétés de style pour impression depuis un navigateur
*
*/

/* Suppression des blocs inutiles */
#sidebar-wrapper,
#zoomtoolbar,
#toolstoolbar,
.ol-attribution,
.tooltip-inner,
.tooltip-arrow,
#backgroundlayerstoolbar-default,
#backgroundlayerstoolbar-gallery {
display: none;
}

/* Gestion de la carte */
#map {
top: 0px;
left: 0px;
}

#mviewerinfosbar {
z-index: 1000 !important;
}

/* Gestion de la légende */
#legend {
top: 10pt;
left: 10pt;
position: fixed;
}

#layers-container-box-header {
display: none;
}

#layers-container .glyphicon {
display: none;
}

#layers-container {
background-color: white !important;
border: none;
}

#layers-container .mv-layer-details {
border: none;
max-width: 300px;
}

/* Gestion de l'interrogation */

#right-panel,
#bottom-panel {
background-color: white !important;
}

#right-panel .active {
padding-bottom: 0 !important;
}

#right-panel .mv-header,
#right-panel .nav-tabs,
#bottom-panel .mv-header,
#bottom-panel .nav-tabs {
display: none;
}

#right-panel .carousel-control,
#right-panel .counter-slide,
#bottom-panel .carousel-control,
#bottom-panel .counter-slide {
display: none;
}

#bottom-panel {
bottom: 0;
left: 0;
position: fixed;
width: 100%;
padding: 10pt 0 !important;
}

#bottom-panel .mv-close {
display: none;
}
8 changes: 4 additions & 4 deletions demo/addlayers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
url="http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution="© MapQuest. Données : les contributeurs d'&lt;a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap &lt;/a>, &lt;a href='https://www.openstreetmap.org/copyright' target='_blank'>ODbL &lt;/a>" visible="false"/>
<baselayer type="WMTS" id="ortho" label="Photo aérienne IGN" title="GéoPortail" maxscale="1000" thumbgallery="img/basemap/ortho.jpg"
url="https://wxs.ign.fr/essentiels/geoportail/wmts" layers="ORTHOIMAGERY.ORTHOPHOTOS" format="image/jpeg" visible="false" fromcapacity="false"
attribution="&lt;a href='https://geoservices.ign.fr/services-web-decouverte' target='_blank'>&lt;img src='img/basemap/geoservices.png'>&lt;/a>" style="normal" matrixset="PM" maxzoom="22"/>
url="https://data.geopf.fr/wmts" layers="ORTHOIMAGERY.ORTHOPHOTOS" format="image/jpeg" visible="false" fromcapacity="false"
attribution="&lt;a href='https://geoservices.ign.fr/services-geoplateforme-diffusion' target='_blank'>&lt;img src='img/basemap/geoservices.png'>&lt;/a>" style="normal" matrixset="PM" maxzoom="22"/>
<baselayer type="WMTS" id="plan" label="Plan IGN" title="GéoPortail" maxscale="2000" thumbgallery="img/basemap/plan_ign.png" opacity="0.8"
url="https://wxs.ign.fr/decouverte/geoportail/wmts" layers="GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2" format="image/png" visible="false" fromcapacity="false"
attribution="&lt;a href='https://geoservices.ign.fr/services-web-decouverte' target='_blank'>&lt;img src='img/basemap/geoservices.png'>&lt;/a>" style="normal" matrixset="PM" maxzoom="22"/>
url="https://data.geopf.fr/wmts" layers="GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2" format="image/png" visible="false" fromcapacity="false"
attribution="&lt;a href='https://geoservices.ign.fr/services-geoplateforme-diffusion' target='_blank'>&lt;img src='img/basemap/geoservices.png'>&lt;/a>" style="normal" matrixset="PM" maxzoom="22"/>
<baselayer type="fake" id="fake" label="Carroyage" title="Carroyage" thumbgallery="img/basemap/grid.png" visible="false" />
</baselayers>
<proxy url=""/>
Expand Down
22 changes: 11 additions & 11 deletions demo/addons/filter/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@
"colorButton": "#2e5367"
},
"layers": [
{
"layerId": "commune",
"filter": [
{
"attribut": "nom",
"type": "textbox",
"label": "Commune",
"updateOnChange": true
}
]
},
{
"layerId": "structures",
"filter": [
Expand Down Expand Up @@ -92,17 +103,6 @@
"updateOnChange": true
}
]
},
{
"layerId": "commune",
"filter": [
{
"attribut": "nom",
"type": "textbox",
"label": "Commune",
"updateOnChange": true
}
]
}
]
}
Expand Down
16 changes: 8 additions & 8 deletions demo/addons/filter/js/filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var filter = (function () {
const filter = (function () {
/**
* Property: _id
* @type {String}
Expand Down Expand Up @@ -188,7 +188,7 @@ var filter = (function () {
var destinationDivId = "advancedFilter-" + layerId;

// Create div only if not exist
if (!$("#" + destinationDivId).length && nbLayers > 1) {
if (!$("#" + destinationDivId).length) {
// add selectBox if needed
const selected = mviewer.getLayer(layerId)?.layer.getVisible() ? "selected" : "";
contentSelectLayer.push(
Expand Down Expand Up @@ -310,19 +310,19 @@ var filter = (function () {
**/
var _getFilter = function (layerId) {
let filterTxt;
filter.layersFiltersParams.get(layerId).forEach(function (filter, index, array) {
filter.layersFiltersParams.get(layerId).forEach((layerFilter) => {
// Only if there is a filter
if (filter.currentValues.length > 0) {
let newFilter = filter.attribut + "='" + filter.currentValues[0] + "'";
if (filterTxt && filterTxt.length > 0) {
if (layerFilter.currentValues.length) {
const newFilter = `${layerFilter.attribut} LIKE '%${layerFilter.currentValues[0]}%'`;
if (filterTxt && filterTxt.length) {
filterTxt += " AND " + newFilter;
} else {
filterTxt = newFilter;
}
}
});
if (filterTxt && filterTxt.length > 0) {
return "&CQL_FILTER=" + filterTxt;
if (filterTxt && filterTxt.length) {
return "&CQL_FILTER=" + encodeURIComponent(filterTxt);
} else {
return "";
}
Expand Down
Loading

0 comments on commit bfdd3ae

Please sign in to comment.