State: MapViewport
State: UIState State is required for the map viewport. This is the representation of the map in terms of location, zoom, extent. This will require actions to update the current map viewport, a state interface describing the structure of the state, a reducer to handle changes to the map viewport, and selectors to retrieve the current map viewport configuration.
Actions should be created with the NgRx createAction utility function. Selectors should be created with the NgRx createSelector utility function. Reducers should be created with the NgRx createReducer utility function.
Note: For AOT compilation purposes, the created reducer must be wrapped in a static function (see below)
Actions:
- mapViewportChanged (event)
- Parameters:
- viewport:
MapViewport
- viewport:
- Parameters:
State Interface:
- Should be mapped in app state interface in state/index.ts
- Name: IUIPanelsState
- Properties:
- viewport:
MapViewport
- Optional
- changedAd: boolean
- viewport:
Reducer:
- Should handle the action defined above
- Should be mapped into reducer map in state/index.ts
- Must be wrapped in an AOT compatible function named for the state (see State: Events)
Selectors:
- mapViewport: Retrieve map viewport from state
- mapChangedAt: Retrieve changed at timestamp from state