Skip to content

Commit

Permalink
Merge pull request mviewer#924 from mviewer/develop
Browse files Browse the repository at this point in the history
Version 3.12
  • Loading branch information
lecault authored Nov 4, 2024
2 parents c567710 + 1a2d5dc commit a5347c9
Show file tree
Hide file tree
Showing 40 changed files with 34,122 additions and 548 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dist/*
node*
panels/*
apps/*.json
apps/*
node*
package-*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:alpine
FROM nginxinc/nginx-unprivileged:alpine

VOLUME ["/usr/share/nginx/html/apps"]

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Visualiseur géographique [Kartenn](https://kartenn.region-bretagne.fr/demo/) ba

Liens utiles :

- [Site officiel](https://mviewer.netlify.com/)
- [Site officiel](https://mviewer.github.io/fr/)
- [Versions](https://github.com/geobretagne/mviewer/releases/)
- [Démos](http://kartenn.region-bretagne.fr/kartoviz/demo/)
- [Documentation](http://mviewerdoc.readthedocs.io/fr/stable/)
Expand Down Expand Up @@ -94,7 +94,7 @@ docker build -t mviewer/mviewer .
# faire tourner le conteneur, et le rendre accessible sur le port 8080. A l'arret du
# conteneur celui-ci est supprimé (option `--rm`):

docker run --rm -p8080:80 -v$(pwd)/apps:/usr/share/nginx/html/apps mviewer/mviewer
docker run --rm -p8080:8080 -v$(pwd)/apps:/usr/share/nginx/html/apps mviewer/mviewer
```

Une fois le conteneur lancé, `mviewer` sera disponible sur `http://localhost:8080`.
Expand All @@ -104,7 +104,7 @@ mviewer dans un répertoire existant, vous pouvez le monter à la place de celui
proposé par défaut par le dépot en utilisant l'option `-v` de docker comme suit:

```
docker run --rm -p8080:80 -v/chemin/vers/repertoire_de_configurations_xml:/usr/share/nginx/html/apps mviewer/mviewer
docker run --rm -p8080:8080 -v/chemin/vers/repertoire_de_configurations_xml:/usr/share/nginx/html/apps mviewer/mviewer
```

La seule contrainte étant que le chemin doit être indiqué à docker de manière absolue.
Expand Down
75 changes: 75 additions & 0 deletions css/mviewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,13 @@ ul#layers-container {
top: 160px;
}

#drawoptions {
position: fixed;
right: 70px;
float: right;
top: 270px;
}

.layerdisplay-title span {
padding-right: 5px;
}
Expand Down Expand Up @@ -2033,4 +2040,72 @@ div#login-box {
border: none;
}

/***********************************
------------- WINDOW INFO DRAW TOOLS
***********************************/

#drawingPanelInfo {
max-width: 280px;
min-width: 230px;
padding: 1em;
border-radius: .5em;
position: fixed;
top: 65px;
right: 55px;
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: #fff;
box-shadow: 2px 2px 10px rgb(0 0 0 / 37%);
}

.drawingPanel__header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
}

.drawingPanel__body {
margin: .5em 0;
}

#drawingPanelInfoLabel {
padding: 3px 5px;
}

#drawingPanelHelp:not(:empty) {
margin: .5em 0;
font-size: .95em;
line-height: 1.2;
background-color: #8080801f;
color: #868686;
padding: .5em .5em .5em 2.4em;
border-radius: .3em;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='rgba(134,134,134,1)'%3E%3Cpath d='M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z'%3E%3C/path%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center left 5px;
}

.drawTooltip {
background-color: #fff;
border: 1px solid;
border-color: #393939;
padding: 5px 10px;
border-radius: 4px;
font-size: 12px;
color: black;
box-shadow: 2px 2px 10px rgb(0 0 0 / 37%);
white-space: nowrap;
}

input.drawTooltip {
width: 80%;
}

.datepicker table tbody tr td.disabled {
color: rgba(119,119,119,0.2);
pointer-events: none;
}

