Skip to content

Commit ef70e8a

Browse files
committed
chore: address copilot feedback
1 parent 9cb76a4 commit ef70e8a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/components/pageElements/Map.jsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ const extent = {
186186

187187
const tabs = ['Section Finder', 'Monument Finder'];
188188
const level14 = 72223;
189+
const plssPointsLayerId = 'PLSS Points';
189190

190191
/**
191192
* @typedef {Object} PlssMapProps
@@ -271,21 +272,22 @@ export default function PlssMap({ color, dispatch, drawerOpen, state }) {
271272
},
272273
{
273274
label: 'PLSS',
275+
defaultSelected: true,
274276
function: () => {
275277
return new VectorTileLayer({
276278
url: urls.plss,
277279
opacity: 0.5,
278-
selected: true,
279280
minScale: 2000000,
280281
});
281282
},
282283
},
283284
{
284-
label: 'PLSS Points',
285+
label: plssPointsLayerId,
286+
defaultSelected: true,
285287
function: () => {
286288
return new FeatureLayer({
289+
id: plssPointsLayerId,
287290
url: urls.points,
288-
selected: true,
289291
outFields: [
290292
'point_id',
291293
'plss_id',
@@ -300,7 +302,6 @@ export default function PlssMap({ color, dispatch, drawerOpen, state }) {
300302
'managed_by',
301303
'mrrc',
302304
'monument',
303-
'control',
304305
'point_category',
305306
],
306307
renderer,
@@ -371,7 +372,7 @@ export default function PlssMap({ color, dispatch, drawerOpen, state }) {
371372
}
372373

373374
if (!identifyGraphic) {
374-
const plssPoints = mapView.current.map.findLayerById('PLSS Points');
375+
const plssPoints = mapView.current.map.findLayerById(plssPointsLayerId);
375376
plssPoints.featureEffect = null;
376377

377378
return;
@@ -426,7 +427,7 @@ export default function PlssMap({ color, dispatch, drawerOpen, state }) {
426427
default: {
427428
const response = await mapView.current.hitTest(event);
428429

429-
const hits = response?.results?.filter((result) => result.layer?.id === 'PLSS Points');
430+
const hits = response?.results?.filter((result) => result.layer?.id === plssPointsLayerId);
430431

431432
let payload = null;
432433
if (hits.length > 0) {

0 commit comments

Comments
 (0)