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

Created on 4 January 2024, 12 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

Active

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024