diff options
Diffstat (limited to 'mobile/screens/MapPage.js')
| -rw-r--r-- | mobile/screens/MapPage.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mobile/screens/MapPage.js b/mobile/screens/MapPage.js new file mode 100644 index 0000000..813432d --- /dev/null +++ b/mobile/screens/MapPage.js @@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Text, View, Alert, StyleSheet, Button, AppRegistry, Navigator, TouchableHighlight, Platform} from 'react-native'; +import { Ionicons } from '@expo/vector-icons'; +import { createStackNavigator, createAppContainer } from 'react-navigation'; +import { Location, Permissions, Constants } from 'expo'; +import {MapView} from 'expo'; + +// press location on map +// on press, drop pin at location, ask user to confirm the location +// redirect to the formpage + + +// default initial map region is Toronto +//var Initial_region_coordinates = [-79.3832, 43.6532]; + +export default class Form1 extends Component { + + constructor(props) { + super(props); + // const { navigation } = this.props; + // const coordinates = navigation.getParam('coordinates'); + this.state = { + initial_region_coordinates: [-79.3832, 43.6532], + } + } + + /*get_region_coordinates() { + const { navigation } = this.props; + const coordinates = navigation.getParam('coordinates'); + return coordinates; + }*/ + + render() { + return ( + <MapView + style={{ flex: 1 }} + initialRegion={{ + latitude: this.state.initial_region_coordinates[1], + longitude: this.state.initial_region_coordinates[0], + latitudeDelta: 0.0922, + longitudeDelta: 0.0421, + }} + /> + ); + } + +}
\ No newline at end of file |
