forked from MapComplete/MapComplete
Performance: don't query for summary if the summaries are not online
This commit is contained in:
parent
0c1f9e8cca
commit
517540face
2 changed files with 18 additions and 5 deletions
|
|
@ -24,6 +24,7 @@ import { ShowDataLayerOptions } from "../../UI/Map/ShowDataLayerOptions"
|
|||
|
||||
export class WithSpecialLayers extends WithChangesState {
|
||||
readonly favourites: FavouritesFeatureSource
|
||||
private mvtAvailableLayers: Store<Set<string>>
|
||||
/**
|
||||
* When hovering (in the popup) an image, the location of the image will be revealed on the main map.
|
||||
* This store contains those images that should be shown, probably only the currently hovered image
|
||||
|
|
@ -43,6 +44,7 @@ export class WithSpecialLayers extends WithChangesState {
|
|||
|
||||
constructor(theme: ThemeConfig, mvtAvailableLayers: Store<Set<string>>) {
|
||||
super(theme, mvtAvailableLayers)
|
||||
this.mvtAvailableLayers = mvtAvailableLayers
|
||||
|
||||
this.favourites = new FavouritesFeatureSource(this)
|
||||
|
||||
|
|
@ -111,6 +113,7 @@ export class WithSpecialLayers extends WithChangesState {
|
|||
this.mapProperties,
|
||||
{
|
||||
isActive: this.mapProperties.zoom.map((z) => z < maxzoom),
|
||||
availableLayers: this.mvtAvailableLayers
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue