Hi,

i needed som maps without labels, so i made this patche to add cartodb tiles to leaflet_more_maps.
thought this woud be usefull.

Comments

bachbach created an issue. See original summary.

berramou’s picture

hello @RdeBoer
if we could add the hook proposed here https://www.drupal.org/project/leaflet_more_maps/issues/3089020 everyone can add their maps.

rdeboer’s picture

@bachbach
Thanks for the patch!

@berramou
Happy for you to go ahead with it. Please document it well, because as discussed in #3089020: Add hook to give custom modules possibility to add other maps to default list. there will be 2 different hooks and this may confuse some.

berramou’s picture

Hello @RdeBoer

The hook hook_leaflet_map_info_alter come from the leaflet module not from our module.
Here https://git.drupalcode.org/project/leaflet/-/blob/2.1.x/leaflet.api.php#...

bachbach’s picture

StatusFileSize
new1.46 KB

i know there is now a hook, but did not have time to create a new module, here my patch against 2.1.3

berramou’s picture

Hello @bachbach
thank you for your patch and for your understanding, i guess it's better to let developers add their own maps to the list it's practical otherwise each new map it require user create an issue add new tiles to the list push create new release ....
And the .module file will become huge file and hard to maintain.
Thank you @bachbach for your understanding.
I'm waiting for other maintainers to review and improve or accept this patch.

berramou’s picture

I close this issue as fixed, since now the module propose a hook that let developers add their maps #3089020: Add hook to give custom modules possibility to add other maps to default list.

berramou’s picture

Status: Active » Fixed
berramou’s picture

Status: Fixed » Closed (fixed)