Expand 20nm preservation audit and add Hakata hotspot audit
This commit is contained in:
@@ -314,7 +314,7 @@
|
||||
|
||||
<script src="https://unpkg.com/maplibre-gl@4.7.1/dist/maplibre-gl.js"></script>
|
||||
<script>
|
||||
const HTML_VERSION = "compare-r14-20260401-1523";
|
||||
const HTML_VERSION = "compare-r15-20260401-1705";
|
||||
const ORIGINAL_STYLE_URL = "./style.json";
|
||||
const ORIGINAL_TILE_URL = "http://192.168.200.184/newpec/exported_auto/tile.mapple-on.jp__newpec-mvt-20260106__z___x___y_.pbf/tiles/{z}/{x}/{y}.pbf";
|
||||
const PROFILES = {
|
||||
@@ -325,7 +325,7 @@
|
||||
deliveryPaneLabel: "最终 release style + 唐津 20 海里 final PBF",
|
||||
deliveryStyleUrl: "./domain/style.navsea-delivery-karatsu-20nm-final.json",
|
||||
deliveryTileUrl: "http://192.168.200.184/pbf-delivery-karatsu-20nm-final/{z}/{x}/{y}.pbf",
|
||||
deliveryStyleVersion: "karatsu-final-style-r8-20260401-1616",
|
||||
deliveryStyleVersion: "karatsu-final-style-r11-20260401-1719",
|
||||
deliveryPbfVersion: "karatsu-final-pbf-20nm-20260401-0248",
|
||||
deliveryStyleFile: "style.navsea-delivery-karatsu-20nm-final.json",
|
||||
deliveryPbfName: "pbf-delivery-karatsu-20nm-final",
|
||||
@@ -392,6 +392,43 @@
|
||||
return PROFILES[currentProfileKey];
|
||||
}
|
||||
|
||||
function parseNumberParam(value) {
|
||||
if (value === null || value === undefined || value === "") return null;
|
||||
const parsed = Number(value);
|
||||
return Number.isFinite(parsed) ? parsed : null;
|
||||
}
|
||||
|
||||
function getRequestedCamera(profile) {
|
||||
const centerValue = searchParams.get("center");
|
||||
const zoomValue = parseNumberParam(searchParams.get("zoom"));
|
||||
const bearingValue = parseNumberParam(searchParams.get("bearing"));
|
||||
const pitchValue = parseNumberParam(searchParams.get("pitch"));
|
||||
|
||||
if (!centerValue && zoomValue === null && bearingValue === null && pitchValue === null) {
|
||||
return {
|
||||
center: profile.initialView.center,
|
||||
zoom: profile.initialView.zoom,
|
||||
bearing: profile.initialView.bearing,
|
||||
pitch: profile.initialView.pitch
|
||||
};
|
||||
}
|
||||
|
||||
let center = profile.initialView.center;
|
||||
if (centerValue) {
|
||||
const parts = centerValue.split(",").map((item) => Number(item.trim()));
|
||||
if (parts.length === 2 && parts.every(Number.isFinite)) {
|
||||
center = [parts[0], parts[1]];
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
center,
|
||||
zoom: zoomValue ?? profile.initialView.zoom,
|
||||
bearing: bearingValue ?? profile.initialView.bearing,
|
||||
pitch: pitchValue ?? profile.initialView.pitch
|
||||
};
|
||||
}
|
||||
|
||||
function applyProfileUi() {
|
||||
const profile = getCurrentProfile();
|
||||
pageTitleEl.textContent = profile.pageTitle;
|
||||
@@ -504,6 +541,7 @@
|
||||
|
||||
async function loadMaps() {
|
||||
const profile = getCurrentProfile();
|
||||
const requestedCamera = getRequestedCamera(profile);
|
||||
styleVersion = `${HTML_VERSION}-${Date.now()}`;
|
||||
reloadBtn.disabled = true;
|
||||
homeBtn.disabled = true;
|
||||
@@ -522,18 +560,18 @@
|
||||
originalMap = new maplibregl.Map({
|
||||
container: "map-original",
|
||||
style: originalStyle,
|
||||
center: profile.initialView.center,
|
||||
zoom: profile.initialView.zoom,
|
||||
bearing: profile.initialView.bearing,
|
||||
pitch: profile.initialView.pitch
|
||||
center: requestedCamera.center,
|
||||
zoom: requestedCamera.zoom,
|
||||
bearing: requestedCamera.bearing,
|
||||
pitch: requestedCamera.pitch
|
||||
});
|
||||
deliveryMap = new maplibregl.Map({
|
||||
container: "map-delivery",
|
||||
style: deliveryStyle,
|
||||
center: profile.initialView.center,
|
||||
zoom: profile.initialView.zoom,
|
||||
bearing: profile.initialView.bearing,
|
||||
pitch: profile.initialView.pitch
|
||||
center: requestedCamera.center,
|
||||
zoom: requestedCamera.zoom,
|
||||
bearing: requestedCamera.bearing,
|
||||
pitch: requestedCamera.pitch
|
||||
});
|
||||
|
||||
originalMap.addControl(new maplibregl.NavigationControl(), "top-right");
|
||||
@@ -553,7 +591,7 @@
|
||||
originalMap.on("load", markLoaded);
|
||||
deliveryMap.on("load", markLoaded);
|
||||
} else {
|
||||
const camera = profile.initialView;
|
||||
const camera = requestedCamera;
|
||||
let loaded = 0;
|
||||
function markLoaded() {
|
||||
loaded += 1;
|
||||
@@ -595,6 +633,11 @@
|
||||
bearing: profile.initialView.bearing,
|
||||
pitch: profile.initialView.pitch
|
||||
};
|
||||
searchParams.delete("center");
|
||||
searchParams.delete("zoom");
|
||||
searchParams.delete("bearing");
|
||||
searchParams.delete("pitch");
|
||||
window.history.replaceState({}, "", `${window.location.pathname}?${searchParams.toString()}`);
|
||||
originalMap.jumpTo(camera);
|
||||
deliveryMap.jumpTo(camera);
|
||||
setStatus(`已回到${profile.label}初始视角。`);
|
||||
|
||||
@@ -1901,6 +1901,7 @@
|
||||
"source-layer": "facility_boundary_point",
|
||||
"layout": {
|
||||
"icon-allow-overlap": true,
|
||||
"icon-ignore-placement": true,
|
||||
"icon-image": [
|
||||
"case",
|
||||
[
|
||||
@@ -1915,8 +1916,14 @@
|
||||
],
|
||||
505,
|
||||
"symbol-daytime-505",
|
||||
510,
|
||||
"symbol-daytime-505",
|
||||
520,
|
||||
"symbol-daytime-520",
|
||||
530,
|
||||
"symbol-daytime-530",
|
||||
550,
|
||||
"symbol-daytime-550",
|
||||
"symbol-daytime-520"
|
||||
],
|
||||
"symbol-daytime-520"
|
||||
|
||||
Reference in New Issue
Block a user