차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| tech:leafletjs [2015/12/11 16:55] – V_L | tech:leafletjs [2023/07/25 06:04] (현재) – V_L | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| + | {{tag> | ||
| ====== Leafletjs ====== | ====== Leafletjs ====== | ||
| 줄 34: | 줄 35: | ||
| noWrap: | noWrap: | ||
| tms:true, | tms:true, | ||
| - | attribution: | + | attribution: |
| - | id: 'map reets' | + | id: 'test' |
| } | } | ||
| ).addTo(map); | ).addTo(map); | ||
| 줄 47: | 줄 48: | ||
| </ | </ | ||
| </ | </ | ||
| + | ====단일이미지==== | ||
| + | | ||
| + | |||
| + | <file html> | ||
| + | < | ||
| + | < | ||
| + | <link rel=" | ||
| + | href=" | ||
| + | <script src=" | ||
| + | < | ||
| + | #map { height: 360px; | ||
| + | width: | ||
| + | </ | ||
| + | <script language=" | ||
| + | function onLoAd() | ||
| + | { | ||
| + | |||
| + | // create the slippy map | ||
| + | var map = L.map(' | ||
| + | minZoom: 1, | ||
| + | maxZoom: 4, | ||
| + | center: [0, 0], | ||
| + | zoom: 1, | ||
| + | crs: L.CRS.Simple | ||
| + | }); | ||
| + | |||
| + | // dimensions of the image | ||
| + | var w = 4158, | ||
| + | h = 4155, | ||
| + | url = ' | ||
| + | |||
| + | // calculate the edges of the image, in coordinate space | ||
| + | var southWest = map.unproject([0, | ||
| + | var northEast = map.unproject([w, | ||
| + | var bounds = new L.LatLngBounds(southWest, | ||
| + | |||
| + | // add the image overlay, | ||
| + | // so that it covers the entire map | ||
| + | L.imageOverlay(url, | ||
| + | |||
| + | // tell leaflet that the map is exactly as big as the image | ||
| + | map.setMaxBounds(bounds); | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | <body onLoad=" | ||
| + | <div id=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | =====플러그인===== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| - | {{tag> | ||