소스 검색

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) {