@@ -260,33 +260,40 @@ export class BlendedVectorLayer extends VectorLayer implements IVectorLayer {
260260 prevDataRequest : this . getDataRequest ( dataRequestId ) ,
261261 nextMeta : searchFilters ,
262262 } ) ;
263- if ( canSkipFetch ) {
264- return ;
265- }
266-
267- let isSyncClustered ;
268- try {
269- syncContext . startLoading ( dataRequestId , requestToken , searchFilters ) ;
270- const searchSource = await this . _documentSource . makeSearchSource ( searchFilters , 0 ) ;
271- const resp = await searchSource . fetch ( ) ;
272- const maxResultWindow = await this . _documentSource . getMaxResultWindow ( ) ;
273- isSyncClustered = resp . hits . total > maxResultWindow ;
274- syncContext . stopLoading ( dataRequestId , requestToken , { isSyncClustered } , searchFilters ) ;
275- } catch ( error ) {
276- if ( ! ( error instanceof DataRequestAbortError ) ) {
277- syncContext . onLoadError ( dataRequestId , requestToken , error . message ) ;
278- }
279- return ;
280- }
281263
282264 let activeSource ;
283265 let activeStyle ;
284- if ( isSyncClustered ) {
285- activeSource = this . _clusterSource ;
286- activeStyle = this . _clusterStyle ;
266+ if ( canSkipFetch ) {
267+ // Even when source fetch is skipped, need to call super._syncData to sync StyleMeta and formatters
268+ if ( this . _isClustered ) {
269+ activeSource = this . _clusterSource ;
270+ activeStyle = this . _clusterStyle ;
271+ } else {
272+ activeSource = this . _documentSource ;
273+ activeStyle = this . _documentStyle ;
274+ }
287275 } else {
288- activeSource = this . _documentSource ;
289- activeStyle = this . _documentStyle ;
276+ let isSyncClustered ;
277+ try {
278+ syncContext . startLoading ( dataRequestId , requestToken , searchFilters ) ;
279+ const searchSource = await this . _documentSource . makeSearchSource ( searchFilters , 0 ) ;
280+ const resp = await searchSource . fetch ( ) ;
281+ const maxResultWindow = await this . _documentSource . getMaxResultWindow ( ) ;
282+ isSyncClustered = resp . hits . total > maxResultWindow ;
283+ syncContext . stopLoading ( dataRequestId , requestToken , { isSyncClustered } , searchFilters ) ;
284+ } catch ( error ) {
285+ if ( ! ( error instanceof DataRequestAbortError ) ) {
286+ syncContext . onLoadError ( dataRequestId , requestToken , error . message ) ;
287+ }
288+ return ;
289+ }
290+ if ( isSyncClustered ) {
291+ activeSource = this . _clusterSource ;
292+ activeStyle = this . _clusterStyle ;
293+ } else {
294+ activeSource = this . _documentSource ;
295+ activeStyle = this . _documentStyle ;
296+ }
290297 }
291298
292299 super . _syncData ( syncContext , activeSource , activeStyle ) ;
0 commit comments