mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-14 02:44:19 -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 [transitionInProgress, setTransitionInProgress] = useState<boolean>(false);
|
||||||
const [geolocationInProgress, setGeolocationInProgress] = useState<boolean>(false);
|
const [geolocationInProgress, setGeolocationInProgress] = useState<boolean>(false);
|
||||||
const [isMobileMapState, setIsMobileMapState] = 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),
|
// In order to detect that the layer has been toggled (between census and tribal),
|
||||||
// this state variable will hold that information
|
// this state variable will hold that information
|
||||||
|
@ -350,7 +350,15 @@ const J40Map = ({location}: IJ40Interface) => {
|
||||||
dragRotate={false}
|
dragRotate={false}
|
||||||
touchRotate={false}
|
touchRotate={false}
|
||||||
// eslint-disable-next-line max-len
|
// 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: ******
|
// ****** Callback props: ******
|
||||||
|
@ -367,15 +375,16 @@ const J40Map = ({location}: IJ40Interface) => {
|
||||||
|
|
||||||
{/* Load either the Tribal layer or census layer */}
|
{/* Load either the Tribal layer or census layer */}
|
||||||
{
|
{
|
||||||
|
// Todo: may not need both props...
|
||||||
censusSelected ?
|
censusSelected ?
|
||||||
<MapTractLayers
|
<MapTractLayers
|
||||||
selectedFeature={selectedFeature}
|
selectedFeature={selectedFeature}
|
||||||
selectedFeatureId={selectedFeatureId}
|
selectedFeatureId={selectedFeatureId}
|
||||||
/> :
|
/> :
|
||||||
<MapTribalLayer
|
<MapTribalLayer
|
||||||
selectedFeature={selectedFeature}
|
selectedFeature={selectedFeature}
|
||||||
selectedFeatureId={selectedFeatureId}
|
selectedFeatureId={selectedFeatureId}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
{/* This will add the navigation controls of the zoom in and zoom out buttons */}
|
{/* This will add the navigation controls of the zoom in and zoom out buttons */}
|
||||||
|
|
|
@ -81,8 +81,9 @@ const MapTribalLayer = ({
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Alaska layer */}
|
{/* Alaska layer */}
|
||||||
|
{/* // Todo: limit zoom in amount */}
|
||||||
<Layer
|
<Layer
|
||||||
id={constants.SELECTED_FEATURE_BORDER_LAYER_ID}
|
id={constants.TRIBAL_ALASKA_POINTS_LAYER_ID}
|
||||||
source-layer={constants.TRIBAL_SOURCE_LAYER}
|
source-layer={constants.TRIBAL_SOURCE_LAYER}
|
||||||
filter={['==', ['geometry-type'], 'Point']}
|
filter={['==', ['geometry-type'], 'Point']}
|
||||||
type='circle'
|
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 SELECTED_FEATURE_BORDER_LAYER_ID = 'selected-feature-border-layer-id';
|
||||||
export const TRIBAL_LAYER_ID = 'tribal-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 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:
|
// Used in layer filters:
|
||||||
export const SCORE_PROPERTY_LOW = 'M_SCORE';
|
export const SCORE_PROPERTY_LOW = 'M_SCORE';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue