File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/routes/MissionPlanner/components/MissionMap Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
GOOGLE_API_KEY = AIzaSyCrL-O319wNJK8kk8J_JAYsWgu6yo5YsDI
2
- REACT_APP_API_BASE_PATH = http ://localhost:3500
2
+ REACT_APP_API_BASE_PATH = https ://kb-dsp-server-dev.herokuapp.com
3
3
REACT_APP_AUTH0_CLIENT_ID = 3CGKzjS2nVSqHxHHE64RhvvKY6e0TYpK
4
4
REACT_APP_AUTH0_CLIENT_DOMAIN = dronetest.auth0.com
5
- REACT_APP_SOCKET_URL = http ://localhost:3500
5
+ REACT_APP_SOCKET_URL = https ://kb-dsp-server-dev.herokuapp.com
Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ import NoFlyZone from 'components/NoFlyZone';
6
6
import { GOOGLE_MAPS_BOUNDS_TIMEOUT } from 'Const' ;
7
7
import styles from './MissionMap.scss' ;
8
8
9
+ // default center location for mission Planner
9
10
const mapConfig = {
10
11
defaultZoom : 13 ,
11
12
defaultCenter : {
12
- lat : - 6.202180076671433 ,
13
- lng : 106.83877944946289 ,
13
+ lat : 40.01 ,
14
+ lng : - 105.27 ,
14
15
} ,
15
16
options : {
16
17
clickableIcons : false ,
@@ -85,8 +86,10 @@ export class MissionMap extends Component {
85
86
86
87
handleMapLoad ( map ) {
87
88
this . map = map ;
88
- if ( map ) {
89
- // this.fitMapToBounds(map, this.props.markers);
89
+ if ( map ) {
90
+ if ( this . props . markers . length > 0 ) {
91
+ this . fitMapToBounds ( map , this . props . markers ) ;
92
+ } else {
90
93
navigator . geolocation . getCurrentPosition ( ( pos ) => {
91
94
map . panTo ( {
92
95
lat : pos . coords . latitude ,
@@ -98,6 +101,7 @@ export class MissionMap extends Component {
98
101
) ;
99
102
}
100
103
}
104
+ }
101
105
102
106
render ( ) {
103
107
return (
You can’t perform that action at this time.
0 commit comments