Coder Social home page Coder Social logo

cgb-gwt / cesiumjs4gwt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from isergio/cesiumjs4gwt

0.0 0.0 0.0 174.06 MB

Cesium GWT Wrapper based on GWT 2.8.x and JsInterop

Home Page: https://gis4fun.org/cesiumjs4gwt-showcase/

License: Apache License 2.0

JavaScript 45.94% Java 53.50% CSS 0.55% HTML 0.01%

cesiumjs4gwt's Introduction

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:

public class HelloWorld extends AbstractExample {

    @Inject
    public HelloWorld(ShowcaseExampleStore store) {
        super("Hello World", "Use Viewer to start building new applications or easily embed Cesium into existing applications", new String[]{"Showcase", "Cesium", "3d", "Viewer"}, store);
    }

    @Override
    public void buildPanel() {
        // Create Cesium Viewer
        ViewerPanel csVPanel = new ViewerPanel();

        contentPanel.add(new HTML("<p>Use Viewer to start building new applications or easily embed Cesium into existing applications.</p>"));
        contentPanel.add(csVPanel);

        initWidget(contentPanel);
    }

    @Override
    public String[] getSourceCodeURLs() {
        String[] sourceCodeURLs = new String[1];
        sourceCodeURLs[0] = GWT.getModuleBaseURL() + "examples/" + "HelloWorld.txt";
        return sourceCodeURLs;
    }
}

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

cesiumjs4gwt's People

Contributors

isergio avatar oraza1704 avatar

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.