项目作者: iSergio

项目描述 :
Cesium GWT Wrapper based on GWT 2.8.x and JsInterop
高级语言: Java
项目地址: git://github.com/iSergio/cesiumjs4gwt.git
创建时间: 2016-11-10T17:00:12Z
项目社区:https://github.com/iSergio/cesiumjs4gwt

开源协议:Apache License 2.0

下载


pipeline status pipeline status

GWT Cesium Wrapper

CesiumJS GWT Wrapper based on JsInterop 1.0.2 for GWT 2.8.x.

Showcase:

Java API looks like as JavaScript.
What was done:

DrawInteraction features:

  • Pure java (Based on JsInterop wrapper without any JS code)
  • Based on Cesium-Drawhelper (But on GroundPrimitives)
  • Free hand mode (Shift pressed)
  • Two markers type - PointPrimitive and Billboard (Canvas image)
  • Draw works on EllipsoidTerrainProvider and other TerrainProvider’s
  • Dynamic colours style and marker styles
  • Start and End draw listeners

    DrawInteraction TODO:

  • On draw listeners (mouse move listeners and primitive change)
  • Snap points
  • Maximum points (finish draw on current points == maximumPoints)
  • Outline colour and width
  • EditInteraction
  • BillboardPrimitive
  • EllipsePrimitive

Issue

  • GXT work fine
  • GWT work fine
  • SmartGWT: ISC_DataBinding.js script destruct some functional of Cesium.js like as CesiumTerrain (what i find) (Fixed)

Getting started

You not need include JavaScript of Cesium into main html file, injection realised in GWT code.
Now no need callback for ScriptInjection or AttachOrDetach, all worked “out from box”.
See Showcase or basic example:

  1. public class HelloWorld extends AbstractExample {
  2. @Inject
  3. public HelloWorld(ShowcaseExampleStore store) {
  4. super("Hello World", "Use Viewer to start building new applications or easily embed Cesium into existing applications", new String[]{"Showcase", "Cesium", "3d", "Viewer"}, store);
  5. }
  6. @Override
  7. public void buildPanel() {
  8. // Create Cesium Viewer
  9. ViewerPanel csVPanel = new ViewerPanel();
  10. contentPanel.add(new HTML("<p>Use Viewer to start building new applications or easily embed Cesium into existing applications.</p>"));
  11. contentPanel.add(csVPanel);
  12. initWidget(contentPanel);
  13. }
  14. @Override
  15. public String[] getSourceCodeURLs() {
  16. String[] sourceCodeURLs = new String[1];
  17. sourceCodeURLs[0] = GWT.getModuleBaseURL() + "examples/" + "HelloWorld.txt";
  18. return sourceCodeURLs;
  19. }
  20. }

Build library and examples:

==
You need Java 8 for build examples.

  • mvn -U clean install

This project will be used in gwt-olcs and replace Cesium GWT