Skip to content

Commit

Permalink
fix(EditorMapLayersControl): remove show routes on map
Browse files Browse the repository at this point in the history
fix #627
  • Loading branch information
landonreed committed Nov 23, 2020
1 parent 725e897 commit 1022e00
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions lib/editor/components/map/EditorMapLayersControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,35 @@ type OverlayItem = {component: any, name: string}

export default class EditorMapLayersControl extends Component<Props> {
render () {
const { tripPatterns, stops, user } = this.props
const { stops, user } = this.props
const { BaseLayer, Overlay } = LayersControl
const OVERLAYS: Array<OverlayItem> = [
{
name: 'Route alignments',
component: (
<FeatureGroup>
{tripPatterns
? tripPatterns.map((tp) => {
if (!tp.latLngs) return null
return (
<Polyline
key={tp.id}
positions={tp.latLngs}
weight={2}
color='#888'>
<Tooltip sticky>
<span>{tp.name} ({tp.route_id})</span>
</Tooltip>
</Polyline>
)
})
: null
}
</FeatureGroup>
)
},
// FIXME: Do not show trip pattern overlay because it can cause out of
// memory issues for very large GTFS feeds.
// {
// name: 'Route alignments',
// component: (
// <FeatureGroup>
// {tripPatterns
// ? tripPatterns.map((tp) => {
// if (!tp.latLngs) return null
// return (
// <Polyline
// key={tp.id}
// positions={tp.latLngs}
// weight={2}
// color='#888'>
// <Tooltip sticky>
// <span>{tp.name} ({tp.route_id})</span>
// </Tooltip>
// </Polyline>
// )
// })
// : null
// }
// </FeatureGroup>
// )
// },
{
name: 'Stop locations',
component: <StopLayer key='stop-layer' stops={stops} />
Expand Down

0 comments on commit 1022e00

Please sign in to comment.