diff --git a/App.js b/App.js
index ff673fb9..f39decfe 100644
--- a/App.js
+++ b/App.js
@@ -75,6 +75,7 @@ import Success from './src/views/Success'
// import WallletAdd from './src/views/WalletAdd'
import WalletAdd from "./src/views/WalletAdd";
import AddressEnter from "./src/views/AddressEnter";
+import AddressMap from "./src/views/AddressMap";
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
@@ -248,6 +249,9 @@ function App() {
+
{
/>
- Enter Your location
+ Enter Your Address
diff --git a/src/views/AddressList.js b/src/views/AddressList.js
index 885d34b9..9613aaf4 100644
--- a/src/views/AddressList.js
+++ b/src/views/AddressList.js
@@ -145,7 +145,7 @@ class AddressList extends Component {
fastInterval: 5000,
})
.then((data) => {
- this.props.navigation.navigate("AddressEnter", { id: 0 });
+ this.props.navigation.navigate("AddressMap");
})
.catch((err) => {
alert("Please enable your location");
diff --git a/src/views/AddressMap.js b/src/views/AddressMap.js
index 34924c9a..51dd6e3b 100644
--- a/src/views/AddressMap.js
+++ b/src/views/AddressMap.js
@@ -3,8 +3,20 @@ import { Text, View, StyleSheet } from "react-native";
// import Geocoder from "react-native-geocoder";
import MapView from "react-native-maps";
import Geolocation from "@react-native-community/geolocation";
-import opencage from "opencage-api-client";
+// import opencage from "opencage-api-client";
import { Marker } from "react-native-maps";
+import {
+ api_url1,
+ address_list,
+ address_delete,
+ img_url,
+ last_active_address,
+ font_title,
+ font_description,
+ no_address_lottie,
+} from "../config/Constants";
+import * as colors from "../assets/css/Colors";
+import { Button } from "react-native-elements";
// import { address } from "../config/Constants";
export default class AddressMap extends Component {
@@ -21,7 +33,7 @@ export default class AddressMap extends Component {
this.handleUserNavigation();
- this.getData();
+ // this.getData();
// this.onRegionChange();
// this.getAddress(this.state.latitude,this.state.longitude);
}
@@ -35,36 +47,36 @@ export default class AddressMap extends Component {
getAddress = async(ny) => {
- await Geocoder.fallbackToGoogle('AIzaSyB_mBINSZ5m6dVyK6ANTLoEhkZq1nH9dG8');
- try {
- let res = await Geocoder.geocodePosition(ny);
- let addr = res[0].formattedAddress;
- alert(addr);
- this.setState({
- address: addr,
- });
- } catch (err) {
- alert(err);
- }
+ // await Geocoder.fallbackToGoogle('AIzaSyB_mBINSZ5m6dVyK6ANTLoEhkZq1nH9dG8');
+ // try {
+ // let res = await Geocoder.geocodePosition(ny);
+ // let addr = res[0].formattedAddress;
+ // alert(addr);
+ // this.setState({
+ // address: addr,
+ // });
+ // } catch (err) {
+ // alert(err);
+ // }
};
- newOne=()=>{
- const ny={lat:this.state.latitude,lng:this.state.latitude}
- this.getAddress(ny);
- }
+ // newOne=()=>{
+ // const ny={lat:this.state.latitude,lng:this.state.latitude}
+ // this.getAddress(ny);
+ // }
-getData=()=>{
- Geocoder.setApiKey('AIzaSyB_mBINSZ5m6dVyK6ANTLoEhkZq1nH9dG8');
- Geocoder.getFromLatLng(41.89,12.49).then(
+// getData=()=>{
+// Geocoder.setApiKey('AIzaSyB_mBINSZ5m6dVyK6ANTLoEhkZq1nH9dG8');
+// Geocoder.getFromLatLng(41.89,12.49).then(
- json=>{
- var address_component=json.results[0].address_component[0]
- alert(address_component.long_name)
- }
- )
+// json=>{
+// var address_component=json.results[0].address_component[0]
+// alert(address_component.long_name)
+// }
+// )
-}
+// }
// reverseGeocode = () => {
// const key = "320646a99ec348baa3beb82943516ae6";
@@ -126,8 +138,8 @@ getData=()=>{
initialRegion={{
latitude: this.state.latitude,
longitude: this.state.longitude,
- latitudeDelta: 0.0922,
- longitudeDelta: 0.0421,
+ latitudeDelta: .001,
+ longitudeDelta: .05,
}}
>
{
description={(this.state.address) }
/>
+
+
+ Your location : {this.state.latitude} , {this.state.longitude}
+
+
+
+
+ Accuracy:({this.state.coords.accuracy})
+
+
);
}
@@ -152,6 +191,8 @@ const styles = StyleSheet.create({
bottom: 0,
alignItems: "center",
justifyContent: "flex-end",
+height:'100%'
+
},
mapStyle: {
position: "absolute",
@@ -159,5 +200,6 @@ const styles = StyleSheet.create({
left: 0,
right: 0,
bottom: 0,
+ height:'80%'
},
});
diff --git a/src/views/Home.js b/src/views/Home.js
index b8b036a0..9ab36123 100644
--- a/src/views/Home.js
+++ b/src/views/Home.js
@@ -157,8 +157,13 @@ export default class Home extends Component {
return (
diff --git a/src/views/More.js b/src/views/More.js
index bd625a66..bc7d83a0 100644
--- a/src/views/More.js
+++ b/src/views/More.js
@@ -71,11 +71,12 @@ export default class More extends Component {
data={menus}
renderItem={({ item, index }) => (
this.navigate(item.route)}>
-
+ {/*
-
+ // {/* */}
+ {/* // */}
+ {/* // */}
+ {/* // */}
{item.menu_name}
@@ -93,9 +94,9 @@ export default class More extends Component {
const styles = StyleSheet.create({
more_style1: { backgroundColor: colors.theme_bg_two },
- more_style2: { backgroundColor: colors.theme_bg_three, padding: 10 },
+ more_style2: { backgroundColor: colors.theme_bg_three, padding: 13 },
more_style3: {
- fontSize: 16,
+ fontSize: 20,
color: colors.theme_fg_two,
fontFamily: font_title,
},
@@ -105,5 +106,6 @@ const styles = StyleSheet.create({
fontSize: 16,
color: colors.theme_fg_two,
fontFamily: font_description,
+ paddingLeft:12
},
});