Compare commits
No commits in common. "d0260c292f5025ccd96bfa55a39c80ef6b67c9d7" and "02e014939b39c7a418fcf6de2dfaf6743d4cff0c" have entirely different histories.
d0260c292f
...
02e014939b
18
front/package-lock.json
generated
18
front/package-lock.json
generated
@ -20,7 +20,6 @@
|
|||||||
"astro-embed": "^0.7.2",
|
"astro-embed": "^0.7.2",
|
||||||
"astro-icon": "^1.1.0",
|
"astro-icon": "^1.1.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"leaflet-control-geocoder": "^2.4.0",
|
|
||||||
"leaflet-geosearch": "^4.0.0",
|
"leaflet-geosearch": "^4.0.0",
|
||||||
"leaflet-routing-machine": "^3.2.12",
|
"leaflet-routing-machine": "^3.2.12",
|
||||||
"limax": "4.1.0",
|
"limax": "4.1.0",
|
||||||
@ -8154,17 +8153,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
||||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||||
},
|
},
|
||||||
"node_modules/leaflet-control-geocoder": {
|
|
||||||
"version": "2.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/leaflet-control-geocoder/-/leaflet-control-geocoder-2.4.0.tgz",
|
|
||||||
"integrity": "sha512-b2QlxuFd40uIDbnoUI3U9fzfnB4yKUYlmsXjquJ2d2YjoJqnyVYcIJeErAVv3kPvX3nI0gzvBq1XHMgSVFrGkQ==",
|
|
||||||
"optionalDependencies": {
|
|
||||||
"open-location-code": "^1.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"leaflet": "^1.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/leaflet-geosearch": {
|
"node_modules/leaflet-geosearch": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/leaflet-geosearch/-/leaflet-geosearch-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/leaflet-geosearch/-/leaflet-geosearch-4.0.0.tgz",
|
||||||
@ -10064,12 +10052,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/open-location-code": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.3.tgz",
|
|
||||||
"integrity": "sha512-DBm14BSn40Ee241n80zIFXIT6+y8Tb0I+jTdosLJ8Sidvr2qONvymwqymVbHV2nS+1gkDZ5eTNpnOIVV0Kn2fw==",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"node_modules/optionator": {
|
"node_modules/optionator": {
|
||||||
"version": "0.9.4",
|
"version": "0.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
"astro-embed": "^0.7.2",
|
"astro-embed": "^0.7.2",
|
||||||
"astro-icon": "^1.1.0",
|
"astro-icon": "^1.1.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"leaflet-control-geocoder": "^2.4.0",
|
|
||||||
"leaflet-geosearch": "^4.0.0",
|
"leaflet-geosearch": "^4.0.0",
|
||||||
"leaflet-routing-machine": "^3.2.12",
|
"leaflet-routing-machine": "^3.2.12",
|
||||||
"limax": "4.1.0",
|
"limax": "4.1.0",
|
||||||
|
@ -32,8 +32,7 @@ const metadata = {
|
|||||||
import markerIcon from "leaflet/dist/images/marker-icon.png"
|
import markerIcon from "leaflet/dist/images/marker-icon.png"
|
||||||
import { OpenStreetMapProvider } from 'leaflet-geosearch'
|
import { OpenStreetMapProvider } from 'leaflet-geosearch'
|
||||||
import { GeoSearchControl } from 'leaflet-geosearch'
|
import { GeoSearchControl } from 'leaflet-geosearch'
|
||||||
import 'leaflet-routing-machine/dist/leaflet-routing-machine.js'
|
|
||||||
import 'leaflet-control-geocoder/dist/Control.Geocoder.js'
|
|
||||||
|
|
||||||
const icon = {icon: new L.Icon({iconUrl: markerIcon.src, shadowUrl: markerShadow.src, iconAnchor: [13,41]})}
|
const icon = {icon: new L.Icon({iconUrl: markerIcon.src, shadowUrl: markerShadow.src, iconAnchor: [13,41]})}
|
||||||
|
|
||||||
@ -42,24 +41,17 @@ const metadata = {
|
|||||||
|
|
||||||
let mapsCenter : L.LatLngTuple
|
let mapsCenter : L.LatLngTuple
|
||||||
|
|
||||||
// declare map
|
|
||||||
const map = L.map('map', {
|
const map = L.map('map', {
|
||||||
center: [51.5, -0.09],
|
center: [51.5, -0.09],
|
||||||
zoom: 13,
|
zoom: 13,
|
||||||
preferCanvas: true,
|
preferCanvas: true
|
||||||
zoomControl: false
|
|
||||||
})
|
})
|
||||||
|
|
||||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
maxZoom: 19,
|
maxZoom: 19,
|
||||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||||
}).addTo(map)
|
}).addTo(map)
|
||||||
|
|
||||||
// move zoom ctl to bottom
|
|
||||||
L.control.zoom({
|
|
||||||
position: 'bottomleft'
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
|
|
||||||
const provider = new OpenStreetMapProvider()
|
const provider = new OpenStreetMapProvider()
|
||||||
|
|
||||||
map.addControl(
|
map.addControl(
|
||||||
@ -70,26 +62,13 @@ const metadata = {
|
|||||||
style: 'bar',
|
style: 'bar',
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
// L.Routing.control({
|
||||||
L.Routing.control({
|
// waypoints: [
|
||||||
routeWhileDragging: true,
|
// L.latLng(57.74, 11.94),
|
||||||
geocoder: L.Control.Geocoder.nominatim(),
|
// L.latLng(57.6792, 11.949)
|
||||||
position: 'topleft',
|
// ],
|
||||||
showAlternatives: true,
|
// routeWhileDragging: true
|
||||||
altLineOptions: {
|
// }).addTo(map)
|
||||||
missingRouteTolerance: 50,
|
|
||||||
extendToWaypoints: true,
|
|
||||||
styles: [
|
|
||||||
{color: 'black', opacity: 0.15, weight: 9},
|
|
||||||
{color: 'white', opacity: 0.2, weight: 6},
|
|
||||||
{color: 'blue', opacity: 5, weight: 2}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}).addTo(map).on('routeselected', (e) => {
|
|
||||||
console.log(e)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let poiMarkers = new Array<L.Marker>
|
let poiMarkers = new Array<L.Marker>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user