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