{
map.on("load", () => {
map.addSource("fullpassesSource", {
type: "geojson",
data: fullpasses
});
map.addSource("fulldirectionSource", {
type: "geojson",
data: fulldirection
});
map.addLayer({
id: "fullpass-point",
type: "circle",
source: "fullpassesSource",
paint: {
"circle-color": "#ff0000",
"circle-opacity": 0.5,
"circle-radius": 4,
"circle-stroke-width": 1,
"circle-stroke-color": "#fff",
"circle-stroke-opacity": 0.5
}
});
map.addLayer({
id: "fullpass-symbol",
type: "symbol",
source: "fullpassesSource",
layout: {
"text-field": ["get", "name"],
"text-font": [
"literal",
["DIN Offc Pro Italic", "Arial Unicode MS Regular"]
],
"text-offset": [0, 1.25],
"text-anchor": "top"
}
});
map.addLayer({
id: "outline",
type: "line",
source: "fulldirectionSource",
layout: {},
paint: {
"line-color": "#00f",
"line-width": 2
}
});
{
map.on("dragend", () => {
console.log("dragend");
updateMapboxParamDiv();
});
map.on("zoomend", () => {
console.log("zoomend");
updateMapboxParamDiv();
});
map.on("pitchend", () => {
console.log("pitchend");
updateMapboxParamDiv();
});
}
});
}