5
2

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でjqueryを使ってみる。

#写真

#サンプルコード

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.camera.flyTo({
    destination: Cesium.Cartesian3.fromDegrees(140.1, 37.9, 2000.0),
    orientation: {
        heading: Cesium.Math.toRadians(-20.0),
        pitch: Cesium.Math.toRadians(-35.0),
        roll: 0.0
    }
});
var pinBuilder = new Cesium.PinBuilder();
var url = '/assets/a/U/k/W/aUkWM';
$.getJSON(url, function(json) {
    var mise = json.bikuya;
    for (var key in mise) 
    {
        var name = mise[key].name;
        var latlon = mise[key].latlon.split(",");
        var e = viewer.entities.add({
            position: Cesium.Cartesian3.fromDegrees(latlon[1], latlon[0]),
            label: {
                text: name,
                verticalOrigin: Cesium.VerticalOrigin.TOP
            },
            billboard: {
                image: pinBuilder.fromColor(Cesium.Color.SALMON, 10).toDataURL(),
                verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
            }
        });
    }
});



#成果物
http://jsdo.it/ohisama1/8bj4

以上。

5
2
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
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?