mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
inspector GL map uses fitBounds
This commit is contained in:
@@ -156,10 +156,11 @@ function MaplibreMap(props: { file: PMTiles }) {
|
|||||||
if (map) {
|
if (map) {
|
||||||
let header = await props.file.getHeader();
|
let header = await props.file.getHeader();
|
||||||
|
|
||||||
// map.fitBounds([
|
map.fitBounds([
|
||||||
// [header.minLon, header.minLat],
|
[header.minLon, header.minLat],
|
||||||
// [header.maxLon, header.maxLat],
|
[header.maxLon, header.maxLat],
|
||||||
// ]);
|
],{animate:false});
|
||||||
|
|
||||||
let style: any; // TODO maplibre types (not any)
|
let style: any; // TODO maplibre types (not any)
|
||||||
if (header.tileType === TileType.Png || header.tileType == TileType.Jpeg) {
|
if (header.tileType === TileType.Png || header.tileType == TileType.Jpeg) {
|
||||||
map.setStyle(rasterStyle(props.file) as any);
|
map.setStyle(rasterStyle(props.file) as any);
|
||||||
|
|||||||
Reference in New Issue
Block a user