feat(map): update map view handling with new query parameters and error messaging

This commit is contained in:
Ivan
2026-04-23 02:26:51 -05:00
parent 2d175fb63e
commit 97235d46cc
+30
View File
@@ -1138,6 +1138,27 @@ export default {
break;
}
case "lxm.ingest_uri.result": {
if (json.ingest_type === "map_view" && json.map_query) {
const mq = json.map_query;
const query = {
lat: String(mq.lat),
lon: String(mq.lon),
zoom: String(mq.zoom),
};
if (mq.layers) {
query.layers = mq.layers;
}
if (mq.label) {
query.label = mq.label;
}
await this.$router.push({ name: "map", query });
if (json.status === "error") {
ToastUtils.error(json.message);
} else if (json.message) {
ToastUtils.info(json.message);
}
break;
}
if (json.status === "success") {
ToastUtils.success(json.message);
} else if (json.status === "error") {
@@ -1698,6 +1719,15 @@ export default {
if (!normalizedUrl) {
return;
}
if (/^(meshchatx|meshchat):\/\/map\b/i.test(normalizedUrl)) {
WebSocketConnection.send(
JSON.stringify({
type: "lxm.ingest_uri",
uri: normalizedUrl,
})
);
return;
}
if (/^lxm(a|f)?:\/\//i.test(normalizedUrl)) {
WebSocketConnection.send(
JSON.stringify({