mle 0890 - izudon/izudon.github.io GitHub Wiki
0890 Add a vector tile source
- ベクトルタイルとして用意されている等高線をソースに追加し、合わせてレイヤを追加する。
(標高タイルをぐにゃぐにゃして描いている等高線ではない)。
ソースの追加
map.on('load', () => {
map.addSource('contours', {
type: 'vector',
url: // ...
レイヤの追加
map.addLayer({
'id': 'terrain-data',
'type': 'line',
'source': 'contours',
'source-layer': 'contour',
// :
- MapLibre Examples
Add a comment on every example of MapLibre GL JS by Masakazu IZUI