Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

chore: add `@indoorequal/vue-maplibre-gl`, `maplibre-gl`, `nuxt-maplibre` and resolve these dep

HoshinoSuzumi70bece95542f
diff --git a/app/assets/mapStyles/maplibre_basic.json b/app/assets/mapStyles/maplibre_basic.json
new file mode 100644
index 00000000..287c2eb9
--- /dev/null
+++ b/app/assets/mapStyles/maplibre_basic.json
@@ -0,0 +1,817 @@
+{
+ "version": 8,
+ "name": "ChronoFrame Basic",
+ "metadata": {
+ "mapbox:autocomposite": false,
+ "mapbox:type": "template",
+ "maputnik:renderer": "mbgljs",
+ "openmaptiles:version": "3.x",
+ "openmaptiles:mapbox:owner": "openmaptiles",
+ "openmaptiles:mapbox:source:url": "mapbox://openmaptiles.4qljc88t"
+ },
+ "light": {"anchor": "viewport"},
+ "projection": {"type": "globe"},
+ "sources": {
+ "openmaptiles": {
+ "type": "vector",
+ "url": "https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL"
+ }
+ },
+ "sprite": "https://openmaptiles.github.io/maptiler-basic-gl-style/sprite",
+ "glyphs": "https://api.maptiler.com/fonts/{fontstack}/{range}.pbf?key=get_your_own_OpIi9ZULNHzrESv6T2vL",
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {"background-color": "hsl(47, 26%, 88%)"}
+ },
+ {
+ "id": "landuse-residential",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landuse",
+ "filter": [
+ "all",
+ ["==", "$type", "Polygon"],
+ ["in", "class", "residential", "suburb", "neighbourhood"]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {"fill-color": "hsl(47, 13%, 86%)", "fill-opacity": 0.7}
+ },
+ {
+ "id": "landcover_grass",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landcover",
+ "filter": ["==", "class", "grass"],
+ "paint": {"fill-color": "hsl(82, 46%, 72%)", "fill-opacity": 0.45}
+ },
+ {
+ "id": "landcover_wood",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landcover",
+ "filter": ["==", "class", "wood"],
+ "paint": {
+ "fill-color": "hsl(82, 46%, 72%)",
+ "fill-opacity": {"base": 1, "stops": [[8, 0.6], [22, 1]]}
+ }
+ },
+ {
+ "id": "water",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "water",
+ "filter": [
+ "all",
+ ["==", "$type", "Polygon"],
+ ["!=", "intermittent", 1],
+ ["!=", "brunnel", "tunnel"]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {"fill-color": "hsl(205, 56%, 73%)"}
+ },
+ {
+ "id": "water_intermittent",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "water",
+ "filter": ["all", ["==", "$type", "Polygon"], ["==", "intermittent", 1]],
+ "layout": {"visibility": "visible"},
+ "paint": {"fill-color": "hsl(205, 56%, 73%)", "fill-opacity": 0.7}
+ },
+ {
+ "id": "landcover-ice-shelf",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landcover",
+ "filter": ["==", "subclass", "ice_shelf"],
+ "layout": {"visibility": "visible"},
+ "paint": {"fill-color": "hsl(47, 26%, 88%)", "fill-opacity": 0.8}
+ },
+ {
+ "id": "landcover-glacier",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landcover",
+ "filter": ["==", "subclass", "glacier"],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "fill-color": "hsl(47, 22%, 94%)",
+ "fill-opacity": {"base": 1, "stops": [[0, 1], [8, 0.5]]}
+ }
+ },
+ {
+ "id": "landcover_sand",
+ "type": "fill",
+ "metadata": {},
+ "source": "openmaptiles",
+ "source-layer": "landcover",
+ "filter": ["all", ["in", "class", "sand"]],
+ "paint": {
+ "fill-antialias": false,
+ "fill-color": "rgba(232, 214, 38, 1)",
+ "fill-opacity": 0.3
+ }
+ },
+ {
+ "id": "landuse",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landuse",
+ "filter": ["==", "class", "agriculture"],
+ "layout": {"visibility": "visible"},
+ "paint": {"fill-color": "#eae0d0"}
+ },
+ {
+ "id": "landuse_overlay_national_park",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "landcover",
+ "filter": ["==", "class", "national_park"],
+ "paint": {
+ "fill-color": "#E1EBB0",
+ "fill-opacity": {"base": 1, "stops": [[5, 0], [9, 0.75]]}
+ }
+ },
+ {
+ "id": "waterway-tunnel",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "waterway",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "tunnel"]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "line-color": "hsl(205, 56%, 73%)",
+ "line-dasharray": [3, 3],
+ "line-gap-width": {"stops": [[12, 0], [20, 6]]},
+ "line-opacity": 1,
+ "line-width": {"base": 1.4, "stops": [[8, 1], [20, 2]]}
+ }
+ },
+ {
+ "id": "waterway",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "waterway",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["!in", "brunnel", "tunnel", "bridge"],
+ ["!=", "intermittent", 1]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "line-color": "hsl(205, 56%, 73%)",
+ "line-opacity": 1,
+ "line-width": {"base": 1.4, "stops": [[8, 1], [20, 8]]}
+ }
+ },
+ {
+ "id": "waterway_intermittent",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "waterway",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["!in", "brunnel", "tunnel", "bridge"],
+ ["==", "intermittent", 1]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "line-color": "hsl(205, 56%, 73%)",
+ "line-dasharray": [2, 1],
+ "line-opacity": 1,
+ "line-width": {"base": 1.4, "stops": [[8, 1], [20, 8]]}
+ }
+ },
+ {
+ "id": "tunnel_railway_transit",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "minzoom": 0,
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "tunnel"],
+ ["==", "class", "transit"]
+ ],
+ "layout": {"line-cap": "butt", "line-join": "miter"},
+ "paint": {
+ "line-color": "hsl(34, 12%, 66%)",
+ "line-dasharray": [3, 3],
+ "line-opacity": {"base": 1, "stops": [[11, 0], [16, 1]]}
+ }
+ },
+ {
+ "id": "building",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "building",
+ "paint": {
+ "fill-antialias": true,
+ "fill-color": "rgba(222, 211, 190, 1)",
+ "fill-opacity": {"base": 1, "stops": [[13, 0], [15, 1]]},
+ "fill-outline-color": {
+ "stops": [
+ [15, "rgba(212, 177, 146, 0)"],
+ [16, "rgba(212, 177, 146, 0.5)"]
+ ]
+ }
+ }
+ },
+ {
+ "id": "housenumber",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "housenumber",
+ "minzoom": 17,
+ "filter": ["==", "$type", "Point"],
+ "layout": {
+ "text-field": "{housenumber}",
+ "text-font": ["Noto Sans Regular"],
+ "text-size": 10
+ },
+ "paint": {"text-color": "rgba(212, 177, 146, 1)"}
+ },
+ {
+ "id": "road_area_pier",
+ "type": "fill",
+ "metadata": {},
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": ["all", ["==", "$type", "Polygon"], ["==", "class", "pier"]],
+ "layout": {"visibility": "visible"},
+ "paint": {"fill-antialias": true, "fill-color": "hsl(47, 26%, 88%)"}
+ },
+ {
+ "id": "road_pier",
+ "type": "line",
+ "metadata": {},
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": ["all", ["==", "$type", "LineString"], ["in", "class", "pier"]],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "hsl(47, 26%, 88%)",
+ "line-width": {"base": 1.2, "stops": [[15, 1], [17, 4]]}
+ }
+ },
+ {
+ "id": "road_bridge_area",
+ "type": "fill",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "Polygon"],
+ ["in", "brunnel", "bridge"]
+ ],
+ "layout": {},
+ "paint": {"fill-color": "hsl(47, 26%, 88%)", "fill-opacity": 0.5}
+ },
+ {
+ "id": "road_path",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["in", "class", "path", "track"]
+ ],
+ "layout": {"line-cap": "square", "line-join": "bevel"},
+ "paint": {
+ "line-color": "hsl(0, 0%, 97%)",
+ "line-dasharray": [1, 1],
+ "line-width": {"base": 1.55, "stops": [[4, 0.25], [20, 10]]}
+ }
+ },
+ {
+ "id": "road_minor",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "minzoom": 13,
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["in", "class", "minor", "service"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "hsl(0, 0%, 97%)",
+ "line-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]}
+ }
+ },
+ {
+ "id": "tunnel_minor",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "tunnel"],
+ ["==", "class", "minor_road"]
+ ],
+ "layout": {"line-cap": "butt", "line-join": "miter"},
+ "paint": {
+ "line-color": "#efefef",
+ "line-dasharray": [0.36, 0.18],
+ "line-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]}
+ }
+ },
+ {
+ "id": "tunnel_major",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "tunnel"],
+ ["in", "class", "primary", "secondary", "tertiary", "trunk"]
+ ],
+ "layout": {"line-cap": "butt", "line-join": "miter"},
+ "paint": {
+ "line-color": "#fff",
+ "line-dasharray": [0.28, 0.14],
+ "line-width": {"base": 1.4, "stops": [[6, 0.5], [20, 30]]}
+ }
+ },
+ {
+ "id": "aeroway-area",
+ "type": "fill",
+ "metadata": {"mapbox:group": "1444849345966.4436"},
+ "source": "openmaptiles",
+ "source-layer": "aeroway",
+ "minzoom": 4,
+ "filter": [
+ "all",
+ ["==", "$type", "Polygon"],
+ ["in", "class", "runway", "taxiway"]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "fill-color": "rgba(255, 255, 255, 1)",
+ "fill-opacity": {"base": 1, "stops": [[13, 0], [14, 1]]}
+ }
+ },
+ {
+ "id": "aeroway-taxiway",
+ "type": "line",
+ "metadata": {"mapbox:group": "1444849345966.4436"},
+ "source": "openmaptiles",
+ "source-layer": "aeroway",
+ "minzoom": 12,
+ "filter": [
+ "all",
+ ["in", "class", "taxiway"],
+ ["==", "$type", "LineString"]
+ ],
+ "layout": {
+ "line-cap": "round",
+ "line-join": "round",
+ "visibility": "visible"
+ },
+ "paint": {
+ "line-color": "rgba(255, 255, 255, 1)",
+ "line-opacity": 1,
+ "line-width": {"base": 1.5, "stops": [[12, 1], [17, 10]]}
+ }
+ },
+ {
+ "id": "aeroway-runway",
+ "type": "line",
+ "metadata": {"mapbox:group": "1444849345966.4436"},
+ "source": "openmaptiles",
+ "source-layer": "aeroway",
+ "minzoom": 4,
+ "filter": [
+ "all",
+ ["in", "class", "runway"],
+ ["==", "$type", "LineString"]
+ ],
+ "layout": {
+ "line-cap": "round",
+ "line-join": "round",
+ "visibility": "visible"
+ },
+ "paint": {
+ "line-color": "rgba(255, 255, 255, 1)",
+ "line-opacity": 1,
+ "line-width": {"base": 1.5, "stops": [[11, 4], [17, 50]]}
+ }
+ },
+ {
+ "id": "road_trunk_primary",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["in", "class", "trunk", "primary"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "#fff",
+ "line-width": {"base": 1.4, "stops": [[6, 0.5], [20, 30]]}
+ }
+ },
+ {
+ "id": "road_secondary_tertiary",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["in", "class", "secondary", "tertiary"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "#fff",
+ "line-width": {"base": 1.4, "stops": [[6, 0.5], [20, 20]]}
+ }
+ },
+ {
+ "id": "road_major_motorway",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "class", "motorway"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "hsl(0, 0%, 100%)",
+ "line-offset": 0,
+ "line-width": {"base": 1.4, "stops": [[8, 1], [16, 10]]}
+ }
+ },
+ {
+ "id": "railway-transit",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "class", "transit"],
+ ["!=", "brunnel", "tunnel"]
+ ],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "line-color": "hsl(34, 12%, 66%)",
+ "line-opacity": {"base": 1, "stops": [[11, 0], [16, 1]]}
+ }
+ },
+ {
+ "id": "railway",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": ["==", "class", "rail"],
+ "layout": {"visibility": "visible"},
+ "paint": {
+ "line-color": "hsl(34, 12%, 66%)",
+ "line-opacity": {"base": 1, "stops": [[11, 0], [16, 1]]}
+ }
+ },
+ {
+ "id": "waterway-bridge-case",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "waterway",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "bridge"]
+ ],
+ "layout": {"line-cap": "butt", "line-join": "miter"},
+ "paint": {
+ "line-color": "#bbbbbb",
+ "line-gap-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]},
+ "line-width": {"base": 1.6, "stops": [[12, 0.5], [20, 10]]}
+ }
+ },
+ {
+ "id": "waterway-bridge",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "waterway",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "bridge"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "hsl(205, 56%, 73%)",
+ "line-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]}
+ }
+ },
+ {
+ "id": "bridge_minor case",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "bridge"],
+ ["==", "class", "minor_road"]
+ ],
+ "layout": {"line-cap": "butt", "line-join": "miter"},
+ "paint": {
+ "line-color": "#dedede",
+ "line-gap-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]},
+ "line-width": {"base": 1.6, "stops": [[12, 0.5], [20, 10]]}
+ }
+ },
+ {
+ "id": "bridge_major case",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "bridge"],
+ ["in", "class", "primary", "secondary", "tertiary", "trunk"]
+ ],
+ "layout": {"line-cap": "butt", "line-join": "miter"},
+ "paint": {
+ "line-color": "#dedede",
+ "line-gap-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]},
+ "line-width": {"base": 1.6, "stops": [[12, 0.5], [20, 10]]}
+ }
+ },
+ {
+ "id": "bridge_minor",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "bridge"],
+ ["==", "class", "minor_road"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "#efefef",
+ "line-width": {"base": 1.55, "stops": [[4, 0.25], [20, 30]]}
+ }
+ },
+ {
+ "id": "bridge_major",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "transportation",
+ "filter": [
+ "all",
+ ["==", "$type", "LineString"],
+ ["==", "brunnel", "bridge"],
+ ["in", "class", "primary", "secondary", "tertiary", "trunk"]
+ ],
+ "layout": {"line-cap": "round", "line-join": "round"},
+ "paint": {
+ "line-color": "#fff",
+ "line-width": {"base": 1.4, "stops": [[6, 0.5], [20, 30]]}
+ }
+ },
+ {
+ "id": "admin_sub",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "boundary",
+ "filter": ["in", "admin_level", 4, 6, 8],
+ "layout": {"visibility": "visible"},
+ "paint": {"line-color": "hsla(0, 0%, 60%, 0.5)", "line-dasharray": [2, 1]}
+ },
+ {
+ "id": "admin_country_z0-4",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "boundary",
+ "minzoom": 0,
+ "maxzoom": 5,
+ "filter": [
+ "all",
+ ["<=", "admin_level", 2],
+ ["==", "$type", "LineString"],
+ ["!has", "claimed_by"]
+ ],
+ "layout": {
+ "line-cap": "round",
+ "line-join": "round",
+ "visibility": "visible"
+ },
+ "paint": {
+ "line-color": "hsl(0, 0%, 60%)",
+ "line-width": {"base": 1.3, "stops": [[3, 0.5], [22, 15]]}
+ }
+ },
+ {
+ "id": "admin_country_z5-",
+ "type": "line",
+ "source": "openmaptiles",
+ "source-layer": "boundary",
+ "minzoom": 5,
+ "filter": [
+ "all",
+ ["<=", "admin_level", 2],
+ ["==", "$type", "LineString"]
+ ],
+ "layout": {
+ "line-cap": "round",
+ "line-join": "round",
+ "visibility": "visible"
+ },
+ "paint": {
+ "line-color": "hsl(0, 0%, 60%)",
+ "line-width": {"base": 1.3, "stops": [[3, 0.5], [22, 15]]}
+ }
+ },
+ {
+ "id": "poi_label",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "poi",
+ "minzoom": 14,
+ "filter": ["all", ["==", "$type", "Point"], ["==", "rank", 1]],
+ "layout": {
+ "icon-size": 1,
+ "text-anchor": "top",
+ "text-field": "{name:latin}\n{name:nonlatin}",
+ "text-font": ["Noto Sans Regular"],
+ "text-max-width": 8,
+ "text-offset": [0, 0.5],
+ "text-size": 11,
+ "visibility": "visible"
+ },
+ "paint": {
+ "text-color": "#666",
+ "text-halo-blur": 1,
+ "text-halo-color": "rgba(255,255,255,0.75)",
+ "text-halo-width": 1
+ }
+ },
+ {
+ "id": "airport-label",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "aerodrome_label",
+ "minzoom": 10,
+ "filter": ["all", ["has", "iata"]],
+ "layout": {
+ "icon-size": 1,
+ "text-anchor": "top",
+ "text-field": "{name:latin}\n{name:nonlatin}",
+ "text-font": ["Noto Sans Regular"],
+ "text-max-width": 8,
+ "text-offset": [0, 0.5],
+ "text-size": 11,
+ "visibility": "visible"
+ },
+ "paint": {
+ "text-color": "#666",
+ "text-halo-blur": 1,
+ "text-halo-color": "rgba(255,255,255,0.75)",
+ "text-halo-width": 1
+ }
+ },
+ {
+ "id": "road_major_label",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "transportation_name",
+ "minzoom": 13,
+ "filter": ["==", "$type", "LineString"],
+ "layout": {
+ "symbol-placement": "line",
+ "text-field": "{name:latin} {name:nonlatin}",
+ "text-font": ["Noto Sans Regular"],
+ "text-letter-spacing": 0.1,
+ "text-rotation-alignment": "map",
+ "text-size": {"base": 1.4, "stops": [[10, 8], [20, 14]]},
+ "text-transform": "uppercase",
+ "visibility": "visible"
+ },
+ "paint": {
+ "text-color": "#000",
+ "text-halo-color": "hsl(0, 0%, 100%)",
+ "text-halo-width": 2
+ }
+ },
+ {
+ "id": "place_label_other",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "place",
+ "minzoom": 8,
+ "filter": [
+ "all",
+ ["==", "$type", "Point"],
+ ["!in", "class", "city", "state", "country", "continent"]
+ ],
+ "layout": {
+ "text-anchor": "center",
+ "text-field": "{name:latin}\n{name:nonlatin}",
+ "text-font": ["Noto Sans Regular"],
+ "text-max-width": 6,
+ "text-size": {"stops": [[6, 10], [12, 14]]},
+ "visibility": "visible"
+ },
+ "paint": {
+ "text-color": "hsl(0, 0%, 25%)",
+ "text-halo-blur": 0,
+ "text-halo-color": "hsl(0, 0%, 100%)",
+ "text-halo-width": 2
+ }
+ },
+ {
+ "id": "place_label_city",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "place",
+ "maxzoom": 16,
+ "filter": ["all", ["==", "$type", "Point"], ["==", "class", "city"]],
+ "layout": {
+ "text-field": "{name:latin}\n{name:nonlatin}",
+ "text-font": ["Noto Sans Regular"],
+ "text-max-width": 10,
+ "text-size": {"stops": [[3, 12], [8, 16]]}
+ },
+ "paint": {
+ "text-color": "hsl(0, 0%, 0%)",
+ "text-halo-blur": 0,
+ "text-halo-color": "hsla(0, 0%, 100%, 0.75)",
+ "text-halo-width": 2
+ }
+ },
+ {
+ "id": "country_label-other",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "place",
+ "maxzoom": 12,
+ "filter": [
+ "all",
+ ["==", "$type", "Point"],
+ ["==", "class", "country"],
+ ["!has", "iso_a2"]
+ ],
+ "layout": {
+ "text-field": "{name:latin}",
+ "text-font": ["Noto Sans Regular"],
+ "text-max-width": 10,
+ "text-size": {"stops": [[3, 12], [8, 22]]},
+ "visibility": "visible"
+ },
+ "paint": {
+ "text-color": "hsl(0, 0%, 13%)",
+ "text-halo-blur": 0,
+ "text-halo-color": "rgba(255,255,255,0.75)",
+ "text-halo-width": 2
+ }
+ },
+ {
+ "id": "country_label",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "place",
+ "maxzoom": 12,
+ "filter": [
+ "all",
+ ["==", "$type", "Point"],
+ ["==", "class", "country"],
+ ["has", "iso_a2"]
+ ],
+ "layout": {
+ "text-field": "{name:latin}",
+ "text-font": ["Noto Sans Bold"],
+ "text-max-width": 10,
+ "text-size": {"stops": [[3, 12], [8, 22]]},
+ "visibility": "visible"
+ },
+ "paint": {
+ "text-color": "hsl(0, 0%, 13%)",
+ "text-halo-blur": 0,
+ "text-halo-color": "rgba(255,255,255,0.75)",
+ "text-halo-width": 2
+ }
+ }
+ ],
+ "id": "basic"
+}
\ No newline at end of file
diff --git a/app/components/map/Provider.vue b/app/components/map/Provider.vue
new file mode 100644
index 00000000..ef75940a
--- /dev/null
+++ b/app/components/map/Provider.vue
@@ -0,0 +1,49 @@
+<script lang="ts" setup>
+import type { StyleSpecification } from 'maplibre-gl'
+import { twMerge } from 'tailwind-merge'
+import MaplibreBasicStyle from '~/assets/mapStyles/maplibre_basic.json'
+
+defineProps<{
+ class?: string
+}>()
+
+const emit = defineEmits<{
+ load: [map: any]
+}>()
+
+const mapConfig = useRuntimeConfig().public.map
+
+const provider = computed(() => mapConfig.provider)
+const mapStyle = computed(() => {
+ if (provider.value === 'mapbox') {
+ return `mapbox://styles/mapbox/standard`
+ } else {
+ return MaplibreBasicStyle as StyleSpecification
+ }
+})
+</script>
+
+<template>
+ <div :class="twMerge('w-full h-full', $props.class)">
+ <ClientOnly>
+ <MglMap
+ v-if="provider === 'maplibre'"
+ :map-style="mapStyle"
+ @map:load="emit('load', $event.map)"
+ >
+ <slot />
+ </MglMap>
+ <MapboxMap
+ v-else
+ :options="{
+ style: mapStyle,
+ }"
+ @load="emit('load', $event)"
+ >
+ <slot />
+ </MapboxMap>
+ </ClientOnly>
+ </div>
+</template>
+
+<style scoped></style>
diff --git a/app/pages/map-test.vue b/app/pages/map-test.vue
new file mode 100644
index 00000000..ceacd297
--- /dev/null
+++ b/app/pages/map-test.vue
@@ -0,0 +1,39 @@
+<script lang="ts" setup>
+import type { Map as MaplibreMap } from 'maplibre-gl'
+import type { Map as MapboxMap } from 'mapbox-gl'
+
+const mapInstance = ref<MaplibreMap | MapboxMap | null>(null)
+
+// function isMaplibreMap(map: any): map is MaplibreMap {
+// return map && typeof map.getStyle === 'function' && typeof map.setStyle === 'function'
+// }
+// function isMapboxMap(map: any): map is MapboxMap {
+// return map && typeof map.getStyle === 'function' && typeof map.setStyle === 'function'
+// }
+
+watch(mapInstance, (newMap) => {
+ if (newMap) {
+ mapInstance.value?.flyTo({
+ center: [-122.4, 37.8],
+ zoom: 12,
+ essential: true,
+ duration: 3000,
+ })
+ console.log('Map instance is ready:', newMap)
+ } else {
+ console.log('Map instance is null')
+ }
+})
+
+const onMapLoaded = (map: any) => {
+ mapInstance.value = map
+}
+</script>
+
+<template>
+ <div class="w-full h-screen">
+ <MapProvider @load="onMapLoaded"></MapProvider>
+ </div>
+</template>
+
+<style scoped></style>
diff --git a/nuxt.config.ts b/nuxt.config.ts
index acfabac7..1884ee49 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -22,6 +22,7 @@ export default defineNuxtConfig({
'dayjs-nuxt',
'@nuxtjs/i18n',
'nuxt-mapbox',
+ 'nuxt-maplibre',
'nuxt-og-image',
'nuxt-gtag',
],
@@ -42,6 +43,15 @@ export default defineNuxtConfig({
author: '',
avatarUrl: '',
},
+ map: {
+ provider: 'maplibre' as 'mapbox' | 'maplibre',
+ mapbox: {
+ style: ''
+ },
+ maplibre: {
+ style: '',
+ }
+ },
analytics: {
matomo: {
enabled: false,
@@ -122,17 +132,26 @@ export default defineNuxtConfig({
'tailwind-merge',
'thumbhash',
'mapbox-gl',
+ 'maplibre-gl',
+ '@indoorequal/vue-maplibre-gl',
'file-type',
'reka-ui',
'es-toolkit',
'tippy.js',
],
},
+ ssr: {
+ noExternal: ['@indoorequal/vue-maplibre-gl'],
+ },
css: {
devSourcemap: true,
},
build: {
sourcemap: false,
+ commonjsOptions: {
+ include: [/maplibre-gl/, /node_modules/],
+ transformMixedEsModules: true,
+ },
},
},
diff --git a/package.json b/package.json
index db045600..1ba64ab8 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"@aws-sdk/client-s3": "^3.908.0",
"@aws-sdk/s3-request-presigner": "^3.878.0",
"@chronoframe/webgl-image": "workspace:*",
+ "@indoorequal/vue-maplibre-gl": "^8.4.2",
"@nuxt/fonts": "0.11.4",
"@nuxt/icon": "2.0.0",
"@nuxt/image": "1.11.0",
@@ -51,11 +52,13 @@
"file-type": "^21.0.0",
"heic-convert": "^2.1.0",
"heic-to": "^1.2.2",
+ "maplibre-gl": "^5.9.0",
"motion-v": "^1.7.0",
"nuxt": "^4.1.2",
"nuxt-auth-utils": "0.5.23",
"nuxt-gtag": "4.0.0",
"nuxt-mapbox": "1.6.4",
+ "nuxt-maplibre": "^1.1.1",
"nuxt-og-image": "5.1.11",
"pinia": "^3.0.3",
"reka-ui": "^2.5.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 899a1f44..cefb95fe 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -20,6 +20,9 @@ importers:
'@chronoframe/webgl-image':
specifier: workspace:*
version: link:packages/webgl-image
+ '@indoorequal/vue-maplibre-gl':
+ specifier: ^8.4.2
'@nuxt/fonts':
specifier: 0.11.4
@@ -83,6 +86,9 @@ importers:
heic-to:
specifier: ^1.2.2
version: 1.2.2
+ maplibre-gl:
+ specifier: ^5.9.0
+ version: 5.9.0
motion-v:
specifier: ^1.7.0
@@ -98,6 +104,9 @@ importers:
nuxt-mapbox:
specifier: 1.6.4
+ nuxt-maplibre:
+ specifier: ^1.1.1
nuxt-og-image:
specifier: 5.1.11
@@ -1196,6 +1205,13 @@ packages:
cpu: [x64]
os: [win32]
+ '@indoorequal/[email protected]':
+ resolution: {integrity: sha512-oPSO37a5PrjG2PiYqnQmpaOHcwqZA1LaoQ3Pma/Mljt6zD9fE7fyS98TGznQezEXxBtrutjlNenmFC43zQULeA==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ maplibre-gl: ^5.0.0
+ vue: ^3.4.18
+
'@internationalized/[email protected]':
resolution: {integrity: sha512-oxDR/NTEJ1k+UFVQElaNIk65E/Z83HK1z1WI3lQyhTtnNg4R5oVXaPzK3jcpKG8UHKDVuDQHzn+wsxSz8RP3aw==}
@@ -1323,6 +1339,10 @@ packages:
'@mapbox/[email protected]':
resolution: {integrity: sha512-6sys1vUlhNCqMvJOqPEPSi0jc9tg7aJ//oG1A16H3PXoIt9whtNngD7UzBHUVTH15zunR/vRvMtGNVsogm1KzA==}
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA==}
+ hasBin: true
+
'@mapbox/[email protected]':
resolution: {integrity: sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==}
engines: {node: '>= 0.6'}
@@ -1366,6 +1386,13 @@ packages:
resolution: {integrity: sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==}
engines: {node: '>=6.0.0'}
+ '@maplibre/[email protected]':
+ resolution: {integrity: sha512-cE80g83fRcBbZbQC70siOUxUK6YJ/5ZkClDZbmm+hzrUbv+J6yntkMmcpdz9DbOrWOM7FHKR5rruc6Q/hWx5cA==}
+ hasBin: true
+
+ '@maplibre/[email protected]':
+ resolution: {integrity: sha512-YsW99BwnT+ukJRkseBcLuZHfITB4puJoxnqPVjo72rhW/TaawVYsgQHcqWLzTxqknttYoDpgyERzWSa/XrETdA==}
+
'@microsoft/[email protected]':
resolution: {integrity: sha512-TBbmSI2/BHpfR9YhQA7nH0nqVmGgJ0xH0Ex4D99/qBDAUpnhA2oikGmdXanbw9AWWY/ExBYIpkmY8dBHdla3YQ==}
@@ -4822,6 +4849,10 @@ packages:
resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
engines: {node: '>=16'}
@@ -5251,6 +5282,9 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
+ resolution: {integrity: sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==}
+
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
@@ -5470,6 +5504,10 @@ packages:
resolution: {integrity: sha512-I42ffZpiXwt0PG3PO6gMYQnoz+AInkirLe/+zoHjcfBTFoFkKYtu5gFwT1WGeSvNrVTqG2Bwp9zUjPw0PFGY+w==}
+ resolution: {integrity: sha512-YxW9glb/YrDXGDhqy1u+aG113+L86ttAUpTd6sCkGHyUKMXOX8qbGHJQVqxOczy+4CtRKnqcCfSura2MzB0nQA==}
+ engines: {node: '>=16.14.0', npm: '>=8.1.0'}
+
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
@@ -5773,6 +5811,9 @@ packages:
resolution: {integrity: sha512-g208L1m7diOCRj+lIf6+r+cKcJIR5aA4T0NEKKosUPnuZ2a4wlExb2zFrqXM5yfF2rbZMQee+fQc4H6AR0Oi1w==}
+ resolution: {integrity: sha512-Nc6bDM6+o6vyfZt2eOc2NNL7rdvcZwnlfKDkGXUwRNrUnEAgd2DMYSjdYcYINDH39flPKubig0jYU42g10oLnw==}
+
resolution: {integrity: sha512-LnioM0JsfrSYPo/4TgPBu+ncI6QNCejs0FVu/f/SLeygwrh3senm9MvlBi1tldE1AU0J7030uO8UekOlvFPPXQ==}
engines: {node: '>=18.0.0'}
@@ -6457,6 +6498,9 @@ packages:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
+ resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==}
+
resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}
@@ -8896,6 +8940,11 @@ snapshots:
optional: true
+ dependencies:
+ maplibre-gl: 5.9.0
+ vue: 3.5.21([email protected])
+
'@internationalized/[email protected]':
dependencies:
'@swc/helpers': 0.5.17
@@ -9039,6 +9088,11 @@ snapshots:
is-plain-obj: 1.1.0
xtend: 4.0.2
+ '@mapbox/[email protected]':
+ dependencies:
+ get-stream: 6.0.1
+ minimist: 1.2.8
+
'@mapbox/[email protected]': {}
'@mapbox/[email protected]':
@@ -9099,6 +9153,26 @@ snapshots:
'@mapbox/[email protected]': {}
+ '@maplibre/[email protected]':
+ dependencies:
+ '@mapbox/jsonlint-lines-primitives': 2.0.2
+ '@mapbox/unitbezier': 0.0.1
+ json-stringify-pretty-compact: 4.0.0
+ minimist: 1.2.8
+ quickselect: 3.0.0
+ rw: 1.3.3
+ tinyqueue: 3.0.0
+
+ '@maplibre/[email protected]':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+ '@mapbox/vector-tile': 2.0.4
+ '@types/geojson-vt': 3.2.5
+ '@types/supercluster': 7.1.3
+ geojson-vt: 4.0.2
+ pbf: 4.0.1
+ supercluster: 8.0.1
+
'@microsoft/[email protected](@types/[email protected])':
dependencies:
'@microsoft/tsdoc': 0.15.1
@@ -13321,6 +13395,8 @@ snapshots:
dependencies:
pump: 3.0.3
+
@@ -13757,6 +13833,8 @@ snapshots:
+
@@ -13994,6 +14072,31 @@ snapshots:
supercluster: 8.0.1
tinyqueue: 3.0.0
+ dependencies:
+ '@mapbox/geojson-rewind': 0.5.2
+ '@mapbox/jsonlint-lines-primitives': 2.0.2
+ '@mapbox/point-geometry': 1.1.0
+ '@mapbox/tiny-sdf': 2.0.7
+ '@mapbox/unitbezier': 0.0.1
+ '@mapbox/vector-tile': 2.0.4
+ '@mapbox/whoots-js': 3.1.0
+ '@maplibre/maplibre-gl-style-spec': 24.2.0
+ '@maplibre/vt-pbf': 4.0.3
+ '@types/geojson': 7946.0.16
+ '@types/geojson-vt': 3.2.5
+ '@types/supercluster': 7.1.3
+ earcut: 3.0.2
+ geojson-vt: 4.0.2
+ gl-matrix: 3.4.4
+ kdbush: 4.0.2
+ murmurhash-js: 1.0.0
+ pbf: 4.0.1
+ potpack: 2.1.0
+ quickselect: 3.0.0
+ supercluster: 8.0.1
+ tinyqueue: 3.0.0
+
@@ -14386,6 +14489,13 @@ snapshots:
- utf-8-validate
- vite
+ dependencies:
+ '@indoorequal/vue-maplibre-gl': 8.4.2([email protected])([email protected]([email protected]))
+ maplibre-gl: 5.9.0
+ transitivePeerDependencies:
+ - vue
+
dependencies:
@@ -15325,6 +15435,8 @@ snapshots:
dependencies:
queue-microtask: 1.2.3
+
dependencies:
tslib: 2.8.1