Différents styles suivant les types de points
This commit is contained in:
1 parent
1f3db69791
commit
321296e90f
4 files changed
+123
-68
No files matched your search
+56
-23
@@ -47,36 +47,84 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
poiLayer = L.layerGroup().addTo(mymap);
|
poiLayer = L.layerGroup().addTo(mymap);
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// Styles des POIs pour les vector tiles
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
function svgDataUriFor(color, size, shape) {
|
||||||
|
var width = size;
|
||||||
|
var height = size;
|
||||||
|
var svg = "";
|
||||||
|
|
||||||
|
if (shape === "triangle") {
|
||||||
|
svg =
|
||||||
|
"<svg xmlns='http://www.w3.org/2000/svg' width='" + width + "' height='" + height + "' viewBox='0 0 " + width + " " + height + "'>" +
|
||||||
|
"<polygon points='" + (width / 2) + ",2 " + (width - 2) + "," + (height - 2) + " 2," + (height - 2) + "' fill='" + color + "'/>" +
|
||||||
|
"</svg>";
|
||||||
|
} else {
|
||||||
|
svg =
|
||||||
|
"<svg xmlns='http://www.w3.org/2000/svg' width='" + width + "' height='" + height + "' viewBox='0 0 " + width + " " + height + "'>" +
|
||||||
|
"<rect x='2' y='2' width='" + (width - 4) + "' height='" + (height - 4) + "' fill='" + color + "'/>" +
|
||||||
|
"</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" }
|
||||||
|
};
|
||||||
|
|
||||||
|
function buildPoiVectorIcon(properties) {
|
||||||
|
var type = (properties && (properties.type || properties.poi_type || properties.poiType)) || "default";
|
||||||
|
var style = poiStyleMap[type] || { color: "#d73a3a", size: 10, shape: "square" };
|
||||||
|
var iconUrl = svgDataUriFor(style.color, style.size, style.shape);
|
||||||
|
|
||||||
|
return L.icon({
|
||||||
|
iconUrl: iconUrl,
|
||||||
|
iconSize: [style.size, style.size],
|
||||||
|
iconAnchor: [Math.floor(style.size / 2), style.size],
|
||||||
|
popupAnchor: [0, -style.size]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Couche vectorielle utilisée pour les faibles zooms
|
// Couche vectorielle utilisée pour les faibles zooms
|
||||||
vectorLayer = L.vectorGrid.protobuf(
|
vectorLayer = L.vectorGrid.protobuf(
|
||||||
root + "poi/tile/{z}/{x}/{y}.pbf",
|
root + "poi/tile/{z}/{x}/{y}.pbf",
|
||||||
{
|
{
|
||||||
interactive: true,
|
interactive: true,
|
||||||
|
|
||||||
maxZoom: 9,
|
maxZoom: 9,
|
||||||
|
rendererFactory: L.svg.tile,
|
||||||
vectorTileLayerStyles: {
|
vectorTileLayerStyles: {
|
||||||
pois: {}
|
pois: function(properties, zoom) {
|
||||||
}
|
var icon = buildPoiVectorIcon(properties);
|
||||||
|
|
||||||
|
return {
|
||||||
|
icon: icon,
|
||||||
|
interactive: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Clic sur un POI vectoriel
|
// Clic sur un POI vectoriel
|
||||||
vectorLayer.on("click", function(e) {
|
vectorLayer.on("click", function(e) {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
e.layer &&
|
e.layer &&
|
||||||
e.layer.properties &&
|
e.layer.properties &&
|
||||||
e.layer.properties.permalink
|
e.layer.properties.permalink
|
||||||
) {
|
) {
|
||||||
|
|
||||||
window.location =
|
window.location =
|
||||||
root +
|
root +
|
||||||
"poi/" +
|
"poi/" +
|
||||||
e.layer.properties.permalink;
|
e.layer.properties.permalink;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
@@ -156,14 +204,12 @@ $(document).ready(function() {
|
|||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
for (const type in window.poi_icons) {
|
for (const type in window.poi_icons) {
|
||||||
|
|
||||||
icons[type] = L.icon({
|
icons[type] = L.icon({
|
||||||
iconUrl: window.poi_icons[type],
|
iconUrl: window.poi_icons[type],
|
||||||
iconSize: [32, 32],
|
iconSize: [32, 32],
|
||||||
iconAnchor: [16, 32],
|
iconAnchor: [16, 32],
|
||||||
popupAnchor: [0, -32]
|
popupAnchor: [0, -32]
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
@@ -171,7 +217,6 @@ $(document).ready(function() {
|
|||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
function loadVisiblePois() {
|
function loadVisiblePois() {
|
||||||
|
|
||||||
if (mymap.getZoom() < 10)
|
if (mymap.getZoom() < 10)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -186,11 +231,9 @@ $(document).ready(function() {
|
|||||||
west: b.getWest()
|
west: b.getWest()
|
||||||
},
|
},
|
||||||
function(pois) {
|
function(pois) {
|
||||||
|
|
||||||
poiLayer.clearLayers();
|
poiLayer.clearLayers();
|
||||||
|
|
||||||
pois.forEach(function(poi) {
|
pois.forEach(function(poi) {
|
||||||
|
|
||||||
var icon =
|
var icon =
|
||||||
icons[poi.type] ||
|
icons[poi.type] ||
|
||||||
icons["default"];
|
icons["default"];
|
||||||
@@ -215,41 +258,33 @@ $(document).ready(function() {
|
|||||||
marker.on(
|
marker.on(
|
||||||
"click",
|
"click",
|
||||||
function() {
|
function() {
|
||||||
|
|
||||||
window.location =
|
window.location =
|
||||||
root +
|
root +
|
||||||
"poi/" +
|
"poi/" +
|
||||||
poi.permalink;
|
poi.permalink;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
poiLayer.addLayer(marker);
|
poiLayer.addLayer(marker);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
// Bascule entre le calque tle et geojson
|
// Bascule entre le calque vectoriel et geojson
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
function switchLayers() {
|
function switchLayers() {
|
||||||
|
|
||||||
var z = mymap.getZoom();
|
var z = mymap.getZoom();
|
||||||
|
|
||||||
if (z < 10) {
|
if (z < 10) {
|
||||||
|
|
||||||
poiLayer.clearLayers();
|
poiLayer.clearLayers();
|
||||||
|
|
||||||
if (!mymap.hasLayer(vectorLayer)) {
|
if (!mymap.hasLayer(vectorLayer)) {
|
||||||
mymap.addLayer(vectorLayer);
|
mymap.addLayer(vectorLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (mymap.hasLayer(vectorLayer)) {
|
if (mymap.hasLayer(vectorLayer)) {
|
||||||
mymap.removeLayer(vectorLayer);
|
mymap.removeLayer(vectorLayer);
|
||||||
}
|
}
|
||||||
@@ -264,11 +299,9 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
mymap.on("zoomend", switchLayers);
|
mymap.on("zoomend", switchLayers);
|
||||||
mymap.on("moveend", function() {
|
mymap.on("moveend", function() {
|
||||||
|
|
||||||
if (mymap.getZoom() >= 10) {
|
if (mymap.getZoom() >= 10) {
|
||||||
loadVisiblePois();
|
loadVisiblePois();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
switchLayers();
|
switchLayers();
|
||||||
|
|||||||
@@ -45,7 +45,10 @@
|
|||||||
}
|
}
|
||||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
||||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
||||||
.leaflet-container .leaflet-overlay-pane svg,
|
.leaflet-container .leaflet-overlay-pane svg {
|
||||||
|
max-width: none !important;
|
||||||
|
max-height: none !important;
|
||||||
|
}
|
||||||
.leaflet-container .leaflet-marker-pane img,
|
.leaflet-container .leaflet-marker-pane img,
|
||||||
.leaflet-container .leaflet-shadow-pane img,
|
.leaflet-container .leaflet-shadow-pane img,
|
||||||
.leaflet-container .leaflet-tile-pane img,
|
.leaflet-container .leaflet-tile-pane img,
|
||||||
@@ -53,8 +56,15 @@
|
|||||||
.leaflet-container .leaflet-tile {
|
.leaflet-container .leaflet-tile {
|
||||||
max-width: none !important;
|
max-width: none !important;
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
|
width: auto;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leaflet-container img.leaflet-tile {
|
||||||
|
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
|
||||||
|
mix-blend-mode: plus-lighter;
|
||||||
|
}
|
||||||
|
|
||||||
.leaflet-container.leaflet-touch-zoom {
|
.leaflet-container.leaflet-touch-zoom {
|
||||||
-ms-touch-action: pan-x pan-y;
|
-ms-touch-action: pan-x pan-y;
|
||||||
touch-action: pan-x pan-y;
|
touch-action: pan-x pan-y;
|
||||||
@@ -166,9 +176,6 @@
|
|||||||
|
|
||||||
/* zoom and fade animations */
|
/* zoom and fade animations */
|
||||||
|
|
||||||
.leaflet-fade-anim .leaflet-tile {
|
|
||||||
will-change: opacity;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-popup {
|
.leaflet-fade-anim .leaflet-popup {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-webkit-transition: opacity 0.2s linear;
|
-webkit-transition: opacity 0.2s linear;
|
||||||
@@ -183,9 +190,10 @@
|
|||||||
-ms-transform-origin: 0 0;
|
-ms-transform-origin: 0 0;
|
||||||
transform-origin: 0 0;
|
transform-origin: 0 0;
|
||||||
}
|
}
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
svg.leaflet-zoom-animated {
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||||
@@ -251,14 +259,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
|
|
||||||
.leaflet-container {
|
.leaflet-container {
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
outline: 0;
|
outline-offset: 1px;
|
||||||
}
|
}
|
||||||
.leaflet-container a {
|
.leaflet-container a {
|
||||||
color: #0078A8;
|
color: #0078A8;
|
||||||
}
|
}
|
||||||
.leaflet-container a.leaflet-active {
|
|
||||||
outline: 2px solid orange;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
.leaflet-zoom-box {
|
||||||
border: 2px dotted #38f;
|
border: 2px dotted #38f;
|
||||||
background: rgba(255,255,255,0.5);
|
background: rgba(255,255,255,0.5);
|
||||||
@@ -267,7 +272,10 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
|
|
||||||
/* general typography */
|
/* general typography */
|
||||||
.leaflet-container {
|
.leaflet-container {
|
||||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -277,8 +285,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.leaflet-bar a,
|
.leaflet-bar a {
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
width: 26px;
|
width: 26px;
|
||||||
@@ -295,7 +302,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.leaflet-bar a:hover {
|
.leaflet-bar a:hover,
|
||||||
|
.leaflet-bar a:focus {
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
}
|
}
|
||||||
.leaflet-bar a:first-child {
|
.leaflet-bar a:first-child {
|
||||||
@@ -385,6 +393,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
}
|
}
|
||||||
.leaflet-control-layers label {
|
.leaflet-control-layers label {
|
||||||
display: block;
|
display: block;
|
||||||
|
font-size: 13px;
|
||||||
|
font-size: 1.08333em;
|
||||||
}
|
}
|
||||||
.leaflet-control-layers-separator {
|
.leaflet-control-layers-separator {
|
||||||
height: 0;
|
height: 0;
|
||||||
@@ -393,7 +403,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Default icon URLs */
|
/* Default icon URLs */
|
||||||
.leaflet-default-icon-path {
|
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
|
||||||
background-image: url(images/marker-icon.png);
|
background-image: url(images/marker-icon.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,23 +412,27 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
|
|
||||||
.leaflet-container .leaflet-control-attribution {
|
.leaflet-container .leaflet-control-attribution {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
background: rgba(255, 255, 255, 0.7);
|
background: rgba(255, 255, 255, 0.8);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.leaflet-control-attribution,
|
.leaflet-control-attribution,
|
||||||
.leaflet-control-scale-line {
|
.leaflet-control-scale-line {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
.leaflet-control-attribution a {
|
.leaflet-control-attribution a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.leaflet-control-attribution a:hover {
|
.leaflet-control-attribution a:hover,
|
||||||
|
.leaflet-control-attribution a:focus {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.leaflet-container .leaflet-control-attribution,
|
.leaflet-attribution-flag {
|
||||||
.leaflet-container .leaflet-control-scale {
|
display: inline !important;
|
||||||
font-size: 11px;
|
vertical-align: baseline !important;
|
||||||
|
width: 1em;
|
||||||
|
height: 0.6669em;
|
||||||
}
|
}
|
||||||
.leaflet-left .leaflet-control-scale {
|
.leaflet-left .leaflet-control-scale {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
@@ -431,14 +445,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
border-top: none;
|
border-top: none;
|
||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
padding: 2px 5px 1px;
|
padding: 2px 5px 1px;
|
||||||
font-size: 11px;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
background: #fff;
|
text-shadow: 1px 1px #fff;
|
||||||
background: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
}
|
||||||
.leaflet-control-scale-line:not(:first-child) {
|
.leaflet-control-scale-line:not(:first-child) {
|
||||||
border-top: 2px solid #777;
|
border-top: 2px solid #777;
|
||||||
@@ -474,17 +485,22 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
.leaflet-popup-content {
|
.leaflet-popup-content {
|
||||||
margin: 13px 19px;
|
margin: 13px 24px 13px 20px;
|
||||||
line-height: 1.4;
|
line-height: 1.3;
|
||||||
|
font-size: 13px;
|
||||||
|
font-size: 1.08333em;
|
||||||
|
min-height: 1px;
|
||||||
}
|
}
|
||||||
.leaflet-popup-content p {
|
.leaflet-popup-content p {
|
||||||
margin: 18px 0;
|
margin: 17px 0;
|
||||||
|
margin: 1.3em 0;
|
||||||
}
|
}
|
||||||
.leaflet-popup-tip-container {
|
.leaflet-popup-tip-container {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
margin-top: -1px;
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@@ -495,6 +511,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
|
||||||
margin: -10px auto 0;
|
margin: -10px auto 0;
|
||||||
|
pointer-events: auto;
|
||||||
|
|
||||||
-webkit-transform: rotate(45deg);
|
-webkit-transform: rotate(45deg);
|
||||||
-moz-transform: rotate(45deg);
|
-moz-transform: rotate(45deg);
|
||||||
@@ -511,24 +528,21 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 4px 4px 0 0;
|
|
||||||
border: none;
|
border: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 18px;
|
width: 24px;
|
||||||
height: 14px;
|
height: 24px;
|
||||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
font: 16px/24px Tahoma, Verdana, sans-serif;
|
||||||
color: #c3c3c3;
|
color: #757575;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: bold;
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
.leaflet-container a.leaflet-popup-close-button:hover,
|
||||||
color: #999;
|
.leaflet-container a.leaflet-popup-close-button:focus {
|
||||||
|
color: #585858;
|
||||||
}
|
}
|
||||||
.leaflet-popup-scrolled {
|
.leaflet-popup-scrolled {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||||
@@ -541,9 +555,6 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||||
}
|
}
|
||||||
.leaflet-oldie .leaflet-popup-tip-container {
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-control-zoom,
|
.leaflet-oldie .leaflet-control-zoom,
|
||||||
.leaflet-oldie .leaflet-control-layers,
|
.leaflet-oldie .leaflet-control-layers,
|
||||||
@@ -578,7 +589,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
||||||
}
|
}
|
||||||
.leaflet-tooltip.leaflet-clickable {
|
.leaflet-tooltip.leaflet-interactive {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
@@ -638,3 +649,13 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|||||||
margin-left: -12px;
|
margin-left: -12px;
|
||||||
border-right-color: #fff;
|
border-right-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Printing */
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
/* Prevent printers from removing background-images of controls. */
|
||||||
|
.leaflet-control {
|
||||||
|
-webkit-print-color-adjust: exact;
|
||||||
|
print-color-adjust: exact;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* @preserve
|
/* @preserve
|
||||||
* Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
|
* Leaflet 1.9.4+v1.d15112c, a JS library for interactive maps. https://leafletjs.com
|
||||||
* (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||||
*/
|
*/
|
||||||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function h(t){for(var i,e,n=1,o=arguments.length;n<o;n++)for(i in e=arguments[n])t[i]=e[i];return t}var s=Object.create||function(t){return i.prototype=t,new i};function i(){}function p(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var e=0;function m(t){return t._leaflet_id=t._leaflet_id||++e,t._leaflet_id}function n(t,i,e){var n,o,s=function(){n=!1,o&&(r.apply(e,o),o=!1)},r=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(s,i),n=!0)};return r}function o(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function a(){return!1}function r(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return u(t).split(/\s+/)}function c(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?s(t.options):{}),i)t.options[e]=i[e];return t.options}function _(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var d=/\{ *([\w_-]+) *\}/g;function f(t,n){return t.replace(d,function(t,i){var e=n[i];if(void 0===e)throw new Error("No value provided for variable "+t);return"function"==typeof e&&(e=e(n)),e})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function P(t){var i=+new Date,e=Math.max(0,16-(i-w));return w=i+e,window.setTimeout(t,e)}var b=window.requestAnimationFrame||x("RequestAnimationFrame")||P,T=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,e){if(!e||b!==P)return b.call(window,p(t,i));t.call(i)}function z(t){t&&T.call(window,t)}var C={extend:h,create:s,bind:p,lastId:e,stamp:m,throttle:n,wrapNum:o,falseFn:a,formatNum:r,trim:u,splitWords:l,setOptions:c,getParamString:_,template:f,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:b,cancelFn:T,requestAnimFrame:M,cancelAnimFrame:z};function S(){}S.extend=function(t){function i(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var e=i.__super__=this.prototype,n=s(e);for(var o in(n.constructor=i).prototype=n,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&(h(i,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=g(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),h.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=h(s(n.options),t.options)),h(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){e.callInitHooks&&e.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},S.include=function(t){return h(this.prototype,t),this},S.mergeOptions=function(t){return h(this.prototype.options,t),this},S.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var Z={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._off(t[o],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var o={fn:i,ctx:e},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===i&&s[r].ctx===e)return;s.push(o)},_off:function(t,i,e){var n,o,s;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===e&&r.fn===i)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=a;delete this._events[t]}},fire:function(t,i,e){if(!this.listens(t,e))return this;var n=h({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){vaLine truncated
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}var R=Object.create||function(t){return N.prototype=t,new N};function N(){}function a(t,e){var i,n=Array.prototype.slice;return t.bind?t.bind.apply(t,n.call(arguments,1)):(i=n.call(arguments,2),function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)})}var D=0;function h(t){return"_leaflet_id"in t||(t._leaflet_id=++D),t._leaflet_id}function j(t,e,i){var n,o,s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)};return r}function H(t,e,i){var n=e[1],e=e[0],o=n-e;return t===n&&i?t:((t-e)%o+o)%o+e}function u(){return!1}function i(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function W(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return W(t).split(/\s+/)}function c(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?R(t.options):{}),e)t.options[i]=e[i];return t.options}function U(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var V=/\{ *([\w_ -]+) *\}/g;function q(t,i){return t.replace(V,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var K="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var X=0;function J(t){var e=+new Date,i=Math.max(0,16-(e-X));return X=e+i,window.setTimeout(t,i)}var $=window.requestAnimationFrame||Y("RequestAnimationFrame")||J,Q=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function x(t,e,i){if(!i||$!==J)return $.call(window,a(t,e));t.call(e)}function r(t){t&&Q.call(window,t)}var tt={__proto__:null,extend:l,create:R,bind:a,get lastId(){return D},stamp:h,throttle:j,wrapNum:H,falseFn:u,formatNum:i,trim:W,splitWords:F,setOptions:c,getParamString:U,template:q,isArray:d,indexOf:G,emptyImageUrl:K,requestFn:$,cancelFn:Q,requestAnimFrame:x,cancelAnimFrame:r};function et(){}et.extend=function(t){function e(){c(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=R(n);for(i in(o.constructor=e).prototype=o,this)Object.prototype.hasOwnProperty.call(this,i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);if(t.statics&&l(e,t.statics),t.includes){var s=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){s=d(s)?s:[s];for(var r=0;r<s.length;r++)s[r]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}l.apply(null,[o].concat(t.includes))}return l(o,t),delete o.statics,delete o.includes,o.options&&(o.options=n.options?R(n.options):{},l(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},et.include=function(t){var e=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},et.mergeOptions=function(t){return l(this.prototype.options,t),this},et.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var e={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=F(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=F(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,n){"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1===this._listens(t,e,i)&&(e={fn:e,ctx:i=i===this?void 0:i},n&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e))},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1===arguments.length){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=u;delete this._events[t]}else"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1!==(e=this._listens(Line truncated
|
||||||
//# sourceMappingURL=leaflet.js.map
|
//# sourceMappingURL=leaflet.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"dist/leaflet.js.map","sources":["../src/core/Util.js","../src/core/Class.js","../src/core/Events.js","../src/geometry/Point.js","../src/geometry/Bounds.js","../src/geo/LatLngBounds.js","../src/geo/LatLng.js","../src/geo/crs/CRS.js","../src/geo/crs/CRS.Earth.js","../src/geo/projection/Projection.SphericalMercator.js","../src/geometry/Transformation.js","../src/geo/crs/CRS.EPSG3857.js","../src/layer/vector/SVG.Util.js","../src/core/Browser.js","../src/dom/DomEvent.Pointer.js","../src/dom/DomEvent.DoubleTap.js","../src/dom/DomUtil.js","../src/dom/DomEvent.js","../src/dom/PosAnimation.js","../src/map/Map.js","../src/control/Control.js","../src/control/Control.Layers.js","../src/control/Control.Zoom.js","../src/control/Control.Scale.js","../src/control/Control.Attribution.js","../src/core/Handler.js","../src/control/index.js","../src/core/index.js","../src/dom/Draggable.js","../src/geometry/PolyUtil.js","../src/geometry/LineUtil.js","../src/geo/projection/Projection.LonLat.js","../src/geo/projection/Projection.Mercator.js","../src/geo/crs/CRS.EPSG3395.js","../src/geo/crs/CRS.EPSG4326.js","../src/geo/crs/CRS.Simple.js","../src/layer/Layer.js","../src/geo/crs/index.js","../src/layer/LayerGroup.js","../src/layer/FeatureGroup.js","../src/layer/marker/Icon.js","../src/layer/marker/Icon.Default.js","../src/layer/marker/Marker.Drag.js","../src/layer/marker/Marker.js","../src/layer/vector/Path.js","../src/layer/vector/CircleMarker.js","../src/layer/vector/Circle.js","../src/layer/vector/Polyline.js","../src/layer/vector/Polygon.js","../src/layer/GeoJSON.js","../src/layer/ImageOverlay.js","../src/layer/VideoOverlay.js","../src/layer/SVGOverlay.js","../src/layer/DivOverlay.js","../src/layer/Popup.js","../src/layer/Tooltip.js","../src/layer/marker/DivIcon.js","../src/layer/marker/index.js","../src/layer/tile/GridLayer.js","../src/layer/tile/TileLayer.js","../src/layer/tile/TileLayer.WMS.js","../src/layer/tile/index.js","../src/layer/vector/Renderer.js","../src/layer/vector/Canvas.js","../src/layer/vector/SVG.VML.js","../src/layer/vector/SVG.js","../src/layer/vector/Renderer.getRenderer.js","../src/layer/vector/Rectangle.js","../src/layer/vector/index.js","../src/layer/index.js","../src/map/handler/Map.BoxZoom.js","../src/map/handler/Map.DoubleClickZoom.js","../src/map/handler/Map.Drag.js","../src/map/handler/Map.Keyboard.js","../src/map/handler/Map.ScrollWheelZoom.js","../src/map/handler/Map.TapHold.js","../src/map/handler/Map.TouchZoom.js","../src/map/index.js"],"names":["extend","dest","i","src","j","len","arguments","length","create","Object","proto","F","prototype","bind","fn","obj","args","slice","Array","apply","call","concat","lastId","stamp","_leaflet_id","throttle","time","context","lock","later","wrapperFn","setTimeout","wrapNum","x","range","includeMax","max","min","d","falseFn","formatNum","num","precision","pow","Math","undefined","round","trim","str","replace","splitWords","split","setOptions","options","hasOwnProperty","getParamString","existingUrl","uppercase","params","push","encodeURIComponent","toUpperCase","indexOf","join","templateRe","template","data","key","value","Error","isArray","toString","array","el","emptyImageUrl","getPrefixed","name","window","lastTime","timeoutDefer","Date","timeToCall","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","id","clearTimeout","requestAnimFrame","immediate","cancelAnimFrame","Class","props","NewClass","Util.setOptions","this","initialize","callInitHooks","parentProto","__super__","Util.create","constructor","statics","Util.extend","includes","checkDeprecatedMixinEvents","L","Mixin","Util.isArray","Events","console","warn","stack","_initHooks","_initHooksCalled","include","parentOptions","mergeOptions","addInitHook","init","on","types","type","_on","Util.splitWords","off","_off","removeAll","_events","_once","_listens","newListener","ctx","once","listeners","_firingCount","Util.falseFn","index","listener","splice","fire","propagate","listens","event","target","sourceTarget","l","_propagateEvent","_fn","_eventParents","addEventParent","Util.stamp","removeEventParent","e","layer","propagatedFrom","Evented","addEventListener","removeEventListener","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Point","y","trunc","v","floor","ceil","toPoint","Bounds","a","b","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","lat","lng","alt","isNaN","toLatLng","c","lon","clone","add","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","_floor","_ceil","_trunc","distanceTo","sqrt","equals","contains","abs","min2","max2","getCenter","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","bounds","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","pad","bufferRatio","heightBuffer","widthBuffer","sw2","ne2","sw","_southWest","ne","_northEast","getSouthWestLine truncated
|
||||||
Reference in new issue
Block a user