Skip to content

Update Direction.js#6

Open
MichaelY777 wants to merge 9 commits intomasterfrom
MichaelY666-patch-2
Open

Update Direction.js#6
MichaelY777 wants to merge 9 commits intomasterfrom
MichaelY666-patch-2

Conversation

@MichaelY777
Copy link
Copy Markdown

Populate building names, not sure about the button style and intractability

Building descriptions to be added.
@nathanielbd
Copy link
Copy Markdown
Member

Will talk more during this week’s meeting, but please delete PROVIDER_GOOGLE and undo the changes to Direction.js.

Comment thread App.js
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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread App.js

componentDidMount(){
var paths = this.props.filenames.reduce(
["10Church",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioned this at the meeting. Please see this line to get an idea of how to store the names and avoid hard-coding details.

Comment thread App.js

render() {
return (
<MapView
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread App.js
latitude: 44.9727,
longitude: -93.2354}}
title={'Coffman Union'}
description={''}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread src/components/Direction.js Outdated
renderItem={({item, index}) => <Text style={styles.item}>{index+1}. {item}</Text>}
/>
</ScrollView>
<View style={styles.container}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the changes to Direction.js. It's outside the scope for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants