Skip to content

Commit

Permalink
fix(landing): disable osm/topographic for nztm as it doesnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Dec 16, 2021
1 parent 7c806e5 commit 2135471
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions packages/landing/src/components/debug.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { GoogleTms } from '@basemaps/geo';
import maplibre, { AnyLayer, Style } from 'maplibre-gl';
import { Component, ComponentChild } from 'preact';
import { Component, ComponentChild, Fragment } from 'preact';
import { Config } from '../config.js';
import { MapOptionType, WindowUrl } from '../url.js';

Expand Down Expand Up @@ -27,6 +28,21 @@ export class Debug extends Component<{ map: maplibre.Map }> {
<label className="debug__label">TileMatrix </label>
<div className="debug__value">{Config.map.tileMatrix.identifier}</div>
</div>
{this.renderSliders()}
<div className="debug__info">
<label className="debug__label">Purple</label>
<input type="checkbox" onClick={this.togglePurple} />
</div>
</div>
);
}

renderSliders(): ComponentChild | null {
// Only 3857 currently works with OSM/Topographic map
if (Config.map.tileMatrix.identifier !== GoogleTms.identifier) return;

return (
<Fragment>
<div className="debug__info">
<label className="debug__label">OSM</label>
{debugSlider(this.adjustOsm)}
Expand All @@ -35,11 +51,7 @@ export class Debug extends Component<{ map: maplibre.Map }> {
<label className="debug__label">Topographic</label>
{debugSlider(this.adjustTopographic)}
</div>
<div className="debug__info">
<label className="debug__label">Purple</label>
<input type="checkbox" onClick={this.togglePurple} />
</div>
</div>
</Fragment>
);
}

Expand Down

0 comments on commit 2135471

Please sign in to comment.