use of org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions in project gwt-cs by iSergio.
the class Billboards method addMarkerBillboards.
private void addMarkerBillboards() {
BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/whiteShapes.png");
billboardGraphicsOptions.imageSubRegion = new ConstantProperty<>(new BoundingRectangle(49, 43, 18, 18));
billboardGraphicsOptions.color = new ConstantProperty<>(Color.LIME());
EntityOptions entityOptions = new EntityOptions();
entityOptions.billboard = new BillboardGraphics(billboardGraphicsOptions);
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
csVPanel.getViewer().entities().add(new Entity(entityOptions));
billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/whiteShapes.png");
billboardGraphicsOptions.imageSubRegion = new ConstantProperty<>(new BoundingRectangle(61, 23, 18, 18));
billboardGraphicsOptions.color = new ConstantProperty<>(new Color(0, 0.5, 1.0, 1.0));
entityOptions = new EntityOptions();
entityOptions.billboard = new BillboardGraphics(billboardGraphicsOptions);
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-84.0, 39.0));
csVPanel.getViewer().entities().add(new Entity(entityOptions));
billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/whiteShapes.png");
billboardGraphicsOptions.imageSubRegion = new ConstantProperty<>(new BoundingRectangle(67, 80, 14, 14));
billboardGraphicsOptions.color = new ConstantProperty<>(new Color(0.5, 0.9, 1.0, 1.0));
entityOptions = new EntityOptions();
entityOptions.billboard = new BillboardGraphics(billboardGraphicsOptions);
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-70.0, 41.0));
csVPanel.getViewer().entities().add(new Entity(entityOptions));
billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/whiteShapes.png");
billboardGraphicsOptions.imageSubRegion = new ConstantProperty<>(new BoundingRectangle(27, 103, 22, 22));
billboardGraphicsOptions.color = new ConstantProperty<>(Color.RED());
entityOptions = new EntityOptions();
entityOptions.billboard = new BillboardGraphics(billboardGraphicsOptions);
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-73.0, 37.0));
csVPanel.getViewer().entities().add(new Entity(entityOptions));
billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/whiteShapes.png");
billboardGraphicsOptions.imageSubRegion = new ConstantProperty<>(new BoundingRectangle(105, 105, 18, 18));
billboardGraphicsOptions.color = new ConstantProperty<>(Color.YELLOW());
entityOptions = new EntityOptions();
entityOptions.billboard = new BillboardGraphics(billboardGraphicsOptions);
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-79.0, 35.0));
csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
use of org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions in project gwt-cs by iSergio.
the class Billboards method addMultipleBillboards.
private void addMultipleBillboards() {
String logoUrl = GWT.getModuleBaseURL() + "images/Cesium_Logo_overlay.png";
String facilityUrl = GWT.getModuleBaseURL() + "images/facility.gif";
BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(logoUrl);
BillboardGraphics billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
EntityOptions entityOptions = new EntityOptions();
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
entityOptions.billboard = billboardGraphics;
csVPanel.getViewer().entities().add(new Entity(entityOptions));
billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(facilityUrl);
billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
entityOptions = new EntityOptions();
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-80.50, 35.14));
entityOptions.billboard = billboardGraphics;
csVPanel.getViewer().entities().add(new Entity(entityOptions));
billboardGraphicsOptions = new BillboardGraphicsOptions();
billboardGraphicsOptions.image = new ConstantProperty<>(facilityUrl);
billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
entityOptions = new EntityOptions();
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-80.12, 25.46));
entityOptions.billboard = billboardGraphics;
csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
use of org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions in project gwt-cs by iSergio.
the class Billboards method setBillboardProperties.
private void setBillboardProperties() {
BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
// default: undefined
billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/Cesium_Logo_overlay.png");
// default
billboardGraphicsOptions.show = new ConstantProperty<>(true);
// default: (0, 0)
billboardGraphicsOptions.pixelOffset = new ConstantProperty<>(new Cartesian2(0, -50));
// default
billboardGraphicsOptions.eyeOffset = new ConstantProperty<>(new Cartesian3(0, 0, 0));
// default
billboardGraphicsOptions.horizontalOrigin = new ConstantProperty<>(HorizontalOrigin.CENTER());
// default: CENTER
billboardGraphicsOptions.verticalOrigin = new ConstantProperty<>(VerticalOrigin.BOTTOM());
// default: 1.0
billboardGraphicsOptions.scale = new ConstantProperty<>(2.0);
// default: WHITE
billboardGraphicsOptions.color = new ConstantProperty<>(Color.LIME());
// default: 0.0
billboardGraphicsOptions.rotation = new ConstantProperty<>(Math.PI_OVER_FOUR());
// default
billboardGraphicsOptions.alignedAxis = new ConstantProperty<>(Cartesian3.ZERO());
// default: undefined
billboardGraphicsOptions.width = new ConstantProperty<>(100);
// default: undefined
billboardGraphicsOptions.height = new ConstantProperty<>(25);
EntityOptions entityOptions = new EntityOptions();
entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
entityOptions.billboard = new BillboardGraphics(billboardGraphicsOptions);
csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
Aggregations