use of org.cesiumjs.cs.datasources.Entity in project gwt-cs by iSergio.
the class Camera method flyToRectangle.
private void flyToRectangle() {
double west = -90.0;
double south = 38.0;
double east = -87.0;
double north = 40.0;
Rectangle rectangle = Rectangle.fromDegrees(west, south, east, north);
CameraFlyToOptions cameraFlyToOptions = new CameraFlyToOptions();
cameraFlyToOptions.destinationRec = rectangle;
csVPanel.getViewer().camera.flyTo(cameraFlyToOptions);
RectangleGraphicsOptions rectangleGraphicsOptions = new RectangleGraphicsOptions();
rectangleGraphicsOptions.coordinates = new ConstantProperty<>(rectangle);
rectangleGraphicsOptions.fill = new ConstantProperty<>(false);
rectangleGraphicsOptions.outline = new ConstantProperty<>(true);
rectangleGraphicsOptions.outlineColor = new ConstantProperty<>(Color.WHITE());
EntityOptions entityOptions = new EntityOptions();
entityOptions.rectangle = new RectangleGraphics(rectangleGraphicsOptions);
csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
Aggregations