File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ MainTab {
58
58
}
59
59
60
60
SolutionTabComponents .SolutionMapTab {
61
+ visible: Globals .enableMap
61
62
}
62
63
}
63
64
}
Original file line number Diff line number Diff line change @@ -130,7 +130,9 @@ function setupLayers() {
130
130
}
131
131
132
132
function syncCrumbCoords ( ) {
133
- map . getSource ( 'breadcrumb' ) . setData ( {
133
+ let breadcrumb = map . getSource ( 'breadcrumb' ) ;
134
+ if ( breadcrumb === undefined ) return ;
135
+ breadcrumb . setData ( {
134
136
type : 'Feature' ,
135
137
geometry : {
136
138
type : 'LineString' ,
@@ -142,10 +144,12 @@ function syncCrumbCoords(){
142
144
function syncLayers ( ) {
143
145
// sync route datas with stored points
144
146
for ( let i = 0 ; i < lines . length ; i ++ ) {
145
- map . getSource ( `route${ i } ` ) . setData ( data [ i ] ) ;
147
+ let route = map . getSource ( `route${ i } ` ) ;
148
+ if ( route !== undefined ) route . setData ( data [ i ] ) ;
146
149
}
147
150
// clear protection, since its only one point and temporary
148
- map . getSource ( 'prot' ) . setData ( {
151
+ let prot = map . getSource ( 'prot' ) ;
152
+ if ( prot !== undefined ) prot . setData ( {
149
153
type : 'FeatureCollection' ,
150
154
features : [ ]
151
155
} ) ;
You can’t perform that action at this time.
0 commit comments