0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

deck.glAdvent Calendar 2021

Day 12

plunkerでdeck.gl その2

Posted at

#概要

plunkerでdeck.glやってみた。
国土地理院の地図、使ってみた。

#写真

image.png

#サンプルコード



const tileLayer = new deck.TileLayer({
	data: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
	minZoom: 0,
	maxZoom: 19,
	tileSize: 256,
	renderSubLayers: props => {
		const {
			bbox: {
        west, 
        south, 
        east, 
        north
      }
		} = props.tile;
		return new deck.BitmapLayer(props, {
			data: null,
			image: props.data,
			bounds: [west, south, east, north]
		});
	}
});

const deckgl = new deck.DeckGL({
  initialViewState: {
    latitude: 38.0,
    longitude: 140.0,
    zoom: 7,
    maxZoom: 16,
    pitch: 80,
    bearing: -15
  },
  controller: true,
 	layers: [tileLayer],
});



#成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?