diff --git a/public/views/css/d.map.css b/public/views/css/d.map.css
index 136876e..0707982 100755
--- a/public/views/css/d.map.css
+++ b/public/views/css/d.map.css
@@ -210,4 +210,10 @@ footer {
.leaflet-fullscreen-on .easy-button-container {
display: none;
+}
+
+/* Map PBF tiles overflow of icons */
+
+.leaflet-container .leaflet-tile{
+ overflow: visible !important;
}
\ No newline at end of file
diff --git a/public/views/js/d.map.js b/public/views/js/d.map.js
index cbb7dc7..916e93d 100755
--- a/public/views/js/d.map.js
+++ b/public/views/js/d.map.js
@@ -51,33 +51,36 @@ $(document).ready(function() {
// Styles des POIs pour les vector tiles
// ---------------------------------------------------------
- function svgDataUriFor(color, size, shape) {
- var width = size;
- var height = size;
- var svg = "";
+ // Fonction qui génère le SVG du point pour les calques en pbf
+ function svgDataUriFor(color, size, shape, strokeOpacity = 0.2) {
+ const w = size, h = size, strokeWidth = 1, r = Math.max(1, Math.round(size * 0.15));
+ const inset = 2 + strokeWidth / 2, innerW = w - inset * 2, innerH = h - inset * 2;
+ let shapeSvg;
- if (shape === "triangle") {
- svg =
- "";
- } else {
- svg =
- "";
- }
+ if (shape === 'triangle') {
+ const p1 = `${w/2},${inset}`, p2 = `${w-inset},${h-inset}`, p3 = `${inset},${h-inset}`, points = `${p1} ${p2} ${p3}`;
+ shapeSvg = `
+
+
+ `;
+ } else {
+ shapeSvg = `
+
+
+ `;
+ }
- return "data:image/svg+xml;utf8," + encodeURIComponent(svg);
+ const svg = ``;
+ return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
}
var poiStyleMap = {
- "wilderness_hut": { color: "#d73a3a", size: 12, shape: "square" },
- "basic_hut": { color: "#d73a3a", size: 8, shape: "square" },
- "alpine_hut": { color: "#d73a3a", size: 16, shape: "square" },
- "halt": { color: "#4caf50", size: 16, shape: "square" },
- "bivouac": { color: "#d73a3a", size: 12, shape: "triangle" },
- "campsite": { color: "#4caf50", size: 12, shape: "triangle" }
+ "wilderness_hut": { color: "#d73a3a", size: 16, shape: "square" },
+ "basic_hut": { color: "#d73a3a", size: 14, shape: "square" },
+ "alpine_hut": { color: "#d73a3a", size: 18, shape: "square" },
+ "halt": { color: "#4caf50", size: 18, shape: "square" },
+ "bivouac": { color: "#d73a3a", size: 16, shape: "triangle" },
+ "campsite": { color: "#4caf50", size: 16, shape: "triangle" }
};
function buildPoiVectorIcon(properties) {