Allow configuration of default coordinates for Client Location Indicator when geolocation is denied or unavailable

Created on 25 April 2025, 14 days ago

Issue Summary:

Currently, the Client Location Indicator map feature always initializes the user location marker at coordinates (0, 0) until geolocation access is granted. This behavior can be misleading, as it may incorrectly place the marker in the Gulf of Guinea on load.

This enhancement proposes introducing configurable default latitude and longitude values that will be used as the marker's initial position if:

  • Geolocation is not supported by the browser, or
  • The user denies permission to share their location.

These coordinates should be exposed as part of the map feature's settings.

Suggested improvements:

  • Add default_lat and default_lng to the plugin's default settings.
  • Provide a getSettingsForm() implementation to expose these values in the admin UI.
  • Update the JS to use the configured default coordinates as the marker's initial position.

This would offer a better UX and avoid confusing behavior on initial map load when geolocation is not available.

Feature request
Status

Active

Version

4.0

Component

Geolocation Field / Backend

Created by

🇮🇳India renukakulkarni

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

Comments & Activities

Production build 0.71.5 2024