From c44c70bb0ac4de3afc1026e59f4919282c272702 Mon Sep 17 00:00:00 2001 From: Craig Kochis Date: Wed, 4 Sep 2024 14:27:32 -0400 Subject: [PATCH] dont use style default if a color is provided --- src/ui/RadarMarker.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ui/RadarMarker.ts b/src/ui/RadarMarker.ts index f9faeb0..1501ac9 100644 --- a/src/ui/RadarMarker.ts +++ b/src/ui/RadarMarker.ts @@ -249,11 +249,14 @@ class RadarMarker extends maplibregl.Marker { addTo(map: RadarMap) { // use default marker associated with map style, if none is provided in options // (and custom style has an associated marker) - if (!this._options.url && !this._options.marker && map._defaultMarker) { - this.getCustomImage({ - ...this._options, - marker: map._defaultMarker, - }); + const markerOptions = this._options; + if (!markerOptions.url && !markerOptions.marker && !markerOptions.color) { + if (map._defaultMarker) { + this.getCustomImage({ + ...markerOptions, + marker: map._defaultMarker, + }); + } } map.addMarker(this);