-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(isochrone): Fix the isochrone rednering problem
- Loading branch information
1 parent
bbe40db
commit 255756f
Showing
14 changed files
with
148 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,3 @@ export default class GeoJSON extends MapLayer { | |
}) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ import React from 'react' | |
export default function Icon ({type}) { | ||
return <span className={`fa fa-${type}`} /> | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ export default createSelector( | |
(state) => state.data.grids, | ||
(grids) => grids[0] | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,3 @@ export default createSelector( | |
interpolator: gridualizer.interpolators.bicubic | ||
}) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// @flow | ||
import gdlz from '@conveyal/gridualizer' | ||
import {createSelector} from 'reselect' | ||
import get from 'lodash/get' | ||
|
||
const colors = [ | ||
'rgba(0, 0, 0, 0.0)', | ||
'rgba(66, 105, 164, 0.2)', | ||
'rgba(66, 105, 164, 0.4)', | ||
'rgba(66, 105, 164, 0.6)', | ||
'rgba(66, 105, 164, 0.8)' | ||
] | ||
|
||
colors.reverse() | ||
|
||
export default createSelector( | ||
state => get(state, 'data.networks'), | ||
(networks = []) => | ||
networks.map(n => { | ||
if (n.travelTimeSurface && n.travelTimeSurface.data) { | ||
const eq = gdlz.classifiers.equal() | ||
const breaks = eq({min: 0, max: 120}, colors.length) | ||
return gdlz.createDrawTile({ | ||
colorizer: gdlz.colorizers.choropleth(breaks, colors), | ||
grid: n.travelTimeSurface, | ||
interpolator: gdlz.interpolators.spline | ||
}) | ||
} | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.