diff --git a/android/app/app.iml b/android/app/app.iml
index 161848b..f564d62 100644
--- a/android/app/app.iml
+++ b/android/app/app.iml
@@ -12,12 +12,10 @@
+
-
- generateDebugAndroidTestSources
- generateDebugSources
-
+
@@ -65,18 +63,25 @@
+
-
+
+
+
+
+
+
+
+
-
@@ -87,14 +92,14 @@
-
+
-
+
diff --git a/index.android.js b/index.android.js
index 9fdc83c..31af358 100644
--- a/index.android.js
+++ b/index.android.js
@@ -6,6 +6,7 @@
var React = require('react-native');
var RNGMap = require('react-native-gmaps');
+var Polyline = require('react-native-gmaps/Polyline');
var {
AppRegistry,
StyleSheet,
@@ -74,45 +75,54 @@ var getMeHighMobile = React.createClass({
});
if(holaback) holaback(theOne);
},
+ onMapChange: function(e){
+ console.log(e);
+ },
+ onMapError: function(e){
+ console.log('map error -->', e);
+ },
render: function() {
- var shops = this.state.shops.map((shop, i) => {
- return({shop.name})
- });
- var gmhButton;
- if( this.state.lastPosition !== 'unknown' && this.state.shops.length > 1 ){
- gmhButton = Get Me High
+ if( this.state.theOne !== 'unknown') {
+ return this._renderMap();
+ }else {
+ return this._renderStart();
}
- return (
-
- location: {JSON.stringify(this.state.lastPosition)}
- TheOne: {JSON.stringify(this.state.theOne)}
- {gmhButton}
- console.log(e)}
- onMapError={(e) => console.log('Map error --> ', e)}
- center={ { lng: 52.3521678, lat: 4.8587894 } }
- /*
- * clickMarker shows Info Window of Marker with id: 0,
- * hides Info Window if given null
- */
- clickMarker={0}/>
-
- );
+ },
+ _renderStart: function(){
+ if( this.state.lastPosition !== 'unknown' && this.state.shops.length > 1 ){
+ return(
+
+
+ Get Me High
+
+ );
+ }else {
+ return(
+ Getting your location
+ );
+ }
+ },
+ _renderMap: function(){
+ return ( console.log(e)}
+ onMapError={(e) => console.log('Map error --> ', e)}
+ center={ this.state.lastPosition }
+ clickMarker={0} />);
}
+
});
var styles = StyleSheet.create({
@@ -123,18 +133,26 @@ var styles = StyleSheet.create({
backgroundColor: '#F5FCFF',
padding: 20
},
- welcome: {
+ text: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
+ map: {
+ flex: 1
+ },
button: {
- padding: 10,
+ padding: 60,
margin: 20,
- backgroundColor: '#7A1496'
+ width: 300,
+ height: 300,
+ backgroundColor: '#7A1496',
+ justifyContent: 'center',
+ alignItems: 'center',
+ borderRadius: 300
},
buttonText: {
- fontSize: 20,
+ fontSize: 60,
color: '#F5FCFF',
textAlign: 'center'
},