mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-13 09:24:18 -07:00
Update AK layer id
- make AK layer clickable
This commit is contained in:
parent
73ae583e1e
commit
bac8c85a6c
3 changed files with 18 additions and 7 deletions
|
@ -84,7 +84,7 @@ const J40Map = ({location}: IJ40Interface) => {
|
|||
const [transitionInProgress, setTransitionInProgress] = useState<boolean>(false);
|
||||
const [geolocationInProgress, setGeolocationInProgress] = useState<boolean>(false);
|
||||
const [isMobileMapState, setIsMobileMapState] = useState<boolean>(false);
|
||||
const [censusSelected, setCensusSelected] = useState(true);
|
||||
const [censusSelected, setCensusSelected] = useState<boolean>(true);
|
||||
|
||||
// In order to detect that the layer has been toggled (between census and tribal),
|
||||
// this state variable will hold that information
|
||||
|
@ -350,7 +350,15 @@ const J40Map = ({location}: IJ40Interface) => {
|
|||
dragRotate={false}
|
||||
touchRotate={false}
|
||||
// eslint-disable-next-line max-len
|
||||
interactiveLayerIds={censusSelected ? [constants.HIGH_ZOOM_LAYER_ID, constants.PRIORITIZED_HIGH_ZOOM_LAYER_ID] : [constants.TRIBAL_LAYER_ID]}
|
||||
interactiveLayerIds={censusSelected ?
|
||||
[
|
||||
constants.HIGH_ZOOM_LAYER_ID,
|
||||
constants.PRIORITIZED_HIGH_ZOOM_LAYER_ID,
|
||||
] : [
|
||||
constants.TRIBAL_LAYER_ID,
|
||||
constants.TRIBAL_ALASKA_POINTS_LAYER_ID,
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
// ****** Callback props: ******
|
||||
|
@ -367,15 +375,16 @@ const J40Map = ({location}: IJ40Interface) => {
|
|||
|
||||
{/* Load either the Tribal layer or census layer */}
|
||||
{
|
||||
// Todo: may not need both props...
|
||||
censusSelected ?
|
||||
<MapTractLayers
|
||||
selectedFeature={selectedFeature}
|
||||
selectedFeatureId={selectedFeatureId}
|
||||
/> :
|
||||
<MapTribalLayer
|
||||
selectedFeature={selectedFeature}
|
||||
selectedFeatureId={selectedFeatureId}
|
||||
/>
|
||||
<MapTribalLayer
|
||||
selectedFeature={selectedFeature}
|
||||
selectedFeatureId={selectedFeatureId}
|
||||
/>
|
||||
}
|
||||
|
||||
{/* This will add the navigation controls of the zoom in and zoom out buttons */}
|
||||
|
|
|
@ -81,8 +81,9 @@ const MapTribalLayer = ({
|
|||
/>
|
||||
|
||||
{/* Alaska layer */}
|
||||
{/* // Todo: limit zoom in amount */}
|
||||
<Layer
|
||||
id={constants.SELECTED_FEATURE_BORDER_LAYER_ID}
|
||||
id={constants.TRIBAL_ALASKA_POINTS_LAYER_ID}
|
||||
source-layer={constants.TRIBAL_SOURCE_LAYER}
|
||||
filter={['==', ['geometry-type'], 'Point']}
|
||||
type='circle'
|
||||
|
|
|
@ -204,6 +204,7 @@ export const FEATURE_BORDER_LAYER_ID = 'feature-border-layer-id';
|
|||
export const SELECTED_FEATURE_BORDER_LAYER_ID = 'selected-feature-border-layer-id';
|
||||
export const TRIBAL_LAYER_ID = 'tribal-layer-id';
|
||||
export const SELECTED_TRIBAL_FEATURE_BORDER_LAYER_ID = 'selected-feature-tribal-border-layer-id';
|
||||
export const TRIBAL_ALASKA_POINTS_LAYER_ID = 'tribal-alaska-points-layer-id';
|
||||
|
||||
// Used in layer filters:
|
||||
export const SCORE_PROPERTY_LOW = 'M_SCORE';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue