-
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
0412291
commit c649312
Showing
4 changed files
with
55 additions
and
18 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,68 @@ | ||
// 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 { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
// const { mapId, config } = props; | ||
interface AoiItem { | ||
aoiTitle: string; | ||
aoiUrl: string; | ||
extent: Extent; | ||
} | ||
|
||
type AoiListItems = AoiItem[]; | ||
|
||
type TypeAoiProps = { | ||
isOpen: boolean; | ||
aoiList: AoiListItems; | ||
version: string; | ||
}; | ||
|
||
// const { cgpv } = window; | ||
export function AoiPanel(props: AoiPanelProps): JSX.Element { | ||
const { mapId, config } = props; | ||
const aoiList = config.aoiList as AoiListItems; | ||
|
||
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.aoiUrl === 'string' && <Box component="img" src={aoiItem.aoiUrl} 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
8 changes: 7 additions & 1 deletion
8
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