Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 지도
- javascript rpad
- map
- fitBounds
- 오픈레이어스
- Deckgl ToolTip
- multiplePopup
- 텍스트채우기
- 다중팝업
- deckgl
- 주피터허브
- openlayers crossorigin
- openlayers
- JupyterHub
- jupyterlab
- docker
- getZoom
- 멀티툴팁
- javascript lpad
- Deckgl Tooltip fixed position
- ToolTip
- crossorigin
- openlayers Popup
- 다중툴팁
- 최적Zoom
- R kernel
- jupyterhub admin
- WebMercatorViewport
- openlayers tooltip
- cross-origin
Archives
- Today
- Total
Map 개발자의 길
DeckGL + xyz URL 요청 본문
1. 사용 이유
- mapbox, google 지도를 제외하고 기타 지도를 DeckGl 에서 서비스 필요시
- 무료 라이브러리 만으로 작업을 원하는 경우
2. 코드
import {TileLayer as deckTileLayer} from '@deck.gl/geo-layers';
import {load} from '@loaders.gl/core';
import {Deck} from '@deck.gl/core';
import {BitmapLayer} from '@deck.gl/layers';
<script type="text/javascript">
const layer = new TileLayer({
pickable: true,
minZoom: 0,
maxZoom: 19,
getTileData: ({x, y, z}) => load('https://f.basemaps.cartocdn.com/dark_nolabels/'+z+'/'+x+'/'+y+'.png'),
renderSubLayers: props => {
const {
bbox: {west, south, east, north}
} = props.tile;
return new BitmapLayer(props, {
data: null,
image: props.data,
bounds: [west, south, east, north]
});
}
});
const deck = new Deck({
canvas: 'map',
controller: true,
initialViewState: {longitude: 127.45, latitude: 38.78, zoom: 12},
layers: [layer]
});
</script>
<body style="height: 100%; width: 100%;">
<canvas id="map"></canvas>
</body>
3. 결과 화면
4. 목적
나와 같이 삽질 하는 사람이 없었으면 ............
반응형
'DeckGL' 카테고리의 다른 글
DeckGL TextLayer 한글 깨짐/미표출 (2) | 2022.03.28 |
---|---|
DeckGL 거리측정 기능 개발 (0) | 2021.10.06 |
DeckGL Map 기울기(pitch) 적용시 깨짐 현상 (0) | 2021.06.09 |
DeckGL Layer On/Off (0) | 2020.11.16 |
DeckGL PointLayer draw (0) | 2020.02.25 |
Comments