mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 19:01:08 +00:00
app visual cleanup
This commit is contained in:
@@ -115,6 +115,12 @@ function MaplibreMap(props: { file: PMTiles }) {
|
||||
useEffect(() => {
|
||||
let initStyle = async () => {
|
||||
if (map) {
|
||||
let metadata = await props.file.metadata();
|
||||
let bounds = metadata.bounds.split(',');
|
||||
map.fitBounds([
|
||||
[+bounds[0], +bounds[1]],
|
||||
[+bounds[2], +bounds[3]],
|
||||
]);
|
||||
let tileType = await introspectTileType(props.file);
|
||||
let style: any; // TODO maplibre types (not any)
|
||||
if (tileType === TileType.PNG || tileType == TileType.JPG) {
|
||||
|
||||
Reference in New Issue
Block a user