Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var viewer = new Cesium.Viewer('cesiumContainer');
- var scene = viewer.scene;
- var instance = new Cesium.GeometryInstance({
- geometry : new Cesium.RectangleGeometry({
- rectangle : Cesium.Rectangle.fromDegrees(-130.0, 40.0, -115.0, 60.0),
- vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
- }),
- attributes : {
- color : new Cesium.ColorGeometryInstanceAttribute(0.0, 0.0, 1.0, 0.8)
- }
- });
- viewer.entities.add({
- position : Cesium.Cartesian3.fromDegrees( -122.19, 46.1914),
- label : {
- text : 'Some Text',
- font : '24px Helvetica',
- fillColor : Cesium.Color.WHITE,
- outlineColor : Cesium.Color.BLACK,
- outlineWidth : 2,
- style : Cesium.LabelStyle.FILL_AND_OUTLINE
- }
- });
- scene.primitives.add(new Cesium.Primitive({
- geometryInstances : [instance],
- appearance : new Cesium.PerInstanceColorAppearance()
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement