File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 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 {
400400
401401 if ( ! this . nativeMapView && ( ( this . config && this . config . accessToken ) || ( this . settings && this . settings . accessToken ) ) ) {
402402 this . mapbox = new Mapbox ( ) ;
403- if ( this . telemetry === false ) {
404- com . mapbox . mapboxsdk . Mapbox . getTelemetry ( ) . setUserTelemetryRequestState ( false ) ;
405- }
403+
406404
407405
408406 // the NativeScript contentview class extends from Observable to provide the notify method
@@ -429,7 +427,14 @@ export class MapboxView extends MapboxViewBase {
429427 } ) ;
430428 } ,
431429 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+ }
433438 if ( Trace . isEnabled ( ) ) {
434439 CLog ( CLogTypes . info , 'initMap(): onMapReady event - calling notify with the MapboxViewBase.mapReadyEvent' ) ;
435440 }
You can’t perform that action at this time.
0 commit comments