Преглед на файлове

Add attribution to leaflet.js

Wieland преди 2 години
родител
ревизия
d242c9a5f2
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      examples/map/leaflet.js

+ 3 - 1
examples/map/leaflet.js

@@ -2,7 +2,9 @@ export default {
   template: "<div></div>",
   mounted() {
     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: {
     set_location(latitude, longitude) {