diff --git a/webclient/app/components/IndoorMap.vue b/webclient/app/components/IndoorMap.vue index 23b56c6de..54c16c338 100644 --- a/webclient/app/components/IndoorMap.vue +++ b/webclient/app/components/IndoorMap.vue @@ -4,7 +4,6 @@ import { AttributionControl, FullscreenControl, GeolocateControl, Map, Marker, N import { webglSupport } from "~/composables/webglSupport"; import type { MaplibreMapWithIndoor, IndoorMapOptions } from "maplibre-gl-indoor"; import type { components } from "~/api_types"; -import { indoorLayers } from "~/composables/indoorLayer"; import type { FeatureCollection } from "geojson"; const props = defineProps<{ data: DetailsResponse }>(); @@ -177,8 +176,6 @@ async function initMap(containerId: string) { // Retrieve the geojson from the path and add the map const geojson: FeatureCollection = await (await fetch("/gare-de-l-est.geojson")).json(); const indoorOptions = { - beforeLayerId: "poi_z16", - layers: indoorLayers, showFeaturesWithEmptyLevel: false, } as IndoorMapOptions; const indoorMap = IndoorMap.fromGeojson(geojson, indoorOptions); diff --git a/webclient/app/composables/indoorLayer.ts b/webclient/app/composables/indoorLayer.ts deleted file mode 100644 index f47c065cd..000000000 --- a/webclient/app/composables/indoorLayer.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { LayerSpecification } from "maplibre-gl"; - -export const indoorLayers: LayerSpecification[] = [ - { - id: "indoor-areas", - type: "fill", - source: "indoor", - filter: ["==", ["get", "indoor"], "area"], - paint: { - "fill-color": "#ff0084", - "fill-outline-color": "#000", - "fill-antialias": true, // otherwise the outline is invisible sometimes.. - "fill-opacity": 0.5, - }, - }, - { - id: "indoor-corridors", - type: "fill", - source: "indoor", - filter: ["==", ["get", "indoor"], "corridor"], - paint: { - "fill-color": "#8dd1fc", - "fill-opacity": 0.5, - "fill-outline-color": "#000", - "fill-antialias": true, // otherwise the outline is invisible sometimes.. - }, - }, - { - id: "indoor-rooms", - type: "fill", - source: "indoor", - filter: ["==", ["get", "indoor"], "room"], - paint: { - "fill-color": "#e0e0e0", - "fill-opacity": 0.5, - "fill-outline-color": "#000", - "fill-antialias": true, // otherwise the outline is invisible sometimes.. - }, - }, - { - id: "indoor-walls", - type: "fill", - source: "indoor", - filter: ["==", ["get", "indoor"], "wall"], - paint: { - "fill-color": "#000", - "fill-opacity": 0.5, - }, - }, - { - id: "indoor-doors", - type: "fill", - source: "indoor", - filter: ["==", ["get", "indoor"], "door"], - paint: { - "fill-color": "#00ffcc", - "fill-opacity": 0.5, - }, - }, - { - id: "indoor-roomnames", - type: "symbol", - source: "indoor", - filter: ["==", ["get", "indoor"], "area"], - layout: { - "text-field": - "eval(" + - 'has_tag_key("level")' + - '?concat(prop(text)," (",get(split(";",tag("level")),0),")")' + - ":prop(text))", - "text-size": 12, - }, - paint: { - "text-opacity": 1, - "text-color": "white", - "text-halo-width": 2, - "text-halo-color": "rgb(48, 112, 179, 0.3)", - }, - }, - { - id: "indoor-areanames", - type: "symbol", - source: "indoor", - filter: ["==", ["get", "indoor"], "area"], - layout: { - "text-field": - "eval(" + - 'has_tag_key("amenity")' + - '?concat(get(split(";",tag(room)),0)," (",get(split(";",tag("amenity")),0),")")' + - ':has_tag_key("shop")' + - '?concat(get(split(";",tag(room)),0)," (",get(split(";",tag("shop")),0),")")' + - ':has_tag_key("name")' + - '?concat(get(split(";",tag(room)),0)," (",get(split(";",tag("name")),0),")")' + - ':has_tag_key("level")' + - '?concat(get(split(";",tag(room)),0)," (",get(split(";",tag("level")),0),")")' + - ':get(split(";",tag(room)),0))', - "text-size": 12, - }, - paint: { - "text-opacity": 1, - "text-color": "white", - "text-halo-width": 2, - "text-halo-color": "rgb(48, 112, 179, 0.3)", - }, - }, -]; diff --git a/webclient/package.json b/webclient/package.json index 65b1ff268..cb2edcafd 100644 --- a/webclient/package.json +++ b/webclient/package.json @@ -28,7 +28,7 @@ "@vueuse/router": "10.11.0", "geojson": "0.5.0", "maplibre-gl": "4.5.1", - "maplibre-gl-indoor": "0.0.6", + "maplibre-gl-indoor": "0.0.7", "nightwind": "1.1.13", "nuxt": "3.12.4", "sharp": "0.33.4", diff --git a/webclient/pnpm-lock.yaml b/webclient/pnpm-lock.yaml index 54db88265..57fa08358 100644 --- a/webclient/pnpm-lock.yaml +++ b/webclient/pnpm-lock.yaml @@ -54,8 +54,8 @@ importers: specifier: 4.5.1 version: 4.5.1 maplibre-gl-indoor: - specifier: 0.0.6 - version: 0.0.6 + specifier: 0.0.7 + version: 0.0.7 nightwind: specifier: 1.1.13 version: 1.1.13(tailwindcss@3.4.7) @@ -4143,8 +4143,8 @@ packages: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} - maplibre-gl-indoor@0.0.6: - resolution: {integrity: sha512-+RLD1G8bS4FUmvfC8Bk1x4Ej/kRMRuk+BF7DS5RK3FPb0vEYK/V6hScw1LU94VZgGYkcVx6916JqSjXG3AUWZg==} + maplibre-gl-indoor@0.0.7: + resolution: {integrity: sha512-bS8b8InHRdUNRk2PFYmk+Jkq8Ndx5D2PrRDtWoJjFFoRHeCgAtd29SvwE0wa1ku/dv2mitLzwFAy9xVWzXsE6A==} maplibre-gl@4.5.1: resolution: {integrity: sha512-pKFDK8ZU2atwZWC8gdPVhN7Bf5HIPgtA+IG/iQ7J6WgmqSwCSmylc5q3stahWqXfx9PYUwVNJITrp1Hw96SUiA==} @@ -11496,7 +11496,7 @@ snapshots: dependencies: semver: 6.3.1 - maplibre-gl-indoor@0.0.6: + maplibre-gl-indoor@0.0.7: dependencies: '@turf/bbox': 7.0.0 '@turf/destination': 7.0.0