Make Form display use Leaflet Map: OSM Mapnik by default, same as Display does

Created on 29 November 2024, 2 months ago

Problem/Motivation

If you add a Geofield field, and select "Leaflet Map" on the Form display page and Display, "Leaflet Map: OSM Mapnik" is used automatically on the Display page, but not Form display.

Steps to reproduce

  1. Create a Geofield field
  2. Select "Leaflet Map" on Form display and Display
  3. See that "Leaflet Map: OSM Mapnik" is set automatically on the Display page, but not Form display

Proposed resolution

Use "Leaflet Map: OSM Mapnik" automatically on the Form display, same as the Display page, so that all the user has to do is select "Leaflet Map" on Form display and Display, and not have to click the setting cog icon (⚙️), and set it manually.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

10.2

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

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

Comments & Activities

  • Issue created by @ressa
  • 🇩🇰Denmark ressa Copenhagen

    Adding a somewhat related issue ... I seemed to remember having asked for something like this before, but that feature request was more complicated than the one here, I think :)

    • itamair committed 75f876dc on 10.2.x
      Issue #3490608 by ressa: Make Form display use Leaflet Map: OSM Mapnik...
  • 🇮🇹Italy itamair

    ok @ressa ... nice catch.
    This last commit accomplishes what you ask, harmonising the default values both for the Leaflet widget and the Leaflet Formatter & View settings:
    if existing in the leaflet_map_get_info() results the 'OSM Mapnik' default map option will be set, otherwise the first in the list ...

    This will be included in the new incoming 10.2.27 Leaflet module release

  • 🇩🇰Denmark ressa Copenhagen

    Great work @itamair, I am grateful for a fast response and solution, as always. It works perfectly, and the OSM Mapnik is used in Leaflet automatically for both page display and form display, without having to set it. Thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024