Add saillines layer to map

This commit is contained in:
D. Berge
2021-05-28 20:30:29 +02:00
parent 967db1dec6
commit 758b13b189

View File

@@ -88,6 +88,30 @@ const layers = {
},
}),
"Saillines": L.geoJSON(null, {
pointToLayer (point, latlng) {
return L.circle(latlng, {
radius: 1,
color: "#3388ff",
stroke: false,
fillOpacity: 0.8
});
},
style (feature) {
return {
opacity: feature.properties.ntba ? 0.2 : 0.5,
color: "cyan"
}
},
onEachFeature (feature, layer) {
const p = feature.properties;
const popup = feature.geometry.type == "Point"
? `Preplot<br/>Point <b>${p.line} / ${p.point}</b>`
: `Preplot${p.ntba? " (NTBA)":""}<br/>Line <b>${p.line}</b>${p.remarks ? markdown(p.remarks) : ""}`;
layer.bindTooltip(popup, {sticky: true});
},
}),
"Plan": L.geoJSON(null, {
arrowheads: {
size: "8px",
@@ -317,6 +341,16 @@ export default {
: `/project/${this.$route.params.project}/gis/preplot/point?${query.toString()}`;
}
},
{
layer: layers["Saillines"],
url: (query = "") => {
const q = new URLSearchParams(query);
q.set("class", "V");
return map.getZoom() < 18
? `/project/${this.$route.params.project}/gis/preplot/line?${q.toString()}`
: `/project/${this.$route.params.project}/gis/preplot/point?${q.toString()}`;
}
},
{
layer: layers.Plan,
url: (query = "") => {