mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:57:07 +00:00
Add saillines layer to map
This commit is contained in:
@@ -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 = "") => {
|
||||
|
||||
Reference in New Issue
Block a user