Code Monkey home page Code Monkey logo

cesiumjs4gwt's People

Contributors

isergio avatar oraza1704 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cesiumjs4gwt's Issues

Entity position as CallbackProperty

Hello,

Although the Cesium docs show an Entity's position as a PositionProperty, it allows setting the position via a CallbackProperty. For a simple example, I took the following showcase:

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Billboards.html&label=Showcases

and added a new function:

var lat = 0.1;
function getPosition() {
   lat = lat + 0.1;
    if (lat >= 90) {
       lat = 0.1;
    }
    return Cesium.Cartesian3.fromDegrees(-75.6, lat);
} 

and replaced the billboard position with

position : new Cesium.CallbackProperty(getPosition, false),

The billboard position will then update each frame. I do not see a way within the framework to use a CallbackProperty for an entity's position.

I would be happy to work this issue, but wanted to make sure I was not missing something first.

Property Name Spelling

Greetings:

It appears that MaterialProperty org.cesiumjs.cs.datasources.graphics.EllipseGraphics.materia has been spelled incorrectly ("materia"), and is missing the "l" letter at the end of the JSProperty name.

Thank you for your work on this library, I enjoy using it.

CesiumNavigation, TypeError: e is not a function

i'm try to write my own code, but there is a problem when executing on the web.

here is my JAVA code

public class CesiumT1 extends Composite implements EntryPoint{ 
      public void onModuleLoad() {
	  VerticalPanel VPanel = new VerticalPanel();
	  ViewerCesiumNavigationMixinOptions options = new ViewerCesiumNavigationMixinOptions();
          options.defaultResetView = Rectangle.fromDegrees(71, 3, 90, 14);
          options.enableCompass = true;
          options.enableZoomControls = true;
          options.enableDistanceLegend = true;
          options.enableCompassOuterRing = true;

          ViewerPanel csVPanel = new ViewerPanel();
          csVPanel.getViewer().extend(viewerCesiumNavigationMixin.instance(), options);
          VPanel.add(csVPanel);
          initWidget(VPanel);
          RootPanel.get().add(VPanel);
     }
}

But there is only show the basic map but no Navigation tools.
Then got error messages

Uncaught TypeError: e is not a function
    at Q.extend (Cesium.js:546)
    at v_g$.akf_g$ [as buildPanel_0_g$] (CesiumT1.java:55)
    at v_g$.w_g$ [as onModuleLoad_0_g$] (CesiumT1.java:94)
    at Array.Kxc_g$ (com_00046CesiumT1_00046CesiumT1__EntryMethodHolder.java:3)
    at initializeModules_0_g$ (ModuleUtils.java:44)
    at vJ_g$ (Impl.java:239)
    at yJ_g$ (Impl.java:298)
    at Impl.java:77
    at bxc_g$ (ModuleUtils.java:55)
    at ViewerCesiumNavigationMixinOptions.java:29

How can i fix it ?

Issues with PinBuilder

I'm attempting to use the PinBuilder to create custom pins with images, but I'm seeing issues at runtime.

As a test, using the PinBuilder.fromColor() method works fine; this returns a CanvasElement that gives a valid result when I call toDataUrl().

However, attempting to use PinBuilder.fromUrl() also returns a CanvasElement, and then I need it's data URL to set as my billboard's image property, but when attempting to call CanvasElement.toDataUrl() causes:
Exception: com.google.gwt.core.client.JavaScriptException: (TypeError) : this$static_0_g$.toDataURL is not a function

Attempting to call the similar method PinBuilder.fromUrlPromise() doesn't even return a Promise; instead I see the same exception mentioned above, saying fromUrlPromise is not a function.

Is this a known issue with the PinBuilder? Or is there something I'm missing for how this class is supposed to be used? TIA

Integration with Vaadin 8

Hi, Sergio
We are doing our project on Vaadin 8. Is it possible to include the Cesiumjs4gwt inside Vaadin 8 Application...?

When i try to put the ViewerPanel in MyUI class, then i'm getting the following error. Is it possible to resolve this error...?

Your comments and suggestion are much appreciated...
Thanks...

java.lang.NoClassDefFoundError: org/cesiumjs/cs/widgets/ViewerPanel
at com.company.MyUI$MyUIServlet.(MyUI.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.eclipse.jetty.server.handler.ContextHandler$Context.createInstance(ContextHandler.java:2470)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:1327)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:1220)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:496)
at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:788)
at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:773)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:524)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.cesiumjs.cs.widgets.ViewerPanel
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:487)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428)
... 37 more
Caused by:
java.lang.ClassNotFoundException: org.cesiumjs.cs.widgets.ViewerPanel
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:487)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428)
at com.company.MyUI$MyUIServlet.(MyUI.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.eclipse.jetty.server.handler.ContextHandler$Context.createInstance(ContextHandler.java:2470)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:1327)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:1220)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:496)
at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:788)
at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:773)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:524)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)

