Refactor style cache
This commit is contained in:
@@ -4,8 +4,7 @@ import { IMapState } from '../models/map.state';
|
||||
import { IItemLayer } from '../models/item.layer';
|
||||
import { IQueryState } from '../models/query.state';
|
||||
import { IItem } from '@farmmaps/common';
|
||||
import { Feature } from 'ol';
|
||||
import { Extent } from 'ol/extent';
|
||||
import { Feature,Style } from 'ol';
|
||||
|
||||
export const SETSTATE = '[Map] SetState';
|
||||
export const SETMAPSTATE = '[Map] MapState';
|
||||
@@ -35,6 +34,7 @@ export const SELECTBASELAYER = '[Map] SelectBaseLayers';
|
||||
export const SELECTOVERLAYLAYER = '[Map] SelectOverlayLayers';
|
||||
export const ZOOMTOEXTENT = '[Map] ZoomToExtent';
|
||||
export const DOQUERY = '[Map] DoQuery';
|
||||
export const SETSTYLE = '[Map] SetStyle';
|
||||
|
||||
export class SetState implements Action {
|
||||
readonly type = SETSTATE;
|
||||
@@ -204,6 +204,12 @@ export class DoQuery implements Action {
|
||||
constructor(public query:IQueryState) { }
|
||||
}
|
||||
|
||||
export class SetStyle implements Action {
|
||||
readonly type = SETSTYLE;
|
||||
|
||||
constructor(public itemType:string,public style:Style) { }
|
||||
}
|
||||
|
||||
export type Actions = SetMapState
|
||||
| Init
|
||||
| SetParent
|
||||
@@ -231,5 +237,6 @@ export type Actions = SetMapState
|
||||
| ZoomToExtent
|
||||
| SetState
|
||||
| SetViewExtent
|
||||
| DoQuery;
|
||||
| DoQuery
|
||||
| SetStyle;
|
||||
|
||||
|
Reference in New Issue
Block a user