Map displays with 'Display map when no locations are found' unchecked even though there are no locations

Created on 4 January 2024, 6 months ago
Updated 9 February 2024, 5 months ago

Problem/Motivation

The 'Display map when no locations are found' setting seems to only care about views results; not whether the results actually yielded any location data.

Steps to reproduce

  1. Create a view with a map attachment using a geocode field and having the 'Display map when no locations are found' setting unchecked.
  2. Create content for the view without any data in the geocode field.
  3. Observe that the view does not produce any .geolocation-location markup.
  4. Observe that the map is still displayed.

Proposed resolution

Alter the template for the map wrapper to ensure that a map is only rendered if either 'Display map when no locations are found' is checked, or there is location data present.

Remaining tasks

Implement the proposed resolution.

User interface changes

Maps will now respect the 'Display map when no locations are found' setting functionality as advertised.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

3.0

Component

Javascript General / Frontend

Created by

πŸ‡ΊπŸ‡ΈUnited States clayfreeman Paragould, AR

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

Comments & Activities

Production build 0.69.0 2024