From 2571cc0130efd2592c426cdb528e5083a4bc8eab Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 19 Mar 2025 14:56:51 -0400
Subject: fixed turning off marker filters in mapbox when clicking on map or

---
 src/client/views/nodes/MapBox/MapBox.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/MapBox/MapBox.tsx')

diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx
index e7aad7a82..d642784c0 100644
--- a/src/client/views/nodes/MapBox/MapBox.tsx
+++ b/src/client/views/nodes/MapBox/MapBox.tsx
@@ -13,7 +13,7 @@ import { CirclePicker, ColorResult } from 'react-color';
 import { Layer, MapProvider, MapRef, Map as MapboxMap, Marker, Source, ViewState, ViewStateChangeEvent } from 'react-map-gl/mapbox';
 import { ClientUtils, setupMoveUpEvents } from '../../../../ClientUtils';
 import { emptyFunction } from '../../../../Utils';
-import { Doc, DocListCast, Field, LinkedTo, Opt } from '../../../../fields/Doc';
+import { Doc, DocListCast, Field, LinkedTo, Opt, StrListCast } from '../../../../fields/Doc';
 import { DocCast, NumCast, StrCast, toList } from '../../../../fields/Types';
 import { DocUtils } from '../../../documents/DocUtils';
 import { DocumentType } from '../../../documents/DocumentTypes';
@@ -35,6 +35,7 @@ import './MapBox.scss';
 import { MapboxApiUtility, TransportationType } from './MapboxApiUtility';
 import { MarkerIcons } from './MarkerIcons';
 import { RichTextField } from '../../../../fields/RichTextField';
+import { List } from '../../../../fields/List';
 // import { GeocoderControl } from './GeocoderControl';
 
 // amongus
@@ -620,7 +621,7 @@ export class MapBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
         // try {
         //     const url = MAPBOX_FORWARD_GEOCODE_BASE_URL + encodeURI(searchText) +'.json' +`?access_token=${MAPBOX_ACCESS_TOKEN}`;
         //     const response = await fetch(url);
-        //     const data = await response.json();
+        //     const data = await response.jchildDocson();
         //     runInAction(() => {
         //         this.featuresFromGeocodeResults = data.features;
         //     })
@@ -641,6 +642,7 @@ export class MapBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
                 layers: ['map-routes-layer'],
             });
 
+            this.Document._childFilters = new List<string>(StrListCast(this.Document._childFilters).filter(filter => !filter.includes(LinkedTo)));
             if (features && features.length > 0 && features[0].properties && features[0].geometry) {
                 const { routeTitle } = features[0].properties;
                 const routeDoc: Doc | undefined = this.allRoutes.find(rtDoc => rtDoc.title === routeTitle);
-- 
cgit v1.2.3-70-g09d2

