mstahv / v-leaflet

Leaflet add-on for Vaadin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to approach missing leaflet functions

basisbit opened this issue · comments

the current v-leaflet implementation is hiding / not implementing bunch of leaflet functions (like map.eachLayer, map.fitBounds and others).
I'd like to implement these missing features. What do you think about extending this vaadin plugin by so many additional function? Would you rather prefer having this as lightweight as it is right now or are you ok with all these additional functions?

The "missing" leaflet functions you mentioned are already supported.

map.eachLayer

You have org.vaadin.addon.leaflet.LMap#iterator to go through each layer of the map.

map.fitBounds

There's the org.vaadin.addon.leaflet.LMap#zoomToExtent(org.vaadin.addon.leaflet.shared.Bounds) method to set a map view that contains the given geographical bounds.

@octavm maybe the examples I mentioned can already be somewhat solved for some cases, but that does not help regarding this issue at all. This issue is about how to approach missing functions, which are implemented in leaflet API, but are not available in v-leaflet on the Java side.
Sure, one could just implement stuff that one needs in any way and not share their work, but that will not help continuing the development of this project at all.

@basisbit So what are you actually after for? Instructions how to add new features?

Ideally it should go like this:

  1. You add an enhancement idea (as an issue) here in github, one enhancement per issue, preferably with a use case so that it is easier to decide that on which of the several enhancement ideas one should work on
  2. Me, you or somebody else from the community decides to start working on it. Fork the project (and most likely g-leaflet project as well), do the enhancements and create pull requests
  3. Me or some other project actives will look through the changes, maybe suggest some changes and finally merge the changes
  4. When there is a set of features in a queue, we'll cut a new release and publish that to vaadin.com/directory