14 changes: 6 additions & 8 deletions data/ogc_csw_server.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"ogc":[
{"label":"Geoserver geo2France","url":"https://www.geo2france.fr/geoserver/hdf_common/ows"},
{"label":"QGIS Server hauts de france","url":"https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/sraddet_2020_08.qgz"},
{"label":"Mapserver GeoIDE","url":"https://ogc.geo-ide.developpement-durable.gouv.fr/wxs?map=/opt/data/carto/geoide-catalogue/1.4/org_38148/cac35f5b-fa24-442f-8297-9e9495f06f36.internet.map"},
{"label":"Geoportail IGN","url":"https://wxs.ign.fr/ortho/geoportail/r/wms"}
{"label":"Geoserver Geo2France","url":"https://www.geo2france.fr/geoserver/hdf_common/wms"},
{"label":"Geoserver GeoBretagne","url":"https://geobretagne.fr/geoserver/opendata/wms"},
{"label":"Geoportail IGN","url":"https://data.geopf.fr/wms-r"},
{"label":"QGIS Server hauts de france","url":"https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/sraddet_2020_08.qgz"}
],
"csw":[
{"label":"Catalogue PIGMA","url":"https://www.pigma.org/geonetwork/srv/eng/csw","defaultfilter":"protocol='OGC:WMS-1.1.1-http-get-map' OR protocol='OGC:WMS'"},
{"label":"Catalogue GrandLyon","url":"https://download.data.grandlyon.com/catalogue/srv/eng/csw","defaultfilter":"protocol='OGC:WMS-1.1.1-http-get-map' OR protocol='OGC:WMS'"},
{"label":"Catalogue Geo2France","url":"https://www.geo2france.fr/geonetwork/srv/fre/csw","defaultfilter":"linkProtocol='OGC:WMS'"},
{"label":"Catalogue GeoBretagne","url":"https://geobretagne.fr/geonetwork/srv/fre/csw","defaultfilter":"protocol='OGC:WMS-1.1.1-http-get-map' OR protocol='OGC:WMS'"}

{"label":"Catalogue GeoBretagne","url":"https://geobretagne.fr/geonetwork/srv/fre/csw","defaultfilter":"linkProtocol like '%WMS'"},
{"label":"Catalogue PIGMA","url":"https://www.pigma.org/geonetwork/srv/eng/csw","defaultfilter":"protocol='OGC:WMS-1.1.1-http-get-map' OR protocol='OGC:WMS'"}
]
}
13 changes: 12 additions & 1 deletion demo/addons/print/js/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ import ModalContent from "./components/ModalContent.js";

import { getOptions } from "./components/Block.js";

const onCloseModal = () => {
const btnClose = document.getElementById("print-panel-close");
btnClose.onclick = () => {
document.querySelector("#mapBlock").remove();
document.querySelector("#print-mapPrint").remove();
btnClose.removeAttribute("onclick");
};
};

const initWithLayout = (layout) => {
$("#printModal").on("shown.bs.modal", function () {
// supprime et recréer la carte seulement et non toute la modal
$("#mapBlock").remove();
$("#printModal").modal("show");
// init options
initOptions(layout);
Expand Down Expand Up @@ -71,6 +79,9 @@ const initWithLayout = (layout) => {
});
})
);

// on modal close
onCloseModal();
};

const init = () => {
Expand Down
73 changes: 73 additions & 0 deletions demo/addons/print/layouts/trackview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"A4_LANDSCAPE": {
"format": "A4",
"northUrl": "demo/addons/print/img/NorthArrow.png",
"landscape": true,
"grid": {
"rows": "6",
"col": "6"
},
"items": {
"mapPrint": {
"row": "2/6",
"col": "1/5"
},
"informations": {
"title": "Informations",
"row": "1/2",
"col": "6/7",
"type": "informations"
},
"comments": {
"row": "6/7",
"col": "1/7",
"type": "text"
},
"legend": {
"row": "2/6",
"col": "5/7",
"type": "legend"
},
"title": {
"row": "1/2",
"col": "1/6",
"type": "text"
}
}
},
"A4_PORTRAIT": {
"format": "A4",
"landscape": false,
"grid": {
"rows": "6",
"col": "6"
},
"items": {
"mapPrint": {
"row": "2/6",
"col": "1/5"
},
"informations": {
"title": "Informations",
"row": "1/2",
"col": "6/7",
"type": "informations"
},
"comments": {
"row": "6/7",
"col": "1/7",
"type": "text"
},
"legend": {
"row": "2/6",
"col": "5/7",
"type": "legend"
},
"title": {
"row": "1/2",
"col": "1/6",
"type": "text"
}
}
}
}
Loading

0 comments on commit a5347c9

Please sign in to comment.