Browse Source

Add attribution to leaflet.js

Wieland 2 years ago
parent
commit
d242c9a5f2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      examples/map/leaflet.js

+ 3 - 1
examples/map/leaflet.js

@@ -2,7 +2,9 @@ export default {
   template: "<div></div>",
   template: "<div></div>",
   mounted() {
   mounted() {
     this.map = L.map(this.$el);
     this.map = L.map(this.$el);
-    L.tileLayer("http://{s}.tile.osm.org/{z}/{x}/{y}.png").addTo(this.map);
+    L.tileLayer("http://{s}.tile.osm.org/{z}/{x}/{y}.png", {
+        attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
+      }).addTo(this.map);
   },
   },
   methods: {
   methods: {
     set_location(latitude, longitude) {
     set_location(latitude, longitude) {