Just to announce that Leaflet 10.0.0 new brand release have been deployed, with full support for Drupal 10 and backward compatibility for Leaflet module 2.2.x.
All Drupal 9 and 10 users are strongly invited to move/update into it.

Leaflet 10.0.x module provides more solid (and extendable/customisable) code foundation and new enhanced functionalities and Leaflet Plugin integrations, such the following:

10.0.0 release implemented functionalities:

  • implementation of Leaflet Views Grouping, reflecting into Leaflet Control Overlays, with:
    • options to initially disable specific Groups and/or not include them in the Leaflet Overlays Control;
    • Markerclustering support;
    • specific/additional hook_leaflet_views_features_group_alter to alter Leaflet View Group definitions;
  • featured implementation to dynamically exclude specific Leaflet Features from being Markercluster-ed (“Markercluster excluded” element/flag);
  • full Implementation / support of Leaflet Tooltips (https://leafletjs.com/reference.html#tooltip), with custom Json options, tokens & replacements patterns;
  • extended support for Leaflet Popups (https://leafletjs.com/reference.html#popup), with custom Json options, tokens & replacements patterns;
  • full Implementation / support of User Location Control via Leaflet.Locate plugin (https://github.com/domoritz/leaflet-locatecontrol), with custom Json options, tokens & replacements patterns;
  • full implementation / support for Reset Map View Control via Leaflet.ResetView plugin (https://github.com/drustack/Leaflet.ResetView), with custom Json options, tokens & replacements patterns;
  • implementation of Leaflet Feature Additional Properties (with custom Json options, tokens & replacements patterns) for advanced and dynamic customisation of Leaflet Map and Features rendering logics;

Code Refactoring & clean up:

  • cleanup / removal of deprecated and un-usable Leaflet Views plugins.
  • extended refactoring of Leaflet module js code, to allow easier extension/customisation of Drupal.leaflet.prototype and Drupal.leaflet_widget.prototype methods, with extended objects, functions and methods documentation;
  • embedding all Leaflet Js libraries dependencies into the the module, for better Ajax and advanced Fields Widgets compatibilities (Inline Entity Form, Paragraphs Widgets supports, etc.)
  • general Drupal/PHP & JS better refactoring, complying with correct Coding Standards;

Screenshot attached with Enhanced and Refined UX features ...

Comments

itamair created an issue. See original summary.

_kom__’s picture

Unforutunately, Leaflet Layers and Leaflet More Maps prevent upgrade to ^10.0 due to their composer requirements (issues created for both modules).

itamair’s picture

Thanks a lot @_kom__ ... great catches.
I also provided/added specific patches to your issues (that are now related to this post) and directly contacted the maintainers giving them an heads up. Those module should/might also be upgraded to Drupal 10 compatibility.
I am confident those will be aligned soon.

In this meanwhile if you want to upgrade to Leaflet 10.0.x (until they will support it) you (everybody) could just add those modules in your code base eventually under GIT versioning (and out of composer).

itamair’s picture

Leaflet More Maps version 2.1.3 now both supporting Drupal ^10.0 and Leaflet ^10.0

itamair’s picture

Niubbo75’s picture

Hi, I have update to Leaflet 10.0 via composer, after update I got error and my map doesn't work, here qhat I got:

ArgumentCountError: Too few arguments to function Drupal\leaflet\LeafletService::__construct(), 6 passed in /***/***/****/********/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 7 expected in Drupal\leaflet\LeafletService->__construct() (line 189 of /***/***/****/********/web/modules/contrib/leaflet/src/LeafletService.php)
#0 /***/***/****/********/web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\leaflet\LeafletService->__construct()
#1 /***/***/****/********/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#2 /***/***/****/********/web/modules/contrib/leaflet/src/Plugin/Field/FieldFormatter/LeafletDefaultFormatter.php(154): Drupal\Component\DependencyInjection\Container->get()
#3 /***/***/****/********/web/core/lib/Drupal/Core/Field/FormatterPluginManager.php(64): Drupal\leaflet\Plugin\Field\FieldFormatter\LeafletDefaultFormatter::create()
#4 /***/***/****/********/web/core/lib/Drupal/Core/Field/FormatterPluginManager.php(126): Drupal\Core\Field\FormatterPluginManager->createInstance()
#5 /***/***/****/********/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(207): Drupal\Core\Field\FormatterPluginManager->getInstance()
#6 /***/***/****/********/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(238): Drupal\Core\Entity\Entity\EntityViewDisplay->getRenderer()
#7 /***/***/****/********/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(266): Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple()
#8 /***/***/****/********/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(340): Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple()
#9 /***/***/****/********/web/core/modules/node/src/NodeViewBuilder.php(24): Drupal\Core\Entity\EntityViewBuilder->buildComponents()
#10 /***/***/****/********/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(282): Drupal\node\NodeViewBuilder->buildComponents()
#11 /***/***/****/********/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(239): Drupal\Core\Entity\EntityViewBuilder->buildMultiple()
#12 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build()
#13 /***/***/****/********/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array()
#14 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback()
#15 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback()
#16 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#17 /***/***/****/********/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render()
#18 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#19 /***/***/****/********/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext()
#20 /***/***/****/********/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#21 /***/***/****/********/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#22 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#23 /***/***/****/********/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#24 /***/***/****/********/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#25 /***/***/****/********/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#26 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#27 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#28 /***/***/****/********/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#29 /***/***/****/********/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#30 /***/***/****/********/web/modules/contrib/services/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
#31 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\services\StackMiddleware\FormatSetter->handle()
#32 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#33 /***/***/****/********/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#34 /***/***/****/********/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#35 /***/***/****/********/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#36 {main}

if I rollback to 2.2.12 all works as expected, any hint?
Thanks in advance,
Alessandro

itamair’s picture

It looks you didn’t clear/refresh the Drupal cache after the update … (drupal basics)

Niubbo75’s picture

You are right! Thanks for your support.
Alessandro

ressa’s picture

Thanks @itamair, it is a joy to use Leaflet 10.x. It works very well, and is highly customizable.

With your help I managed to define setMaxBounds with Leaflet API (#2320751: Document how to set values such as setMaxBounds with Leaflet API) and documented it in Leaflet > Leaflet API, in the new docs system.

But many more of the great features could get documented, so I created a child issue for this.

Personally, I would be very interested in seeing Leaflet Views Grouping for Overlays documented.

ressa’s picture

@itamair: To give the new Drupal 10 documentation more exposure and get more features documented, perhaps at some point you have time to add a link to it on the project page, as described in #3374465: Document Leaflet 10.x features under "Remaining tasks"?

itamair’s picture

@ressa I accomplished your suggestion, and now you will find a couple of "Drupal Community documentation (WIP)" links in the Drupal.org project page, so as it also included in the Readme.md file, with this lates commit: https://git.drupalcode.org/project/leaflet/-/commit/3996852181abcd89c0fe...

ressa’s picture

Thanks @itamair, and great idea to include a link in the README, to tie it all together.