Skip to content

Commit 0759c54

Browse files
feat(landing): adjust layers dropdown BM-1079 (#3349)
### Motivation As a Basemaps user, I want the `Topolite` layer and the `Scanned Aerial Imagery Basemaps` category to appear at the top of the `Layers` dropdown for easier access. ### Modifications 1. Reordered the categories as they are shown in the `Layers` dropdown. 2. Added the `Topolite` layer to the list of default layers. ### Verification 1. Moved the `Scanned Aerial Imagery Basemaps` category to the top of the `Layers` dropdown below the `Basemaps` category. | Before | After | | - | - | | ![][img_1] | ![][img_2] | [img_1]: https://github.com/user-attachments/assets/4a147b31-422e-4aff-927f-57ad76e18b64 [img_2]: https://github.com/user-attachments/assets/29dc0513-93aa-495d-b1aa-04dc8c69ead3 2. Added the `Topolite` layer to the list of default layers. | Before | After | | - | - | | ![][img_3] | ![][img_4] | [img_3]: https://github.com/user-attachments/assets/a3ebc0ba-5118-43af-b2f4-3c43ec88d264 [img_4]: https://github.com/user-attachments/assets/efa34417-0b36-41c4-9e40-8af3a13c0b5a 3. When the user selected the `Topolite` layer: | The `StyleJSON` and `XYZ` fields display the expected values. | | - | | ![][img_5] | [img_5]: https://github.com/user-attachments/assets/e8579c11-73f0-42d0-8b31-56b02091d402 | The `style` parameter in the URL reflects the intended value. | | - | | `.../@-41.8899962,174.0492437,z5?style=topolite&i=topographic` |
1 parent a420f57 commit 0759c54

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/landing/src/components/layer.switcher.dropdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ type CategoryMap = Map<string, { label: string; options: { label: string; value:
1010

1111
const Categories = [
1212
'Basemaps',
13+
'Scanned Aerial Imagery Basemaps',
1314
'Satellite Imagery',
1415
'Urban Aerial Photos',
1516
'Rural Aerial Photos',
16-
'Scanned Aerial Imagery Basemaps',
1717
'Scanned Aerial Imagery',
1818
'Event',
1919
'Bathymetry',
@@ -225,6 +225,7 @@ export class LayerSwitcherDropdown extends Component<unknown, LayerSwitcherDropd
225225
return 1;
226226
}),
227227
);
228+
228229
return { options: [...orderedCategories.values()], current, hidden, total };
229230
}
230231
}

packages/landing/src/config.map.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,13 @@ function addDefaultLayers(output: Map<string, LayerInfo>): void {
393393
category: 'Basemaps',
394394
},
395395

396+
{
397+
id: 'topographic::topolite',
398+
title: 'Topolite',
399+
projections: new Set([EpsgCode.Google]),
400+
category: 'Basemaps',
401+
},
402+
396403
{
397404
id: 'elevation',
398405
title: 'Elevation',

0 commit comments

Comments
 (0)