Search in sources :

Example 1 with SingleTileImageryProvider

use of org.cesiumjs.cs.scene.providers.SingleTileImageryProvider in project gwt-cs by iSergio.

the class ImageryLayers method buildPanel.

@Override
public void buildPanel() {
    ViewerOptions viewerOptions = new ViewerOptions();
    ArcGisMapServerImageryProviderOptions arcGisMapServerImageryProviderOptions = new ArcGisMapServerImageryProviderOptions();
    arcGisMapServerImageryProviderOptions.url = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
    viewerOptions.imageryProvider = new ArcGisMapServerImageryProvider(arcGisMapServerImageryProviderOptions);
    viewerOptions.baseLayerPicker = false;
    ViewerPanel csVPanel = new ViewerPanel(viewerOptions);
    ImageryLayerCollection layers = csVPanel.getViewer().imageryLayers();
    TileMapServiceImageryProviderOptions tileMapServiceImageryProviderOptions = new TileMapServiceImageryProviderOptions();
    tileMapServiceImageryProviderOptions.url = "https://cesiumjs.org/blackmarble";
    tileMapServiceImageryProviderOptions.credit = Credit.create("Black Marble imagery courtesy NASA Earth Observatory");
    tileMapServiceImageryProviderOptions.flipXY = true;
    ImageryLayer blackMarble = layers.addImageryProvider(Cesium.createTileMapServiceImageryProvider(tileMapServiceImageryProviderOptions));
    blackMarble.alpha = 0.5f;
    blackMarble.brightness = 2.0f;
    SingleTileImageryProviderOptions singleTileImageryProviderOptions = new SingleTileImageryProviderOptions();
    singleTileImageryProviderOptions.url = GWT.getModuleBaseURL() + "images/Cesium_Logo_overlay.png";
    singleTileImageryProviderOptions.rectangle = Rectangle.fromDegrees(-75.0, 28.0, -67.0, 29.75);
    layers.addImageryProvider(new SingleTileImageryProvider(singleTileImageryProviderOptions));
    contentPanel.add(new HTML("<p>Create imagery layers from multiple sources.</p>"));
    contentPanel.add(csVPanel);
    initWidget(contentPanel);
}
Also used : ViewerPanel(org.cesiumjs.cs.widgets.ViewerPanel) ImageryLayer(org.cesiumjs.cs.scene.ImageryLayer) ArcGisMapServerImageryProvider(org.cesiumjs.cs.scene.providers.ArcGisMapServerImageryProvider) ViewerOptions(org.cesiumjs.cs.widgets.options.ViewerOptions) ArcGisMapServerImageryProviderOptions(org.cesiumjs.cs.scene.providers.options.ArcGisMapServerImageryProviderOptions) SingleTileImageryProviderOptions(org.cesiumjs.cs.scene.providers.options.SingleTileImageryProviderOptions) TileMapServiceImageryProviderOptions(org.cesiumjs.cs.scene.providers.options.TileMapServiceImageryProviderOptions) SingleTileImageryProvider(org.cesiumjs.cs.scene.providers.SingleTileImageryProvider) ImageryLayerCollection(org.cesiumjs.cs.collections.ImageryLayerCollection) HTML(com.google.gwt.user.client.ui.HTML)

Aggregations

HTML (com.google.gwt.user.client.ui.HTML)1 ImageryLayerCollection (org.cesiumjs.cs.collections.ImageryLayerCollection)1 ImageryLayer (org.cesiumjs.cs.scene.ImageryLayer)1 ArcGisMapServerImageryProvider (org.cesiumjs.cs.scene.providers.ArcGisMapServerImageryProvider)1 SingleTileImageryProvider (org.cesiumjs.cs.scene.providers.SingleTileImageryProvider)1 ArcGisMapServerImageryProviderOptions (org.cesiumjs.cs.scene.providers.options.ArcGisMapServerImageryProviderOptions)1 SingleTileImageryProviderOptions (org.cesiumjs.cs.scene.providers.options.SingleTileImageryProviderOptions)1 TileMapServiceImageryProviderOptions (org.cesiumjs.cs.scene.providers.options.TileMapServiceImageryProviderOptions)1 ViewerPanel (org.cesiumjs.cs.widgets.ViewerPanel)1 ViewerOptions (org.cesiumjs.cs.widgets.options.ViewerOptions)1