Skip to content

Commit

Permalink
dont use style default if a color is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
kochis committed Sep 4, 2024
1 parent 5135005 commit c44c70b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ui/RadarMarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c44c70b

Please sign in to comment.