Before fixing My Position Marker Display
This commit is contained in:
parent
2d41abca6b
commit
921f8b1a30
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,8 @@
|
||||||
"release-build": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/ && rm -rf android/app/src/main/res/drawable-* && rm -rf android/app/src/main/res/raw/* && cd android && ./gradlew assembleRelease && cd .. && adb install android/app/build/outputs/apk/release/app-release.apk",
|
"release-build": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/ && rm -rf android/app/src/main/res/drawable-* && rm -rf android/app/src/main/res/raw/* && cd android && ./gradlew assembleRelease && cd .. && adb install android/app/build/outputs/apk/release/app-release.apk",
|
||||||
"debug-build": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ && cd android && ./gradlew assembleDebug && cd .. && adb install android/app/build/outputs/apk/debug/app-debug.apk",
|
"debug-build": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ && cd android && ./gradlew assembleDebug && cd .. && adb install android/app/build/outputs/apk/debug/app-debug.apk",
|
||||||
"start-emulator": "emulator -avd Nexus_6P_API_29 -dns-server 8.8.8.8",
|
"start-emulator": "emulator -avd Nexus_6P_API_29 -dns-server 8.8.8.8",
|
||||||
"run-android": "cd android && ./gradlew clean && cd .. && react-native run-android"
|
"run-debug": "cd android && ./gradlew clean && cd .. && react-native run-android",
|
||||||
|
"run-release": "cd android && ./gradlew clean && cd .. && react-native run-android --variant=release"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-native-community/viewpager": "^3.3.0",
|
"@react-native-community/viewpager": "^3.3.0",
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
"geolib": "^3.0.3",
|
"geolib": "^3.0.3",
|
||||||
"lottie-ios": "3.1.3",
|
"lottie-ios": "3.1.3",
|
||||||
"lottie-react-native": "^3.3.2",
|
"lottie-react-native": "^3.3.2",
|
||||||
"moment-timezone": "^0.5.25",
|
"moment-timezone": "^0.5.28",
|
||||||
"react": "16.9.0",
|
"react": "16.9.0",
|
||||||
"react-native": "0.61.5",
|
"react-native": "0.61.5",
|
||||||
"react-native-action-button": "^2.8.5",
|
"react-native-action-button": "^2.8.5",
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
"react-native-reanimated": "^1.0.1",
|
"react-native-reanimated": "^1.0.1",
|
||||||
"react-native-responsive-dimensions": "^2.0.1",
|
"react-native-responsive-dimensions": "^2.0.1",
|
||||||
"react-native-screens": "^2.3.0",
|
"react-native-screens": "^2.3.0",
|
||||||
"react-native-simple-dialogs": "^1.1.0",
|
"react-native-simple-dialogs": "1.2.1",
|
||||||
"react-native-snackbar-component": "1.1.8",
|
"react-native-snackbar-component": "1.1.8",
|
||||||
"react-native-snap-slider": "^0.3.0",
|
"react-native-snap-slider": "^0.3.0",
|
||||||
"react-native-svg": "^9.5.0",
|
"react-native-svg": "^9.5.0",
|
||||||
|
|
|
@ -20,7 +20,6 @@ import { IndicatorViewPager, PagerTabIndicator } from 'react-native-best-viewpag
|
||||||
import { Card, CardTitle, CardContent, CardAction, CardButton, CardImage } from 'react-native-material-cards'
|
import { Card, CardTitle, CardContent, CardAction, CardButton, CardImage } from 'react-native-material-cards'
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
import 'moment/locale/fr'
|
import 'moment/locale/fr'
|
||||||
import 'moment/locale/fr'
|
|
||||||
import 'moment/locale/es-us'
|
import 'moment/locale/es-us'
|
||||||
import 'moment/locale/en-au'
|
import 'moment/locale/en-au'
|
||||||
import 'moment/locale/en-ca'
|
import 'moment/locale/en-ca'
|
||||||
|
|
|
@ -16,6 +16,8 @@ import 'moment/locale/en-ie'
|
||||||
import 'moment/locale/en-il'
|
import 'moment/locale/en-il'
|
||||||
import 'moment/locale/en-nz'
|
import 'moment/locale/en-nz'
|
||||||
|
|
||||||
|
import DeviceInfo from 'react-native-device-info'
|
||||||
|
|
||||||
let route = require('./../../route.json');
|
let route = require('./../../route.json');
|
||||||
var theme = require('./../../utils/theme.json');
|
var theme = require('./../../utils/theme.json');
|
||||||
|
|
||||||
|
@ -32,7 +34,8 @@ export class HistoryItem extends React.Component {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
var l = this.props.selfData.date_creation;
|
var l = this.props.selfData.date_creation;
|
||||||
let t = this.props.selfData.status;
|
let t = this.props.selfData.status;
|
||||||
moment.locale(I18n.locale)
|
let currentLocale = (DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : DeviceInfo.getDeviceLocale());
|
||||||
|
moment.locale(currentLocale);
|
||||||
var re = moment.tz(this.props.selfData.date_creation, 'Etc/GMT+0').format();
|
var re = moment.tz(this.props.selfData.date_creation, 'Etc/GMT+0').format();
|
||||||
re = moment(re)
|
re = moment(re)
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -24,11 +24,12 @@ import Button from 'apsl-react-native-button'
|
||||||
import { readUser } from "../../webservice/AuthApi";
|
import { readUser } from "../../webservice/AuthApi";
|
||||||
import Calendar from 'react-native-calendario';
|
import Calendar from 'react-native-calendario';
|
||||||
let route = require('./../../route.json')
|
let route = require('./../../route.json')
|
||||||
let moment = require('moment-timezone')
|
import 'moment';
|
||||||
|
import 'moment/locale/fr';
|
||||||
|
import moment from 'moment-timezone';
|
||||||
let theme = require('./../../utils/theme.json')
|
let theme = require('./../../utils/theme.json')
|
||||||
import { primary, primaryDark, accent, purpleLight, primaryLight } from './../../utils/theme.json';
|
import { primary, primaryDark, accent, purpleLight, primaryLight } from './../../utils/theme.json';
|
||||||
import { PagerTabIndicator, PagerTitleIndicator, PagerDotIndicator } from 'react-native-best-viewpager'
|
import { PagerTabIndicator, PagerTitleIndicator, PagerDotIndicator } from 'react-native-best-viewpager'
|
||||||
type Props = {};
|
|
||||||
var sortIcons;
|
var sortIcons;
|
||||||
var sectionIcons;
|
var sectionIcons;
|
||||||
import I18n from 'react-native-i18n'
|
import I18n from 'react-native-i18n'
|
||||||
|
@ -286,9 +287,9 @@ class MyHistory extends React.Component {
|
||||||
const { routeName } = this.navigation.state
|
const { routeName } = this.navigation.state
|
||||||
this.setState({ position: routeName === "myDemand" ? 0 : 1 })
|
this.setState({ position: routeName === "myDemand" ? 0 : 1 })
|
||||||
this.refreshData()
|
this.refreshData()
|
||||||
this.intervaller = setInterval(() => {
|
/* this.intervaller = setInterval(() => {
|
||||||
this.refreshData(false)
|
this.refreshData(false)
|
||||||
}, 2000)
|
}, 2000) */
|
||||||
this.animateSlidingUp(false)
|
this.animateSlidingUp(false)
|
||||||
this.props.navigation.addListener("didFocus", () => {
|
this.props.navigation.addListener("didFocus", () => {
|
||||||
this.refreshData(false)
|
this.refreshData(false)
|
||||||
|
@ -421,6 +422,8 @@ class MyHistory extends React.Component {
|
||||||
translucent={false}
|
translucent={false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{this.renderSliding()}
|
||||||
|
|
||||||
<Appbar.Header dark={true} style={{ backgroundColor: theme.primary }}>
|
<Appbar.Header dark={true} style={{ backgroundColor: theme.primary }}>
|
||||||
<Appbar.BackAction
|
<Appbar.BackAction
|
||||||
onPress={() => { this.props.navigation.pop() }}
|
onPress={() => { this.props.navigation.pop() }}
|
||||||
|
@ -430,7 +433,7 @@ class MyHistory extends React.Component {
|
||||||
subtitle={this.state.position === 0 ? I18n.t('MY_DEMAND') : I18n.t('DEMAND_RECEIVE')}
|
subtitle={this.state.position === 0 ? I18n.t('MY_DEMAND') : I18n.t('DEMAND_RECEIVE')}
|
||||||
/>
|
/>
|
||||||
<Appbar.Action icon="refresh" onPress={() => { this.refreshData() }} />
|
<Appbar.Action icon="refresh" onPress={() => { this.refreshData() }} />
|
||||||
<Appbar.Action icon="more-vert" onPress={() => this._openMenu()} />
|
<Appbar.Action icon="more-vert" onPress={() => { this._openMenu(); this.renderSliding(); }} />
|
||||||
</Appbar.Header>
|
</Appbar.Header>
|
||||||
{this.renderOptionsMenu()}
|
{this.renderOptionsMenu()}
|
||||||
|
|
||||||
|
@ -441,62 +444,63 @@ class MyHistory extends React.Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
renderSliding() {
|
renderSliding() {
|
||||||
return (<Animated.View style={[styles.slidingup, { translateY: this.state.translateAnim }]}>
|
return (
|
||||||
<Calendar
|
<Animated.View style={[styles.slidingup, { translateY: this.state.translateAnim }]}>
|
||||||
onChange={(range) => console.log(range)}
|
<Calendar
|
||||||
minDate="2018-04-20"
|
onChange={(range) => console.log(range)}
|
||||||
startDate="2018-04-30"
|
minDate="2018-04-20"
|
||||||
endDate="2018-05-05"
|
startDate="2018-04-30"
|
||||||
theme={{
|
endDate="2018-05-05"
|
||||||
activeDayColor: {},
|
theme={{
|
||||||
monthTitleTextStyle: {
|
activeDayColor: {},
|
||||||
color: '#6d95da',
|
monthTitleTextStyle: {
|
||||||
fontWeight: '300',
|
color: '#6d95da',
|
||||||
fontSize: 16,
|
fontWeight: '300',
|
||||||
},
|
fontSize: 16,
|
||||||
emptyMonthContainerStyle: {},
|
},
|
||||||
emptyMonthTextStyle: {
|
emptyMonthContainerStyle: {},
|
||||||
fontWeight: '200',
|
emptyMonthTextStyle: {
|
||||||
},
|
fontWeight: '200',
|
||||||
weekColumnsContainerStyle: {},
|
},
|
||||||
weekColumnStyle: {
|
weekColumnsContainerStyle: {},
|
||||||
paddingVertical: 10,
|
weekColumnStyle: {
|
||||||
},
|
paddingVertical: 10,
|
||||||
weekColumnTextStyle: {
|
},
|
||||||
color: '#b6c1cd',
|
weekColumnTextStyle: {
|
||||||
fontSize: 13,
|
color: '#b6c1cd',
|
||||||
},
|
fontSize: 13,
|
||||||
nonTouchableDayContainerStyle: {},
|
},
|
||||||
nonTouchableDayTextStyle: {},
|
nonTouchableDayContainerStyle: {},
|
||||||
startDateContainerStyle: {},
|
nonTouchableDayTextStyle: {},
|
||||||
endDateContainerStyle: {},
|
startDateContainerStyle: {},
|
||||||
dayContainerStyle: {},
|
endDateContainerStyle: {},
|
||||||
dayTextStyle: {
|
dayContainerStyle: {},
|
||||||
color: '#2d4150',
|
dayTextStyle: {
|
||||||
fontWeight: '200',
|
color: '#2d4150',
|
||||||
fontSize: 15,
|
fontWeight: '200',
|
||||||
},
|
fontSize: 15,
|
||||||
dayOutOfRangeContainerStyle: {},
|
},
|
||||||
dayOutOfRangeTextStyle: {},
|
dayOutOfRangeContainerStyle: {},
|
||||||
todayContainerStyle: {},
|
dayOutOfRangeTextStyle: {},
|
||||||
todayTextStyle: {
|
todayContainerStyle: {},
|
||||||
color: '#6d95da',
|
todayTextStyle: {
|
||||||
},
|
color: '#6d95da',
|
||||||
activeDayContainerStyle: {
|
},
|
||||||
backgroundColor: '#6d95da',
|
activeDayContainerStyle: {
|
||||||
},
|
backgroundColor: '#6d95da',
|
||||||
activeDayTextStyle: {
|
},
|
||||||
color: 'white',
|
activeDayTextStyle: {
|
||||||
},
|
color: 'white',
|
||||||
nonTouchableLastMonthDayTextStyle: {}
|
},
|
||||||
}}
|
nonTouchableLastMonthDayTextStyle: {}
|
||||||
style={{ height: responsiveHeight(60) }}
|
}}
|
||||||
/>
|
style={{ height: responsiveHeight(60) }}
|
||||||
<View style={{ flexDirection: 'row' }}>
|
/>
|
||||||
<Button>{I18n.t('QUIT')}</Button>
|
<View style={{ flexDirection: 'row' }}>
|
||||||
<Button>{I18n.t('FILTER')}</Button>
|
<Button>{I18n.t('QUIT')}</Button>
|
||||||
</View>
|
<Button>{I18n.t('FILTER')}</Button>
|
||||||
</Animated.View>)
|
</View>
|
||||||
|
</Animated.View>)
|
||||||
}
|
}
|
||||||
renderSectionnedList(list) {
|
renderSectionnedList(list) {
|
||||||
|
|
||||||
|
@ -583,6 +587,7 @@ class MyHistory extends React.Component {
|
||||||
)*/
|
)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
onfilterPress() {
|
onfilterPress() {
|
||||||
let { datestart, dateend } = this.state;
|
let { datestart, dateend } = this.state;
|
||||||
let data = this.state.conserve;
|
let data = this.state.conserve;
|
||||||
|
@ -597,6 +602,7 @@ class MyHistory extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
_showDateTimePicker = (type) => {
|
_showDateTimePicker = (type) => {
|
||||||
if (type === 1)
|
if (type === 1)
|
||||||
|
@ -610,6 +616,7 @@ class MyHistory extends React.Component {
|
||||||
_showDateEndPicker = () => this.setState({ isDateEndTimePickerVisible: true });
|
_showDateEndPicker = () => this.setState({ isDateEndTimePickerVisible: true });
|
||||||
|
|
||||||
_hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false, isDateEndTimePickerVisible: false });
|
_hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false, isDateEndTimePickerVisible: false });
|
||||||
|
/*
|
||||||
_handleDatePicked = (fromdate, enddate) => {
|
_handleDatePicked = (fromdate, enddate) => {
|
||||||
console.log([fromdate, enddate]);
|
console.log([fromdate, enddate]);
|
||||||
|
|
||||||
|
@ -636,6 +643,7 @@ class MyHistory extends React.Component {
|
||||||
|
|
||||||
this._hideDateTimePicker();
|
this._hideDateTimePicker();
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
printOptions() {
|
printOptions() {
|
||||||
if (this.state.user.category === "hyper") {
|
if (this.state.user.category === "hyper") {
|
||||||
|
|
|
@ -22,6 +22,8 @@ import BaseScreen from './../BaseScreen'
|
||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
import Button from 'apsl-react-native-button'
|
import Button from 'apsl-react-native-button'
|
||||||
import I18n from 'react-native-i18n'
|
import I18n from 'react-native-i18n'
|
||||||
|
import { IlinkEmitter } from "./../../utils/events"
|
||||||
|
|
||||||
|
|
||||||
import Configuration from "../../webservice/persistences/Configuration";
|
import Configuration from "../../webservice/persistences/Configuration";
|
||||||
import { MaterialDialog } from "react-native-material-dialog";
|
import { MaterialDialog } from "react-native-material-dialog";
|
||||||
|
@ -591,15 +593,14 @@ class Home extends BaseScreen {
|
||||||
this._renderFavoriteIcon = this._renderFavoriteIcon.bind(this);
|
this._renderFavoriteIcon = this._renderFavoriteIcon.bind(this);
|
||||||
this.makeMarkerInformation = this.makeMarkerInformation.bind(this);
|
this.makeMarkerInformation = this.makeMarkerInformation.bind(this);
|
||||||
|
|
||||||
// IlinkEmitter.on("langueChange", this.updateLangue.bind(this))
|
//IlinkEmitter.on("langueChange", this.updateLangue.bind(this))
|
||||||
|
|
||||||
};
|
};
|
||||||
updateLangue() {
|
|
||||||
this.props.navigation.setParams({ name: I18n.t('MAP') })
|
|
||||||
let rand = Math.random()
|
|
||||||
this.setState({ lang: rand })
|
|
||||||
|
|
||||||
}
|
/* updateLangue() {
|
||||||
|
this.props.navigation.setParams({ name: I18n.t('MAP') })
|
||||||
|
this.forceUpdate();
|
||||||
|
} */
|
||||||
|
|
||||||
makeCardSearch() {
|
makeCardSearch() {
|
||||||
if (!this.state.isPubShow) {
|
if (!this.state.isPubShow) {
|
||||||
|
@ -1087,6 +1088,7 @@ class Home extends BaseScreen {
|
||||||
showProgress: false,
|
showProgress: false,
|
||||||
myNetwork: {},
|
myNetwork: {},
|
||||||
dialogNetworkVisible: false,
|
dialogNetworkVisible: false,
|
||||||
|
myPositionMarkerText: I18n.t("YOUR_THERE"),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
onMarkerPress(marker) {
|
onMarkerPress(marker) {
|
||||||
|
@ -1201,7 +1203,7 @@ class Home extends BaseScreen {
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
this.requestCameraPermission();
|
this.requestCameraPermission();
|
||||||
} else {
|
} else {
|
||||||
this.getPosition();
|
//this.getPosition();
|
||||||
this.watchLocation();
|
this.watchLocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1424,7 +1426,6 @@ class Home extends BaseScreen {
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
heading: 0,
|
heading: 0,
|
||||||
altitude: 5,
|
altitude: 5,
|
||||||
|
|
||||||
zoom: 12
|
zoom: 12
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
@ -1449,7 +1450,7 @@ class Home extends BaseScreen {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(error.message)
|
console.log("ERROR LOADING USER", error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
renderTutoOldHome() {
|
renderTutoOldHome() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { PureComponent } from 'react';
|
import React, { Component } from 'react';
|
||||||
import MapView, { Marker, MarkerAnimated } from "react-native-maps"
|
import MapView, { Marker, MarkerAnimated } from "react-native-maps"
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
|
@ -6,6 +6,7 @@ import {
|
||||||
View,
|
View,
|
||||||
Image,
|
Image,
|
||||||
Text,
|
Text,
|
||||||
|
Alert
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
const theme = require("../../utils/theme");
|
const theme = require("../../utils/theme");
|
||||||
import { responsiveHeight, responsiveWidth } from "react-native-responsive-dimensions";
|
import { responsiveHeight, responsiveWidth } from "react-native-responsive-dimensions";
|
||||||
|
@ -16,8 +17,12 @@ const API_KEY = "AIzaSyAYOEp-Pckvc3TwOIulCICokKgmp14rGHI";
|
||||||
const mnetwork = require('./../../datas/img/png/home_network.png');
|
const mnetwork = require('./../../datas/img/png/home_network.png');
|
||||||
const othernetwork = require('./../../datas/img/png/other_net.png');
|
const othernetwork = require('./../../datas/img/png/other_net.png');
|
||||||
import { copilot, CopilotStep } from 'react-native-copilot';
|
import { copilot, CopilotStep } from 'react-native-copilot';
|
||||||
|
import { IlinkEmitter } from "./../../utils/events";
|
||||||
|
import DeviceInfo from 'react-native-device-info';
|
||||||
|
|
||||||
class IMap extends PureComponent {
|
|
||||||
|
|
||||||
|
class IMap extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
markers: PropTypes.array,
|
markers: PropTypes.array,
|
||||||
map: PropTypes.object,
|
map: PropTypes.object,
|
||||||
|
@ -45,14 +50,49 @@ class IMap extends PureComponent {
|
||||||
markers: [],
|
markers: [],
|
||||||
roadReady: false,
|
roadReady: false,
|
||||||
isNeedUserFocus: false,
|
isNeedUserFocus: false,
|
||||||
|
positionMarkerText: I18n.t("YOUR_THERE")
|
||||||
}
|
}
|
||||||
|
IlinkEmitter.on("langueChange", this.updateLangue.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPositionMarkerText() {
|
||||||
|
let currentLanguage = I18n.currentLocale();
|
||||||
|
let myPositionMarkerText = null;
|
||||||
|
switch (currentLanguage) {
|
||||||
|
case "fr":
|
||||||
|
myPositionMarkerText = "Vous êtes ici";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "en":
|
||||||
|
myPositionMarkerText = "Your are here";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
myPositionMarkerText = I18n.t("YOUR_THERE")
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return myPositionMarkerText;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateLangue() {
|
||||||
|
//Alert.alert("Langue", I18n.currentLocale(), [{ text: "Ok", onPress: () => { } }]);
|
||||||
|
this.setState({ positionMarkerText: this.getPositionMarkerText() })
|
||||||
|
}
|
||||||
|
|
||||||
mapRef = (ref) => {
|
mapRef = (ref) => {
|
||||||
this.mapview = ref
|
this.mapview = ref
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidUpdate(prevProps, prevState) {
|
||||||
|
if (prevState.positionMarkerText !== this.state.positionMarkerText) {
|
||||||
|
this.forceUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getMapRef = () => this.mapview
|
getMapRef = () => this.mapview
|
||||||
componentWillReceiveProps(nextProps: Readonly<P>, nextContext: any): void {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
const markers = this.state.markers
|
const markers = this.state.markers
|
||||||
const newmarkers = nextProps.markers
|
const newmarkers = nextProps.markers
|
||||||
if (markers.length <= 0)
|
if (markers.length <= 0)
|
||||||
|
@ -136,38 +176,20 @@ class IMap extends PureComponent {
|
||||||
renderMyPosition() {
|
renderMyPosition() {
|
||||||
const { myPosition, myNetwork } = this.props
|
const { myPosition, myNetwork } = this.props
|
||||||
if (myPosition != null) {
|
if (myPosition != null) {
|
||||||
if (false) {
|
return (<IMarker
|
||||||
return (
|
isUser={true}
|
||||||
<CopilotStep>
|
lang={this.props.lang}
|
||||||
<IMarker
|
isNeedFocus={this.state.isNeedUserFocus}
|
||||||
|
title={this.state.positionMarkerText}
|
||||||
isUser={true}
|
data={{
|
||||||
lang={this.props.lang}
|
longitude: myPosition.longitude,
|
||||||
isNeedFocus={this.state.isNeedUserFocus}
|
latitude: myPosition.latitude
|
||||||
title={I18n.t("YOUR_THERE")}
|
}}
|
||||||
data={{
|
/>)
|
||||||
longitude: myPosition.longitude,
|
|
||||||
latitude: myPosition.latitude
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</CopilotStep>
|
|
||||||
)
|
|
||||||
} else
|
|
||||||
return (<IMarker
|
|
||||||
isUser={true}
|
|
||||||
lang={this.props.lang}
|
|
||||||
isNeedFocus={this.state.isNeedUserFocus}
|
|
||||||
title={I18n.t("YOUR_THERE")}
|
|
||||||
data={{
|
|
||||||
longitude: myPosition.longitude,
|
|
||||||
latitude: myPosition.latitude
|
|
||||||
}}
|
|
||||||
/>)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default IMap;
|
export default IMap;
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
|
|
|
@ -77,7 +77,6 @@ class IMarker extends PureComponent {
|
||||||
return (
|
return (
|
||||||
<Marker.Animated
|
<Marker.Animated
|
||||||
coordinate={this.state.coordinate.longitude ? this.state.coordinate : { longitude: data.longitude, latitude: data.latitude }}
|
coordinate={this.state.coordinate.longitude ? this.state.coordinate : { longitude: data.longitude, latitude: data.latitude }}
|
||||||
|
|
||||||
id={data.id}
|
id={data.id}
|
||||||
title={this.props.title}
|
title={this.props.title}
|
||||||
ref={(re) => {
|
ref={(re) => {
|
||||||
|
@ -106,7 +105,7 @@ class IMarker extends PureComponent {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps: Readonly<P>, prevState: Readonly<S>, snapshot: SS): void {
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
||||||
if (this.props.isUser)
|
if (this.props.isUser)
|
||||||
if (this.markerRef && this.props.isNeedFocus) {
|
if (this.markerRef && this.props.isNeedFocus) {
|
||||||
this.markerRef._component.showCallout()
|
this.markerRef._component.showCallout()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export const isDebugMode = false
|
export const isDebugMode = false
|
||||||
//base url test
|
//base url test
|
||||||
//const baseUrl="https://ilink-app.com/mobilebackendbeta"
|
//const baseUrl = "https://ilink-app.com/mobilebackendbeta"
|
||||||
//base url production
|
//base url production
|
||||||
const baseUrl = "https://ilink-app.com/mobilebackend"
|
const baseUrl = "https://ilink-app.com/mobilebackend"
|
||||||
|
|
||||||
|
|
|
@ -5311,7 +5311,7 @@ mkdirp@^0.5.0, mkdirp@^0.5.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
minimist "0.0.8"
|
minimist "0.0.8"
|
||||||
|
|
||||||
moment-timezone@^0.5.25:
|
moment-timezone@^0.5.28:
|
||||||
version "0.5.28"
|
version "0.5.28"
|
||||||
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.28.tgz#f093d789d091ed7b055d82aa81a82467f72e4338"
|
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.28.tgz#f093d789d091ed7b055d82aa81a82467f72e4338"
|
||||||
integrity sha512-TDJkZvAyKIVWg5EtVqRzU97w0Rb0YVbfpqyjgu6GwXCAohVRqwZjf4fOzDE6p1Ch98Sro/8hQQi65WDXW5STPw==
|
integrity sha512-TDJkZvAyKIVWg5EtVqRzU97w0Rb0YVbfpqyjgu6GwXCAohVRqwZjf4fOzDE6p1Ch98Sro/8hQQi65WDXW5STPw==
|
||||||
|
@ -6427,7 +6427,7 @@ react-native-screens@^2.3.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
debounce "^1.2.0"
|
debounce "^1.2.0"
|
||||||
|
|
||||||
react-native-simple-dialogs@^1.1.0:
|
react-native-simple-dialogs@1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-simple-dialogs/-/react-native-simple-dialogs-1.2.1.tgz#37f63243b7c91ba303eeb3d8f2ba23eb81fb6926"
|
resolved "https://registry.yarnpkg.com/react-native-simple-dialogs/-/react-native-simple-dialogs-1.2.1.tgz#37f63243b7c91ba303eeb3d8f2ba23eb81fb6926"
|
||||||
integrity sha512-oceCB2LCXP0HiIbOvddXIbJr+Cv7xL43U0H3YiySRpMlz/7EWu87mMbTgmfrNbb5uhw+k1tnDuzjqqrArAKy9w==
|
integrity sha512-oceCB2LCXP0HiIbOvddXIbJr+Cv7xL43U0H3YiySRpMlz/7EWu87mMbTgmfrNbb5uhw+k1tnDuzjqqrArAKy9w==
|
||||||
|
|
Loading…
Reference in New Issue