Cannot Add Custom Terrain

I am getting the following error when adding a terrain layer to the base layer picker:
TypeError: this._terrainProvider.getLevelMaximumGeometricError is not a function.

To test this, I modified the CustomBaseLayerPicker.java::buildPanel method to be the following:

    @Override
    public void buildPanel() {
        List<ProviderViewModel> imageryViewModels = new ArrayList<>();
        List<ProviderViewModel> terrainViewModels = new ArrayList<>();

        ProviderViewModelOptions options = new ProviderViewModelOptions();
        options.name = "Open\u00adStreet\u00adMap";
        options.iconUrl = GWT.getModuleBaseURL() + "cs/CesiumUnminified/Widgets/Images/ImageryProviders/openStreetMap.png";
        options.tooltip = "OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org";
        options.imageryProviderCreationFunction = new ProviderViewModel.ImageryProviderCreationFunction() {
            @Override
            public ImageryProvider[] function() {
                return new ImageryProvider[] {Cesium.createOpenStreetMapImageryProvider("https://a.tile.openstreetmap.org/")};
            }
        };
        imageryViewModels.add(new ProviderViewModel(options));

        options = new ProviderViewModelOptions();
        options.name = "Earth at Night";
        options.iconUrl = GWT.getModuleBaseURL() + "cs/CesiumUnminified/Widgets/Images/ImageryProviders/blueMarble.png";
        options.tooltip = "The lights of cities and villages trace the outlines of civilization \n" +
                "        in this global view of the Earth at night as seen by NASA/NOAA\\'s Suomi NPP satellite.";
        options.imageryProviderCreationFunction = new ProviderViewModel.ImageryProviderCreationFunction() {
            @Override
            public ImageryProvider[] function() {
                return new ImageryProvider[] {new IonImageryProvider(IonImageryProviderOptions.create(3812))};
            }
        };
        imageryViewModels.add(new ProviderViewModel(options));

        options = new ProviderViewModelOptions();
        options.name = "Natural Earth\u00a0II";
        options.iconUrl = GWT.getModuleBaseURL() + "cs/CesiumUnminified/Widgets/Images/ImageryProviders/naturalEarthII.png";
        options.tooltip = "The lights of cities and villages trace the outlines of civilization \n" +
                "        in this global view of the Earth at night as seen by NASA/NOAA\\'s Suomi NPP satellite.";
        options.imageryProviderCreationFunction = new ProviderViewModel.ImageryProviderCreationFunction() {
            @Override
            public ImageryProvider[] function() {
                return new ImageryProvider[] {Cesium.createTileMapServiceImageryProvider(GWT.getModuleBaseURL() + "cs/CesiumUnminified/Assets/Textures/NaturalEarthII")};
            }
        };
        imageryViewModels.add(new ProviderViewModel(options));

        options = new ProviderViewModelOptions();
        options.name = "Some Terrain";
        options.iconUrl = GWT.getModuleBaseURL() + "cs/CesiumUnminified/Widgets/Images/ImageryProviders/naturalEarthII.png";
        options.tooltip = "Some Terrain Description.";
        options.terrainProviderCreationFunction = new ProviderViewModel.TerrainProviderCreationFunction() {
            @Override
            public TerrainProvider[] function() {
                return new TerrainProvider[] {
                        Cesium.createWorldTerrain(
                                Cesium.CreateWorldTerrainOptions.create(true, true))};
            }
        };
        terrainViewModels.add(new ProviderViewModel(options));

        ViewerPanel csVPanel = new ViewerPanel();
        csVPanel.getViewer().baseLayerPicker().viewModel.imageryProviderViewModels = imageryViewModels.toArray(new ProviderViewModel[0]);
        csVPanel.getViewer().baseLayerPicker().viewModel.terrainProviderViewModels = terrainViewModels.toArray(new ProviderViewModel[0]);

        contentPanel.add(new HTML("<p>Configure custom BaseLayerPicker widget.</p>"));
        contentPanel.add(csVPanel);

        initWidget(contentPanel);
    }

The error appears when selecting the terrain from the base layer picker. The imagery added in this same way works fine.

ProviderViewModel support for custom BaseLayerPicker

Hello. I know not all Cesium capabilities are covered 100% but there is one in particular at the moment that I am interested in knowing the timeline for. Do you know when you will be filling out the ProviderViewModel class? Or do you have an example of filling out the baselayerpicker with custom imagery layers without using that class? Thank you in advance.

Error Running the clone : import org.cesiumjs.cs error

I am newbie for this development. i try to clone this code on eclipse and using Tomcat sever.
However error is everywhere in the project that i believe because it can't handle Import org.cesiumjs.cs.*
Can you help me ?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.