Skip to content

Commit

Permalink
Merge pull request #969 from wkyoshida/961-a
Browse files Browse the repository at this point in the history
refac(map): Update attribution text to condensed version and change profile on key press [p]
  • Loading branch information
andrewtavis committed Sep 8, 2024
2 parents e1954ef + 62d1b6e commit be71c3b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/components/media/MediaMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const routeProfileMap: RouteProfile[] = [
const walkingRouteProfileControl = `
<div
title="Change profile [p]"
id=${routeProfileOptions.FOOT}
style="
background-image: url(${walkDirectionsIcon});
Expand All @@ -105,6 +106,7 @@ const walkingRouteProfileControl = `
const bikeRouteProfileControl = `
<div
title="Change profile [p]"
id=${routeProfileOptions.BIKE}
style="
background-image: url(${bikeDirectionsIcon});
Expand Down Expand Up @@ -175,7 +177,7 @@ onMounted(() => {
tiles: ["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],
tileSize: 256,
attribution:
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap</a>',
},
"cycle-raster-tiles": {
type: "raster",
Expand All @@ -186,7 +188,7 @@ onMounted(() => {
],
tileSize: 256,
attribution:
'<a href="https://www.cyclosm.org" target="_blank">CyclOSM</a> tiles hosted by <a href="https://openstreetmap.fr" target="_blank">OpenStreetMap France</a>',
'<a href="https://www.cyclosm.org" target="_blank">CyclOSM</a> hosted by <a href="https://openstreetmap.fr" target="_blank">OSM France</a>',
},
},
layers: [
Expand Down Expand Up @@ -362,7 +364,7 @@ onMounted(() => {
} else {
div.addEventListener("click", updateSelectedProfile);
document.addEventListener("keydown", (event) => {
if (event.key === "x") {
if (event.key === "p") {
updateSelectedProfile();
}
});
Expand Down

0 comments on commit be71c3b

Please sign in to comment.