diff --git a/src/components/MapView.vue b/src/components/MapView.vue index 5f4c6db..5395f3e 100644 --- a/src/components/MapView.vue +++ b/src/components/MapView.vue @@ -55,7 +55,7 @@ import L from 'leaflet'; import { useMapStore } from '../stores/map'; import { Feature } from 'geojson'; import { AreaProperties } from '../models/area_properties'; -import { AmenityType } from '../models/amenity_type'; +import { AmenityType, amenityIconClasses } from '../models/amenity_type'; import { useI18n } from 'vue-i18n'; const areaStyle: L.PathOptions = { @@ -73,7 +73,6 @@ const travelTimeToColour = { 10: '#abedab', //Light green 5: '#5aabac', //Teal 0: '#0868ac', //Blue - }; export default defineComponent({ @@ -144,10 +143,18 @@ export default defineComponent({ const properties = feature.properties as AreaProperties; const distances = properties.distances[type]; if(distances) { - const marker = L.marker({ + const pos: L.LatLngLiteral = { lng: distances.pt.coordinates[0], lat: distances.pt.coordinates[1] - }).bindPopup('' + i18n.t('correction') + ''); + }; + const options: L.MarkerOptions = { + icon: L.divIcon({ + html: ``, + iconSize: [36, 36], + }) + }; + const marker = L.marker(pos, options); + marker.bindPopup(`${i18n.t('correction')}`); markers.value.leafletObject.addLayer(marker); } } @@ -264,4 +271,19 @@ path.leaflet-interactive:focus { text-decoration: none; } +.leaflet-marker-icon { + background-color: rgba(0, 0, 0, 0.4); + border: none; + display: flex; + justify-content: center; + align-items: center; + border-radius: 18px; +} + +.mapicon { + color: white; + display: block; + font-size: 20px; +} + \ No newline at end of file diff --git a/src/components/TypeFilter.vue b/src/components/TypeFilter.vue index 742d256..2c0287b 100644 --- a/src/components/TypeFilter.vue +++ b/src/components/TypeFilter.vue @@ -37,7 +37,7 @@