Skip to content

Commit

Permalink
inspector: default to map view with tile boundaries [#49]
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Dec 1, 2022
1 parent be6b384 commit b0fe168
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const ToolbarToggleGroup = StyledToggleGroup;
const ToolbarToggleItem = StyledToggleItem;

function Loader(props: { file: PMTiles }) {
let [tab, setTab] = useState("inspector");
let [tab, setTab] = useState("maplibre");
let [metadata, setMetadata] = useState<[string, string][]>([]);
let [modalOpen, setModalOpen] = useState<boolean>(false);

Expand Down Expand Up @@ -156,12 +156,12 @@ function Loader(props: { file: PMTiles }) {
value={tab}
onValueChange={setTab}
>
<ToolbarToggleItem value="inspector" aria-label="Left aligned">
<MagnifyingGlassIcon /> Tile Inspector
</ToolbarToggleItem>
<ToolbarToggleItem value="maplibre" aria-label="Right aligned">
Map View
</ToolbarToggleItem>
<ToolbarToggleItem value="inspector" aria-label="Left aligned">
<MagnifyingGlassIcon /> Tile Inspector
</ToolbarToggleItem>
</ToolbarToggleGroup>
<ToolbarLink href="#" target="_blank" css={{ marginRight: 10 }}>
{props.file.source.getKey()}
Expand Down
1 change: 1 addition & 0 deletions app/src/MaplibreMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function MaplibreMap(props: { file: PMTiles }) {
layers: [],
},
});
map.showTileBoundaries = true;
map.addControl(new maplibregl.NavigationControl({}));
map.on("load", map.resize);

Expand Down

0 comments on commit b0fe168

Please sign in to comment.