Skip to content

Commit 27a88ea

Browse files
committed
fix: use mapDot svg everywhere
1 parent 890b935 commit 27a88ea

7 files changed

Lines changed: 1 addition & 13 deletions

File tree

assets/images/mapDot_0.png

-7.85 KB
Binary file not shown.

assets/images/mapDot_100.png

-5.39 KB
Binary file not shown.

assets/images/mapDot_15.png

-6.94 KB
Binary file not shown.

assets/images/mapDot_30.png

-6.58 KB
Binary file not shown.

assets/images/mapDot_50.png

-6.27 KB
Binary file not shown.

assets/images/mapDot_80.png

-6.13 KB
Binary file not shown.

scripts/routing.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -801,18 +801,6 @@ function addStationPointToMap(station, start = true) {
801801
let iconStyle;
802802
if (station.assetStatus === "active") {
803803
const bikeRatio = station.bikes / station.docks;
804-
const filled =
805-
station.bikes === 0
806-
? 0
807-
: bikeRatio <= 0.15
808-
? 15
809-
: bikeRatio <= 0.3
810-
? 30
811-
: bikeRatio <= 0.5
812-
? 50
813-
: bikeRatio < 1
814-
? 80
815-
: 100;
816804

817805
iconStyle = new ol.style.Style({
818806
image: new ol.style.Icon({
@@ -821,7 +809,7 @@ function addStationPointToMap(station, start = true) {
821809
anchor: [0.5, 1],
822810
anchorXUnits: "fraction",
823811
anchorYUnits: "fraction",
824-
src: `assets/images/mapDot_${filled}.png`,
812+
src: mapDotSVG(bikeRatio),
825813
}),
826814
text: new ol.style.Text({
827815
text: station.bikes.toString(),

0 commit comments

Comments
 (0)