Skip to content

Commit 3676586

Browse files
Use fixed width for route polylines (#340)
1 parent 07a783e commit 3676586

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

application/frontend/src/app/core/services/route-layer.service.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class RouteLayer {
5757
this.gLayer.setMap(this._visible ? this.mapService.map : null);
5858
}
5959
private symbol = {
60-
getWidth: 25,
60+
getWidth: 5,
6161
getColor: MATERIAL_COLORS.BlueGrey.rgb,
6262
};
6363

@@ -66,8 +66,7 @@ export class RouteLayer {
6666
this.layer = new PathLayer({
6767
id: 'routes',
6868
data,
69-
widthMinPixels: 4,
70-
widthMaxPixels: 60,
69+
widthUnits: 'pixels',
7170
capRounded: true,
7271
jointRounded: true,
7372
getPath: (d) => d.path,
@@ -76,12 +75,11 @@ export class RouteLayer {
7675
this.outlineLayer = new PathLayer({
7776
id: 'routes-outline',
7877
data,
79-
widthMinPixels: 6,
80-
widthMaxPixels: 80,
78+
widthUnits: 'pixels',
8179
capRounded: true,
8280
jointRounded: true,
8381
getPath: (d) => d.path,
84-
getWidth: 30,
82+
getWidth: 8,
8583
getColor: MATERIAL_COLORS.BlueGrey.strokeRgb,
8684
});
8785
this.gLayer.setProps({
@@ -99,23 +97,21 @@ export class RouteLayer {
9997
this.selectedDataLayer = new PathLayer({
10098
id: 'selected-routes',
10199
data,
102-
widthMinPixels: 2,
103-
widthMaxPixels: 60,
100+
widthUnits: 'pixels',
104101
capRounded: true,
105102
jointRounded: true,
106103
getPath: (d) => d.path,
107-
getWidth: 20,
104+
getWidth: 3,
108105
getColor: (d) => d.color.rgb,
109106
});
110107
this.selectedDataOutlineLayer = new PathLayer({
111108
id: 'selected-routes-outline',
112109
data,
113-
widthMinPixels: 6,
114-
widthMaxPixels: 80,
110+
widthUnits: 'pixels',
115111
capRounded: true,
116112
jointRounded: true,
117113
getPath: (d) => d.path,
118-
getWidth: 30,
114+
getWidth: 8,
119115
getColor: (d) => d.color.strokeRgb,
120116
});
121117
this.gLayer.setProps({

0 commit comments

Comments
 (0)