Commit 78e24633 authored by iSergio's avatar iSergio
Browse files

KmlDataSource now exposes the camera and canvas properties, which are used to...

KmlDataSource now exposes the camera and canvas properties, which are used to provide information about the state of the Viewer when making network requests for a Link. Passing these values in the constructor is now optional.
parent 4d0b2c9f
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package org.cesiumjs.cs.datasources;

import com.google.gwt.canvas.client.Canvas;
import jsinterop.annotations.JsConstructor;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsProperty;
@@ -28,6 +29,7 @@ import org.cesiumjs.cs.datasources.options.KmlDataSourceLoadOptions;
import org.cesiumjs.cs.datasources.options.KmlDataSourceLoadStaticOptions;
import org.cesiumjs.cs.datasources.options.KmlDataSourceOptions;
import org.cesiumjs.cs.promise.Promise;
import org.cesiumjs.cs.scene.Camera;

/**
 * @author Serge Silaev aka iSergio
@@ -35,6 +37,17 @@ import org.cesiumjs.cs.promise.Promise;
// TODO: Examples, Blobs, Documents
@JsType(isNative = true, namespace = "Cesium", name = "KmlDataSource")
public class KmlDataSource implements DataSource {
    /**
     * The position and orientation of this Camera will be used to populate various camera parameters when making
     * network requests. Camera movement will determine when to trigger NetworkLink refresh if viewRefreshMode is onStop.
     */
    @JsProperty
    public Camera camera;
    /**
     * The current size of this Canvas will be used to populate the Link parameters for client height and width.
     */
    @JsProperty
    public Canvas canvas;
    /**
     * Gets an event that will be raised when the underlying data changes.
     */
+4 −0
Original line number Diff line number Diff line
@@ -50,6 +50,10 @@ public class KmlDataSourceOptions {
    protected KmlDataSourceOptions() {
    }

    private static KmlDataSourceOptions create() {
        return new KmlDataSourceOptions();
    }

    /**
     * Create instance options for {@link org.cesiumjs.cs.datasources.KmlDataSource}
     *