Skip to content

Commit

Permalink
close #184
Browse files Browse the repository at this point in the history
  • Loading branch information
RELNO committed Jan 25, 2023
1 parent f205a61 commit f95e272
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/views/CityScopeJS/DeckglMap/deckglLayers/TrafficLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ export default function TrafficLayer({ data, opacity }) {
[
[
feature.geometry.coordinates[0][0] -
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
feature.geometry.coordinates[0][1] -
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
0,
],
[
feature.geometry.coordinates[0][0] +
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
feature.geometry.coordinates[0][1] +
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
0,
],
[
feature.geometry.coordinates[1][0] +
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
feature.geometry.coordinates[1][1] +
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
0,
],
[
feature.geometry.coordinates[1][0] -
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
feature.geometry.coordinates[1][1] -
(feature.properties.lanes / 75000) ,
feature.properties.lanes / 75000,
0,
],
],
Expand Down Expand Up @@ -82,10 +82,11 @@ export default function TrafficLayer({ data, opacity }) {
0,
1
);
return [rgb[0], rgb[1], rgb[2], 225 * opacity];
// return the color with the opacity
return [rgb[0], rgb[1], rgb[2], 200 + 55 * opacity];
},

getElevation: (d) => d.properties.norm_traffic * 500 * opacity,
getElevation: (d) => d.properties.norm_traffic * 100 * opacity,

updateTriggers: {
getLineColor: data,
Expand Down

0 comments on commit f95e272

Please sign in to comment.