Attribution in minimap corrected

This commit is contained in:
Porras-Bernardez 2024-09-10 16:23:20 +02:00
parent f4bd82a453
commit 013d12e7b3

View File

@ -24,6 +24,9 @@ export default class Minimap extends Vue {
maxBoundsViscosity: 1.0 // Ensure the map cannot be dragged outside the bounds
});
// Remove Leaflet logo and text
map.attributionControl.setPrefix(false);
const basemapAtLayer = L.tileLayer('https://maps{s}.wien.gv.at/basemap/geolandbasemap/normal/google3857/{z}/{y}/{x}.png', {
attribution: '<a href="https://www.basemap.at">basemap.at</a>',
noWrap: true,
@ -31,11 +34,11 @@ export default class Minimap extends Vue {
}).addTo(map);
const esriImageryLayer = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles &copy; Esri'
attribution: 'Tiles &copy; <a href="https://www.esri.com/" target="_blank">Esri</a>'
});
const esriTopoLayer = L.tileLayer('https://server.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles &copy; Esri'
attribution: 'Tiles &copy; <a href="https://www.esri.com/" target="_blank">Esri</a>'
});
const baseMaps = {
@ -52,7 +55,7 @@ export default class Minimap extends Vue {
if (southWest[0] === northEast[0] || southWest[1] === northEast[1]) {
// If y_min and y_max (and x_min and x_max) are equal, generate a circle
const center = [southWest[0], southWest[1]] as [number, number];
// Using CircleMarker to maintain constant size regardless of zoom level
// Using CircleMarker to maintain constant size regardless of zoom level
const circleMarker = L.circleMarker(center, {
color: '#30D5C8', // Outline color
fillColor: '#336699', // Fill color