-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3580 from Vizzuality/feat/recent-imagery
Feat/recent imagery
- Loading branch information
Showing
57 changed files
with
1,163 additions
and
1,117 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/javascript/components/map-v2/components/basemaps/basemaps-selectors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { createSelector, createStructuredSelector } from 'reselect'; | ||
|
||
import { | ||
getBasemap, | ||
getLabels, | ||
getActiveDatasetsState, | ||
getMapZoom, | ||
getActiveBoundaryDatasets, | ||
getBoundaryDatasets | ||
} from 'components/map-v2/selectors'; | ||
|
||
import basemaps, { labels } from './basemaps-schema'; | ||
|
||
export const getAllBoundaries = createSelector( | ||
[getBoundaryDatasets], | ||
boundaries => [{ label: 'No boundaries', value: null }].concat(boundaries) | ||
); | ||
|
||
export const getBasemapsProps = createStructuredSelector({ | ||
activeDatasets: getActiveDatasetsState, | ||
mapZoom: getMapZoom, | ||
activeLabels: getLabels, | ||
activeBasemap: getBasemap, | ||
boundaries: getAllBoundaries, | ||
activeBoundaries: getActiveBoundaryDatasets, | ||
basemaps: () => basemaps, | ||
labels: () => labels, | ||
landsatYears: () => | ||
basemaps.landsat.availableYears.map(y => ({ | ||
label: y, | ||
value: y | ||
})) | ||
}); |
Oops, something went wrong.