Giter Site home page Giter Site logo

g-leaflet's Introduction

Published on Vaadin  Directory Stars on vaadin.com/directory

g-leaflet on Vaadin Directory

g-leaflet Add-On project

g-leaflet is a fresh start for GWT API for Leaflet. Integration should become lightweight using javascript overlays, but with small compromises with to API. Hoping this project to be/become as simple and clean as Leaflet itself.

There is also Leaflet.Draw API: https://github.com/mstahv/g-leaflet-draw

Releases available via Vaadin Directory: https://vaadin.com/directory/

A small usage example and test project available at: https://github.com/mstahv/gleafletexample

Usage

When using library, developer must first call LeafletResourceInjector.ensureInjected() (XSLinker compatible!) that will injects required resources to your apps host page.

Things should also work if one includes Leaflet into host page in other manners.

Manual and JavaDocs are not yet available (pathes wellcome!). API should mimic actual Leaflet API quite a lot. Some hints can also taken from v-leaflet project (Vaadin Leaflet integration), that has defined the initial feature set. Code for it might be in a branch initially.

g-leaflet's People

Contributors

amwilcox avatar binbalenci avatar culmat avatar dve avatar jdryan1 avatar jtreml avatar lightoze avatar mbarto avatar mstahv avatar peergynt avatar raent avatar tepi avatar vitosalvia avatar willtemperley avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

g-leaflet's Issues

<source path="client"/>

The above snippet would be wonderful if it was in the gwt.xml-files.

As it is now I have to copy the whole code to my own source-tree to include this snippet in the gwt.xml-files to be able to compile the widgetset.

If it is just that I am stupid, then please tell me, but the above snippet at least solves my problem :)

WmsLayerOptions does not support not specified layers

According to WMS 1.1.1 and 1.3.0 standard definition, the request url for WMS requests may be done without specifying a specific layer selection. In such a case, all server-layers will be rendered into the requested image.
In such a case, the request url may not contain the "&LAYERS=" because that is not allowed to be empty.
I think adding an isEmpty (or equals "") check in WmsLayerOptions.java and then not setting the layers option should already fix this issue.

Css in leaflet fails to compile when CssResource.enableGss flag is turned on

After turning on the Gss flag, the CSS to GSS conversion fails in leaflet.css with these errors (GWT v2.7):

                 [ERROR] Error in [auto-converted gss files from : [jar:file:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 504 column: 56]: GSS constant not defined: M11
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 504 column: 72]: GSS constant not defined: M12
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/C:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 504 column: 88]: GSS constant not defined: M21
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/C:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 504 column: 105]: GSS constant not defined: M22
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/C:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 505 column: 52]: GSS constant not defined: M11
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/C:/...2/g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 505 column: 68]: GSS constant not defined: M12
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/C:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 505 column: 84]: GSS constant not defined: M21
                 [ERROR] Error in [auto-converted gss files from : [jar:file:/C:/.../g-leaflet-0.4.9.jar!/org/peimari/gleaflet/client/resources/leaflet.css]][line: 505 column: 101]: GSS constant not defined: M22
     [ERROR] Errors in 'org/peimari/gleaflet/client/resources/LeafletResourceInjector.java'
        [ERROR] Line 11: Failed to resolve 'org.peimari.gleaflet.client.resources.LeafletClienBundle' via deferred binding

Double click on map listener

Is it possible to catch event of double click on map?
I would like to create marker on place where double click is detected.

Circle radius Integer vs primitive int (in gwt hosted mode)

I think one should use primitive int instead of Integer when passing arguments to JSNI methods. For example :

public static native Circle create(LatLng latlng, Integer radius, CircleOptions circleOptions)
    /*-{
        return new $wnd.L.Circle(latlng, radius, circleOptions);
    }-*/;

When calling getRadius further on, I've got the following exception (in hosted mode) :

uncaught exception: com.google.gwt.dev.shell.HostedModeException: Something other than an int was returned from JSNI method '@XXXXXXXXXX.Circle::getRadius()': JS value of type Java Object com.google.gwt.dev.shell.JsValueOOPHM$DispatchObjectOOPHM, expected int

It's not really a big deal since the hosted mode should soon be deprecated...

DragListener

It would be useful to implement DragListener on EditableMap.

Save extra data to marker (or layer)

It should be possible to add custom extra data to marker.
In original library we can do it just by passing key-value while creating marker object.
Is it possible to add this function to library?

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.