File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ import {
1414 AUTH_ERR_MSG ,
1515 storeAuthState ,
1616 removeAuthState ,
17- postStyleWithAppearanceEvent
17+ postStyleWithAppearanceEvent ,
18+ postAddedAppearanceEvent
1819} from '../util/mapbox' ;
1920import Style from '../style/style' ;
2021import IndoorManager from '../style/indoor_manager' ;
@@ -3516,6 +3517,10 @@ export class Map extends Camera {
35163517 return this ;
35173518 }
35183519
3520+ if ( name === 'appearances' ) {
3521+ this . _postAddingAppearancesToStyleEvent ( ) ;
3522+ }
3523+
35193524 this . style . setLayerProperty ( layerId , name , value , options ) ;
35203525 return this . _update ( true ) ;
35213526 }
@@ -4814,6 +4819,10 @@ export class Map extends Camera {
48144819 postStyleWithAppearanceEvent ( this . _requestManager . _customAccessToken ) ;
48154820 }
48164821
4822+ _postAddingAppearancesToStyleEvent ( ) {
4823+ postAddedAppearanceEvent ( this . _requestManager . _customAccessToken ) ;
4824+ }
4825+
48174826 _updateTerrain ( ) {
48184827 // Recalculate if enabled/disabled and calculate elevation cover. As camera is using elevation tiles before
48194828 // render (and deferred update after zoom recalculation), this needs to be called when removing terrain source.
Original file line number Diff line number Diff line change @@ -866,6 +866,10 @@ export const styleWithAppearanceEvent = new MetricsEvent({attributes: [{name: 'm
866866// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
867867export const postStyleWithAppearanceEvent : ( arg1 : string | null | undefined ) => void = styleWithAppearanceEvent . postMetricsEvent . bind ( styleWithAppearanceEvent ) ;
868868
869+ export const addedAppearanceEvent = new MetricsEvent ( { attributes : [ { name : 'maps/js/layer-animations/runtime-appearances' } ] } ) ;
870+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
871+ export const postAddedAppearanceEvent : ( arg1 : string | null | undefined ) => void = addedAppearanceEvent . postMetricsEvent . bind ( addedAppearanceEvent ) ;
872+
869873export const performanceEvent_ : PerformanceEvent = new PerformanceEvent ( ) ;
870874// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
871875export const postPerformanceEvent : ( arg1 : string | null | undefined , arg2 : LivePerformanceData ) => void = performanceEvent_ . postPerformanceEvent . bind ( performanceEvent_ ) ;
You can’t perform that action at this time.
0 commit comments