-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e56c8c2
commit 7147f12
Showing
2 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts"> | ||
// MapLibre's built-in controls don't easily support changing the attribution text frequently. | ||
// | ||
// - Updating the style constantly has noticeable overhead, because of how svelte-maplibre handles preserving non-basemap sources and layers | ||
// - The attribution control doesn't have a direct API to change text dynamically, and recreating it constantly appears to leak controls sometimes. | ||
export let attribution: string; | ||
</script> | ||
|
||
<div> | ||
{attribution} | | ||
<a href="https://maplibre.org/" target="_blank">MapLibre</a> | ||
</div> | ||
|
||
<style> | ||
div { | ||
position: absolute; | ||
right: 10px; | ||
bottom: 10px; | ||
background: white; | ||
padding: 4px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters