Leaflet.draw 2.x was recently released: http://leafletjs.com/2013/02/20/guest-post-draw.html which imagine you are aware of since your work on Leaflet.widget helped inspire it :)
I started playing around with adding it to this project: https://github.com/acouch/leaflet_draw_widget Will need a little more work to get it working correctly. Is that something you'd be interested in seeing in this module? Maybe a different branch?
Comments
Comment #1
steinmb commentedNot much response in here but not much movement on module in general either... Played with the plugin and it works great. Any special reason why you did not create a sandbox on drupal.org for the project but put in on github?
Comment #2
acouch commentedI was hoping just to get the code back here if the maintainer is willing to have another branch. I think he is willing but doesn't have the time. I'll remove the github repo as soon as that is done. If you ping the maintainer he might circle back and either grant access or include what is in the github repo.
Comment #3
steinmb commentedBut what's wrong with creating a sandbox? No need to wait for the maintainer for moving it over there... People then can test it out, file issues, suggest patches and so on.
Comment #4
acouch commentedThey can do that on github too. When I created this you couldn't delete sandboxes. Let's just try and get this into the official module :)
Comment #5
ranelpadon commentedgreat effort for porting it in 0.2.x.. will try later your forked version.
Comment #6
balagan commentedAfter renaming the library folders (leaflet -> Leaflet, etc) I could make the map show, but no edit is available. Even zoom in and zoom out doesn't work. Also, the MENU SETTINGS, REVISION INFORMATION, etc tabs are not available.
Comment #7
balagan commentedI was using the master branch of leaflet.draw, that's why it was not working. 0.2 was working, it's a pity it does not support feature collections.
Comment #8
balagan commentedThere is a typo on line 71 in the draw.js file:
var type = e.layerTypee,
Never mind, that type variable is not used at all, if I see it correctly.
Comment #9
julou commentedThis looks like a great contrib!
And having the leaflet widget plugin updated would indeed be great now…
I installed the version from https://github.com/acouch/leaflet_draw_widget. I display the a map and existing point, but edition is not possible on my site (shapes are not saved, and any new shape added deleted the previously entered one, or at least its display).
What is the status of this. Any plan to make the plugin evolve?
Comment #10
batigolixhttps://github.com/acouch/leaflet_draw_widget seems a bit outdated. it depends on geofield 1.x (current stable version is 2.3)
Comment #11
steinmb commentedhttps://github.com/Leaflet/Leaflet.draw/releases is still looking good and seems to be working with Leaflet 0.7 and newer. Leafletjs finally managed to announce that it is getting ready to cut a 1.0 version (http://leafletjs.com/2015/07/15/leaflet-1.0-beta1-released.html) something that is great news.
Comment #12
acouch commented@batigolix we are using it in a lot of production sites. We will try to upgrade to geofield 2.x
Comment #13
IckZ commentedsubscribe! would be awesome to use Leaflet.draw 2.x
Comment #14
IckZ commentedThanks acouch for the github fork! I tested today the updated module and I have a little report:
First: To get this working
1. I had to rename the js libs in the library folder to:
leaflet_core (original leaflet)
leaflet_draw (original Leaflet.draw)
leaflet_widget (original Leaflet.widget)
also it was necessary to move all files in the leaflet_core (leaflet) folder to a subdir named "dist"
and 2.
I had to downgrad geofield to the old 1.2 version.
With this setup all js is loaded and the widget appears normaly. But I recognized that:
1. I can only add one marker to the map. If I try to add a second, the previous marker gets deleted.. (tried with "unlimited" and "10" in the the fieldsetting "Number of values". --> Is there a possibility to change the code in the draw.js file of the module? I think this behaviour causes through line 115
leafletWidgetLayerRemove(map._layers, Items);2. If the node is saved without any point or with polygon data I get a Fatal error: Call to a member function out() on a non-object in \...\leaflet_widget.module on line 229
3. after a node is saved, it is not possible to edit a marker like in the 7.x-2.x-dev and described here: https://www.drupal.org/node/2348949
The use of draw 0.2 would be awsome when the mentioned issues are fixed!