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 5 years have passed since last update.

#概要
cesiumでturf.jsやってみた。

#写真
image.png

#サンプルコード

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.camera.flyTo({
    destination: Cesium.Cartesian3.fromDegrees(140.0 + 0.4, 38.0 - 1.0, 100000.0),
    orientation: {
        heading: Cesium.Math.toRadians(-20.0),
        pitch: Cesium.Math.toRadians(-35.0),
        roll: 0.0
    }
});
var latlngs = [[140.0, 38.0], [140.5, 38.0], [140.5, 38.5], [140.0, 38.0]];
var line = turf.lineString(latlngs);
var json = JSON.stringify(line); 
var url = URL.createObjectURL(new Blob([json]));
viewer.dataSources.add(Cesium.GeoJsonDataSource.load(url, {
    fill: new Cesium.Color(0, 0, 1, 0.9)
}));



#成果物
http://jsdo.it/ohisama1/cPp0

以上。

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?