Update Direction.js#6
Conversation
Building descriptions to be added.
|
Will talk more during this week’s meeting, but please delete |
| const url = 'https://sase-labs-2020.github.io/assets/directions/coffman_yudof.json' | ||
| import MapView, {Marker} from 'react-native-maps'; | ||
|
|
||
| export default class App extends Component { |
There was a problem hiding this comment.
Please integrate the content from GraphEdge.js and BuildingMarker.js into a file called Map.js. App.js should only hold the navigation bar component.
|
|
||
| componentDidMount(){ | ||
| var paths = this.props.filenames.reduce( | ||
| ["10Church", |
There was a problem hiding this comment.
Mentioned this at the meeting. Please see this line to get an idea of how to store the names and avoid hard-coding details.
|
|
||
| render() { | ||
| return ( | ||
| <MapView |
There was a problem hiding this comment.
As mentioned in the meeting, please don't hard-code each possible component individually. Please see this line to see how to leverage higher-order functions for that. Keep in mind that this pattern was enabled by a step in the componentDidMount.
| latitude: 44.9727, | ||
| longitude: -93.2354}} | ||
| title={'Coffman Union'} | ||
| description={''} |
There was a problem hiding this comment.
Just a reminder that you'll have to pull in the data from various sources. The coordinates come from assets/directions, while everything else comes from assets/informations. Also a reminder that we have to filter down the directions files because there only needs to be one marker for each building (even though there may be more than one path starting at a building).
| renderItem={({item, index}) => <Text style={styles.item}>{index+1}. {item}</Text>} | ||
| /> | ||
| </ScrollView> | ||
| <View style={styles.container}> |
There was a problem hiding this comment.
Please revert the changes to Direction.js. It's outside the scope for this PR.
Populate building names, not sure about the button style and intractability