Open laryn opened 5 years ago
Error: Call to undefined function leaflet_markercluster_get_library_path() in ip_geoloc_requirements() (line 77 of /app/modules/contrib/ip_geoloc/ip_geoloc.install).
This may also be partly addressed by @AlexHoebart-ICPDR's work in https://github.com/backdrop-contrib/ip_geoloc/pull/9 -- although the leaflet_markercluster
issues may need additional work.
I'm not using the markercluster, but as it is already included by the leaflet_markercluster module, some parts here could probably be removed.
I do use the mini-map plugin provided with ip_geoloc and I could package it with this module. However, it might be also worth to consider to package it with the leaflet module, as it is not very specific to the ip_geoloc module. It's something which could be useful for any kind of map. What do you think @indigoxela? The plugin is available here: https://github.com/Norkart/Leaflet-MiniMap?tab=readme-ov-file Is it the usual approach to keep as much as possible the original scope of the Drupal modules, or could we improve here?
The structure of the Leaflet module for B differs quite from the D7 module.
The markercluster module's included in the Leaflet module and the library's on, as soon as the module's enabled ("leaflet_markercluster"). The fullscreen JS ships with the leaflet library (Leaflet.fullscreen.js). No need for an extra check, nor libraries_get_path. See leaflet_library_info(). Not sure if the toggling in the views style actually works. I never used ip_geoloc.
FTR: The set of plugins included in the Leaflet module wasn't my decision, but that has happened, before I took over maintainership. I worked with what I found.
I do use the mini-map plugin provided with ip_geoloc and I could package it with this module. However, it might be also worth to consider to package it with the leaflet module
TBH, I'm hesitant to add yet another 3rd party Leaflet plugin to the module I maintain. It's just another technical debt for me. The plugin hasn't been updated in years. And given, that Leaflet 2.x is the next version of the main lib, and that version will come with several breaking changes, which will be a challenge for me, already... :wink: Better not.
Markercluster is done in #9, Mini-map still needs to be packaged.