Skip to content

Commit

Permalink
do not add method to IVectorLayer interface
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Jun 16, 2021
1 parent 3a98b03 commit d8de9e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class BlendedVectorLayer extends VectorLayer implements IVectorLayer {
prevDataRequest: this.getDataRequest(dataRequestId),
nextMeta: searchFilters,
extentAware: source.isFilterByMapBounds(),
getUpdateDueToTimeslice: this.getUpdateDueToTimeslice,
getUpdateDueToTimeslice: this._getUpdateDueToTimesliceFromSourceRequestMeta,
});

let activeSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class TiledVectorLayer extends VectorLayer {
source: this.getSource(),
prevDataRequest,
nextMeta: searchFilters,
getUpdateDueToTimeslice: this.getUpdateDueToTimeslice,
getUpdateDueToTimeslice: this._getUpdateDueToTimesliceFromTileMeta,
});
const canSkip = noChangesInSourceState && noChangesInSearchState;
if (canSkip) {
Expand Down Expand Up @@ -251,7 +251,7 @@ export class TiledVectorLayer extends VectorLayer {
return null;
}

getUpdateDueToTimeslice(source: ISource, timeslice?: Timeslice): boolean {
_getUpdateDueToTimesliceFromTileMeta(source: ISource, timeslice?: Timeslice): boolean {
// TODO use meta features to determine if tiles already contain features for timeslice.
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export interface IVectorLayer extends ILayer {
hasJoins(): boolean;
canShowTooltip(): boolean;
getLeftJoinFields(): Promise<IField[]>;
getUpdateDueToTimeslice(source: ISource, timeslice?: Timeslice): boolean;
}

export class VectorLayer extends AbstractLayer implements IVectorLayer {
Expand Down Expand Up @@ -343,7 +342,9 @@ export class VectorLayer extends AbstractLayer implements IVectorLayer {
prevDataRequest,
nextMeta: searchFilters,
extentAware: false, // join-sources are term-aggs that are spatially unaware (e.g. ESTermSource/TableSource).
getUpdateDueToTimeslice: this.getUpdateDueToTimeslice,
getUpdateDueToTimeslice: () => {
return true;
},
});
if (canSkipFetch) {
return {
Expand Down Expand Up @@ -679,7 +680,7 @@ export class VectorLayer extends AbstractLayer implements IVectorLayer {
requestMeta: await this._getSearchFilters(syncContext.dataFilters, source, style),
syncContext,
source,
getUpdateDueToTimeslice: this.getUpdateDueToTimeslice,
getUpdateDueToTimeslice: this._getUpdateDueToTimesliceFromSourceRequestMeta,
});
if (
!sourceResult.featureCollection ||
Expand Down Expand Up @@ -1104,7 +1105,7 @@ export class VectorLayer extends AbstractLayer implements IVectorLayer {
return await this._source.getLicensedFeatures();
}

getUpdateDueToTimeslice(source: ISource, timeslice?: Timeslice): boolean {
_getUpdateDueToTimesliceFromSourceRequestMeta(source: ISource, timeslice?: Timeslice): boolean {
const prevDataRequest = this.getSourceDataRequest();
const prevMeta = prevDataRequest?.getMeta();
if (!prevMeta) {
Expand Down

0 comments on commit d8de9e4

Please sign in to comment.