-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb8df41
commit 65bb295
Showing
4 changed files
with
61 additions
and
19 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -26,6 +26,8 @@ | |
}, | ||
"extent": { | ||
"type": "array", | ||
"minItems": 4, | ||
"maxItems": 4, | ||
"items": [ | ||
{ | ||
"type": "number", | ||
|
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 |
---|---|---|
@@ -1,39 +1,73 @@ | ||
// import { TypeBasemapProps } from 'geoview-core/src/geo/layer/basemap/basemap-types'; | ||
// import { TypeJsonObject } from 'geoview-core/src/core/types/global-types'; | ||
// import { useMapProjection } from 'geoview-core/src/core/stores/store-interface-and-intial-values/map-state'; | ||
// import { useAppDisplayLanguage } from 'geoview-core/src/core/stores/store-interface-and-intial-values/app-state'; | ||
// import { TypeValidMapProjectionCodes, TypeDisplayLanguage } from 'geoview-core/src/api/config/types/map-schema-types'; | ||
import { Extent } from 'geoview-core/src/api/config/types/map-schema-types'; | ||
// import { logger } from 'geoview-core/src/core/utils/logger'; | ||
// import { getLocalizedMessage } from 'geoview-core/src/core/utils/utilities'; | ||
// import { getSxClasses } from './area-of-interest-style'; | ||
import { getSxClasses } from './area-of-interest-style'; | ||
|
||
/* | ||
interface AoiPanelProps { | ||
mapId: string; | ||
config: TypeJsonObject; | ||
config: TypeAoiProps; | ||
} | ||
*/ | ||
|
||
export function AoiPanel(/* props: AoiPanelProps */): JSX.Element { | ||
interface AoiItem { | ||
aoiTitle: string; | ||
imageUrl: string; | ||
extent: Extent; | ||
} | ||
|
||
type AoiListItems = AoiItem[]; | ||
|
||
type TypeAoiProps = { | ||
isOpen: boolean; | ||
aoiList: AoiListItems; | ||
version: string; | ||
}; | ||
|
||
export function AoiPanel(props: AoiPanelProps): JSX.Element { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
// const { mapId, config } = props; | ||
const { config } = props; | ||
const aoiList = config.aoiList as AoiListItems; | ||
|
||
// const { cgpv } = window; | ||
const { cgpv } = window; | ||
// const myMap = cgpv.api.maps[mapId]; | ||
|
||
// const { api, ui, react } = cgpv; | ||
// const { Select, Card, Box } = ui.elements; | ||
const { /* api, */ ui /* , react */ } = cgpv; | ||
const { Card, Box } = ui.elements; | ||
|
||
// const { useState } = react; | ||
|
||
// const theme = ui.useTheme(); | ||
// const sxClasses = getSxClasses(theme); | ||
const theme = ui.useTheme(); | ||
const sxClasses = getSxClasses(theme); | ||
|
||
// internal state and store values | ||
// const language = useAppDisplayLanguage(); | ||
|
||
// #region PRIVATE UTILITY FUNCTIONS | ||
// #endregion | ||
|
||
return <div />; | ||
return ( | ||
<Box sx={sxClasses.basemapCard}> | ||
{aoiList.map((aoiItem: AoiItem, index) => { | ||
return ( | ||
<Card | ||
tabIndex={0} | ||
// onClick={() => setBasemap(basemap.basemapId as string)} | ||
// onKeyPress={() => setBasemap(basemap.basemapId as string)} | ||
// eslint-disable-next-line react/no-array-index-key | ||
key={index} | ||
title={aoiItem.aoiTitle} | ||
contentCard={ | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
<> | ||
{typeof aoiItem.imageUrl === 'string' && ( | ||
// eslint-disable-next-line react/no-array-index-key | ||
<Box component="img" key={index} src={aoiItem.imageUrl} alt="" className="aoiCardThumbnail" /> | ||
)} | ||
</> | ||
} | ||
/> | ||
); | ||
})} | ||
</Box> | ||
); | ||
} |
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
10 changes: 8 additions & 2 deletions
10
packages/geoview-core/public/configs/navigator/26-package-area-of-interest-aoi-panel.json
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