Add "zoomControlPosition" setting on map bundle

Created on 3 December 2025, about 2 months ago

Problem/Motivation

The leaflet module has in the JS the following line.
this.lMap.zoomControl.setPosition(this.map_settings.zoomControlPosition);

@see https://git.drupalcode.org/project/leaflet/-/commit/da156a034eb7a72ae0da...

In combination with the Leaflet Maptiler module which add a token to inject a map in WYWIWIG fields we get a JS error

Uncaught TypeError: i.indexOf is not a function
    at e.addTo (Control.js:76:11)
    at e.addControl (Control.js:137:11)
    at e.setPosition (Control.js:52:8)
    at Drupal.Leaflet.initialise (leaflet.drupal.js?t6p9pv:279:29)

Steps to reproduce

  • Add a Map bundle
  • Add token "[leaflet:map:map_name:lat_lng_zoom_height:?]" to a basic page body field

Proposed resolution

Make it possible to define the zoomControlPosition setting to the mapBundle entities.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇧🇪Belgium p-neyens

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024