Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Port the leaflet_widget to Drupal 8.
Comment | File | Size | Author |
---|---|---|---|
#6 | new_leaflet_reroll-2654864-6.patch | 677 bytes | skylord |
Comments
Comment #2
morsokI found a Drupal 8 version on github : https://github.com/bforchhammer/leaflet_widget
It seems to work fine for me.
Comment #3
fran seva CreditAttribution: fran seva as a volunteer and at Bluespark commentedHi -- I have tested the D8 branch created by @webflo and looks good. I think we have to review it and add it to a new leaflet_widget branch for D8.
I'm going to work on it and create that new branch with the approach in github and then we could iterate. I think a leaflet widget for geofield is needed.
Could someone create a D8 module version tag? cc/ @das-peter @tnightingale
Comment #4
FMB CreditAttribution: FMB commentedThe version on Github works fine indeed. How about welcoming it in a cozy D8 branch on drupal.org?
Comment #5
juves CreditAttribution: juves commentedGithub version doesn't work for me on latest Leaflet and Geofield.
Comment #6
skylord CreditAttribution: skylord commentedIt's because of slightly changed leaflet module API to be more D8 aware (global function replaced with service). Simple patch to github version attached. BTW, module is working like a charm - wonder why it's still not in drupal.org repo and we don't have alpha/beta release at least. What other map input widgets with D8 support are there? Any based on google maps are out of the race because of new Google use conditions. geofield_map with leaflet support? It redundant in many cases an lives out of leaflet modules stack and uses own library references... So, D8 release is a must - especially in our case when ready for production code exists for 4 years (!!!) on github.
Comment #7
FMB CreditAttribution: FMB commented#6 works, thanks.
By the way, I'm willing to help maintain this module.
Comment #8
FMB CreditAttribution: FMB commentedComment #9
juves CreditAttribution: juves commentedInstalled, patched. Placing a marker on a map doesn't fill/update a geo_field. It also doesn't show a marker on existing coordinates.
http://i63.tinypic.com/30le2jk.jpg
Comment #10
FMB CreditAttribution: FMB commentedjuves: did you install the Wicket library? Here is what I use in my composer.json file, under the "repositories" key:
You will have to launch this command afterwards:
composer require arthur-e/Wicket
.Comment #11
juves CreditAttribution: juves commentedOh, I should have read the README :)
Comment #12
handkerchiefIs this going forward? This is a great module, that is useless, if no official drupal 8 version is available.
Comment #13
handkerchiefThe only alternative at the moment, but with a lot of additional features you don't necessarily need and it is currently still based on google maps:
https://www.drupal.org/project/geofield_map
See also my feature request for the widget #3022269: Option: Do not set a marker manually
But this is optional/additional.
So please can anyone give FMB the maintainer role of this project if not already done?
Comment #14
mmjvb CreditAttribution: mmjvb as a volunteer commentedThat is not how it works, for correct procedure see https://www.drupal.org/node/251466
Comment #15
handkerchief@FMB what do you think? Or what's next?
Comment #16
FMB CreditAttribution: FMB commentedhandkerchief: I've formally applied in #3022839: Offering to co-maintain Leaflet Widget for Geofield and e-mailed das-peter, we'll see what happens.
Comment #17
FMB CreditAttribution: FMB commentedCongratulations, we now have a Drupal 8 release! I pushed bforchhammer's code into a new D8 branch, applied skylord's patch and slightly corrected it in order to use dependency injection. I also fixed coding standards issues.
Comment #18
handkerchiefGreat! I will look into this! Thx for your support and work.
Comment #19
todda CreditAttribution: todda commentedHi,
i just found your Module and i´ve installed it and it looks great!!!
I´ve searched for a Leaflet Plugin, where i can draw on leaflet maps. Will this feature be available soon?
Sry for my english. I´ve tried the geofield_map and other mapping modules, but in your description is everything i´ve been looking for.
So, can you tell me, if the drawning / polygon Feature is planned?
Thank you,,
Todda
Comment #20
FMB CreditAttribution: FMB commentedThanks todda for your feedback.
Concerning your request, this would preferably go into a new issue (feature request), the current one was about porting Leaflet Widget to Drupal 8. Do you have a precise plugin in mind?
Comment #21
todda CreditAttribution: todda commentedHi FMB,
i´m building a website where users create locations, for example places, where you can find something like geo-caching.
Now i want to give the option of drawing routes/lines on the map to show other users, where they can go for a walk.
I know that leaflet has the following options:
http://2.bp.blogspot.com/-KWtBMMOCBCY/UuQEhGMGZKI/AAAAAAAAAk0/SeD6vzbVaF...
but there is no!!!! drupal 8 module, where drawing on a leaflet map is possible.
Comment #22
FMB CreditAttribution: FMB commentedtodda: I do not know whether this is a widget issue. Still, could you please create a separate issue (feature request) for this? We could assign it to another project if needed.
Comment #23
todda CreditAttribution: todda commentedhello fmb,
now i've created an issue / Feature request for my question. Thank you for your help and your great work for porting this module to drupal 8,,
todda
Comment #25
Andy-vv CreditAttribution: Andy-vv commentedhello skylord - I wonder if you can help me out? I'm having a problem in updating the .json to activate wicket. It might be more than I can manage.
I am a bit of a newbie to drupal, and not much of a coder. I have been trying to get drupal 8 to allow me to render a leaflet map with two points joined by a line. I have installed all the modules (including leaflet widget 8x-2.0) and installed the wicket library. I can render a leaflet map with two points on, but no line between them. I am stuck at the point where I need to add the code to my .json file
"wicket": {
"type": "package",
"package": {
"name": "arthur-e/Wicket",
"version": "1.3.4",
"type": "drupal-library",
"dist": {
"url": "https://github.com/arthur-e/Wicket/archive/1.3.4.zip",
"type": "zip"
}
}
}
Wherever I put hte code in the .json i get an error like the following:
quote
gnome (devel) $ composer require arthur-e/Wicket
[Seld\JsonLint\ParsingException]
"./composer.json" does not contain valid JSON
Parse error on line 137:
...} } }}"wicket": { "typ
------------------^
Expected one of: 'EOF', '}', ',', ']'
unquote
I wonder if you could give me a layout of what the .json looks like above and below the snippet? or else tell me that this is beyond my paygrade, and then I will stick to just having tow points on the map until an integrated module for beginners works :)
Regards,
Andy
Comment #26
FMB CreditAttribution: FMB commentedAndy-vv: please create a new issue (support request) and attach your whole composer.json file there. I guess it lacks a comma or something. Now, I don't think you need Wicket for this version. Keep in mind this is a widget module, which is not responsible for map rendering: you need a field formatter to do so.
Comment #27
mmjvb CreditAttribution: mmjvb as a volunteer commentedLooks like a missing , in front of "wicket".
Or you need to remove the "wicket" when put in composer.json "repositories".
Comment #28
Andy-vv CreditAttribution: Andy-vv commentedFMB and mmjvb many thanks for the help, much appreciated. I added an extra comma after the new code and now I get a different error message, so something worked :) I will create a new issue support request with the new situation as FMB suggested.