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
- Deckgl Tooltip fixed position
- deckgl
- 멀티툴팁
- docker
- 최적Zoom
- crossorigin
- javascript lpad
- JupyterHub
- 오픈레이어스
- openlayers
- 다중툴팁
- 다중팝업
- 텍스트채우기
- getZoom
- fitBounds
- multiplePopup
- WebMercatorViewport
- jupyterhub admin
- Deckgl ToolTip
- openlayers Popup
- javascript rpad
- cross-origin
- 지도
- openlayers tooltip
- R kernel
- 주피터허브
- map
- ToolTip
- openlayers crossorigin
- jupyterlab
Archives
- Today
- Total
Map 개발자의 길
geoFeatures의 bbox의 최적 Zoom 구하기 본문
1. LIneString, Polygon, Point의 웹상에서 최적으로 보일수 있는 Zoom 구하기
let width = 1920; //웹사이트 넓이
let height = 1080; // 웹사이트 높이
let BOUNDS = [[bbox[0],bbox[1]],[bbox[2],bbox[3]]];
//[[127.09875551,37.20934113],[127.10195002,37.21464863]]
const viewport = new WebMercatorViewport({
width: width,
height: height
});
const {longitude, latitude, zoom} = viewport.fitBounds(BOUNDS, {
padding: 50 // 해당 Features의 BBOX 여백 생성
});
//[127.11449868, 37.167457671163525, 15.68894428866944]; //[x,y,z]
//cetner 정보 및 Zoom 반환
참고 : https://deck.gl/docs/api-reference/core/web-mercator-viewport
참고 : https://math.gl/modules/web-mercator/docs/api-reference/web-mercator-viewport
반응형
'DeckGL' 카테고리의 다른 글
Deckgl tooltip position fixed( 툴팁고정) (2) | 2022.09.14 |
---|---|
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 |
Comments