File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -400,9 +400,7 @@ export class MapboxView extends MapboxViewBase {
400
400
401
401
if ( ! this . nativeMapView && ( ( this . config && this . config . accessToken ) || ( this . settings && this . settings . accessToken ) ) ) {
402
402
this . mapbox = new Mapbox ( ) ;
403
- if ( this . telemetry === false ) {
404
- com . mapbox . mapboxsdk . Mapbox . getTelemetry ( ) . setUserTelemetryRequestState ( false ) ;
405
- }
403
+
406
404
407
405
408
406
// the NativeScript contentview class extends from Observable to provide the notify method
@@ -429,7 +427,14 @@ export class MapboxView extends MapboxViewBase {
429
427
} ) ;
430
428
} ,
431
429
onMapReady : ( map ) => {
432
-
430
+ if ( this . telemetry === false ) {
431
+ try {
432
+ com . mapbox . mapboxsdk . Mapbox . getTelemetry ( ) . setUserTelemetryRequestState ( false ) ;
433
+ console . error ( 'telemtry disabled!' )
434
+ } catch ( err ) {
435
+ console . error ( 'telemtry' , err )
436
+ }
437
+ }
433
438
if ( Trace . isEnabled ( ) ) {
434
439
CLog ( CLogTypes . info , 'initMap(): onMapReady event - calling notify with the MapboxViewBase.mapReadyEvent' ) ;
435
440
}
You can’t perform that action at this time.
0 commit comments