@@ -244,9 +244,9 @@ export class MainView extends React.Component<IProps, IStates> {
244244 const options = this . _model . getOptions ( ) ;
245245 const center =
246246 options . longitude !== undefined && options . latitude !== undefined
247- ? fromLonLat ( [ options . longitude ! , options . latitude ! ] )
247+ ? fromLonLat ( [ options . longitude , options . latitude ] )
248248 : [ 0 , 0 ] ;
249- const zoom = options . zoom !== undefined ? options . zoom ! : 1 ;
249+ const zoom = options . zoom !== undefined ? options . zoom : 1 ;
250250
251251 await this . generateMap ( center , zoom ) ;
252252 this . addContextMenu ( ) ;
@@ -871,7 +871,7 @@ export class MainView extends React.Component<IProps, IStates> {
871871 // create updated source
872872 await this . addSource ( id , source ) ;
873873 // change source of target layer
874- ( mapLayer as Layer ) . setSource ( this . _sources [ id ] ) ;
874+ mapLayer . setSource ( this . _sources [ id ] ) ;
875875 }
876876
877877 /**
@@ -1957,7 +1957,7 @@ export class MainView extends React.Component<IProps, IStates> {
19571957 return ;
19581958 }
19591959 } else {
1960- jsonData = data as IAnnotation ;
1960+ jsonData = data ;
19611961 }
19621962
19631963 newState [ key ] = jsonData ;
@@ -2004,7 +2004,7 @@ export class MainView extends React.Component<IProps, IStates> {
20042004
20052005 // The id is a layer
20062006 let extent ;
2007- const layer = this . getLayer ( id ) as Layer ;
2007+ const layer = this . getLayer ( id ) ;
20082008 const source = layer ?. getSource ( ) ;
20092009
20102010 if ( source instanceof VectorSource ) {
0 commit comments