Skip to content

Commit

Permalink
fix(landing): only show layers that can be viewed in the layer picker (
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha authored Apr 5, 2022
1 parent 5c956ba commit ac3dade
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/landing/src/components/layer.switcher.dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { EpsgCode } from '@basemaps/geo';
import { Component, ComponentChild, Fragment } from 'preact';
import { Config, GaEvent, gaEvent } from '../config.js';
import { LayerInfo, MapConfig } from '../config.map.js';
Expand Down Expand Up @@ -80,7 +79,7 @@ export class LayerSwitcherDropdown extends Component<unknown, LayerSwitcherDropd
const urban: ComponentChild[] = [];

for (const layer of this.state.layers.values()) {
if (!layer.projections.has(EpsgCode.Google)) continue;
if (!layer.projections.has(Config.map.tileMatrix.projection.code)) continue;

const node = <option value={layer.id}>{layer.name}</option>;
if (layer.name.toLowerCase().includes(' rural ')) rural.push(node);
Expand Down

0 comments on commit ac3dade

Please sign in to comment.