Allow loading of maps only when visible in the browser

Created on 5 March 2024, about 1 year ago
Updated 20 March 2024, about 1 year ago

Problem/Motivation

I have a client that uses the Geolocation Field to display Google maps. These maps are typically below the page fold and a lot of users don't scroll to the map so as a money saving option they would like them rendered only when visible in the browser viewport.

I think this is a useful addition that can help other people save money and page load times for maps that appear further down the page.

Proposed resolution

I'd like to propose a conditional initialisation that uses the Intersection Observer API to load the map only when visible on the browser screen.

User interface changes

Under display settings the user can select a 'Viewport' option from the 'Conditional initialization' select. Selecting this will present a field to set the Threshold property of the Intersection Observer API.

✨ Feature request
Status

Fixed

Version

4.0

Component

Geolocation Field / Backend

Created by

🇬🇧United Kingdom omahm Belfast

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