LoginSignup
1
0

More than 5 years have passed since last update.

cesiumでkml

Last updated at Posted at 2017-12-15

概要

cesiumでkmlを表示してみた。

写真

image.png

サンプルコード

var kml = '<?xml version="1.0" encoding="UTF-8" ?><kml xmlns="http://earth.google.com/kml/2.0"><Placemark><name>東京タワー</name><address>東京タワー</address><styleUrl>#s_ylw-pushpin</styleUrl><Point><coordinates>139.745433,35.658581,0</coordinates></Point></Placemark></kml>';
var url = URL.createObjectURL(new Blob([kml]));
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.dataSources.add(Cesium.KmlDataSource.load(url));
viewer.camera.flyTo({
    destination: Cesium.Cartesian3.fromDegrees(139.60, 35.60, 100000.0),
});


成果物

以上。

1
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
1
0