Fix live map checkbox

This commit is contained in:
Eugene Burmakin 2025-07-26 13:06:06 +02:00
parent 6fdecb1724
commit e127511262
3 changed files with 9 additions and 0 deletions

View file

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Fixed
- The Warden error in jobs is now fixed. #1556
- The Live Map setting is now respected.

View file

@ -969,6 +969,12 @@ export default class extends BaseController {
this.routeOpacity = parseFloat(newSettings.route_opacity) || 0.6;
this.clearFogRadius = parseInt(newSettings.fog_of_war_meters) || 50;
// Update the DOM data attribute to keep it in sync
const mapElement = document.getElementById('map');
if (mapElement) {
mapElement.setAttribute('data-user_settings', JSON.stringify(this.userSettings));
}
// Store current layer states
const layerStates = {
Points: this.map.hasLayer(this.markersLayer),

View file

@ -70,6 +70,8 @@ class Point < ApplicationRecord
# rubocop:disable Metrics/MethodLength Metrics/AbcSize
def broadcast_coordinates
return unless user.safe_settings.live_map_enabled
PointsChannel.broadcast_to(
user,
[