From 1dcd5ea52701be36c9e661ddd42c338c9ae4efc7 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 26 Mar 2019 16:29:27 -0400 Subject: Map of 6ix appears when you press drop pin --- mobile/App.js | 3 ++- mobile/screens/MapPage.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 mobile/screens/MapPage.js (limited to 'mobile') diff --git a/mobile/App.js b/mobile/App.js index f36b696..703c6eb 100644 --- a/mobile/App.js +++ b/mobile/App.js @@ -5,9 +5,10 @@ import { createStackNavigator, createAppContainer } from 'react-navigation'; import GreetingPage from './components/GreetingPage'; import FormPage from './screens/Form1'; +import MapPage from './screens/MapPage'; -const RootStack = createStackNavigator( {GreetingPage: GreetingPage, FormPage: FormPage,}, +const RootStack = createStackNavigator( {GreetingPage: GreetingPage, FormPage: FormPage, MapPage: MapPage}, {headerMode: 'none'}) const App = createAppContainer(RootStack) 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 ( + + ); + } + +} \ No newline at end of file -- cgit v1.2.3