mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
js v3 client: coordinates use e7 fixed-precision encoding
This commit is contained in:
Binary file not shown.
Binary file not shown.
12
js/v3.ts
12
js/v3.ts
@@ -315,13 +315,13 @@ export function bytesToHeader(bytes: ArrayBuffer, etag?: string): Header {
|
|||||||
tileType: v.getUint8(94),
|
tileType: v.getUint8(94),
|
||||||
minZoom: v.getUint8(95),
|
minZoom: v.getUint8(95),
|
||||||
maxZoom: v.getUint8(96),
|
maxZoom: v.getUint8(96),
|
||||||
minLon: v.getFloat32(97, true),
|
minLon: v.getInt32(97, true) / 10000000,
|
||||||
minLat: v.getFloat32(101, true),
|
minLat: v.getInt32(101, true) / 10000000,
|
||||||
maxLon: v.getFloat32(105, true),
|
maxLon: v.getInt32(105, true) / 10000000,
|
||||||
maxLat: v.getFloat32(109, true),
|
maxLat: v.getInt32(109, true) / 10000000,
|
||||||
centerZoom: v.getUint8(113),
|
centerZoom: v.getUint8(113),
|
||||||
centerLon: v.getFloat32(114, true),
|
centerLon: v.getInt32(114, true) / 10000000,
|
||||||
centerLat: v.getFloat32(118, true),
|
centerLat: v.getInt32(118, true) / 10000000,
|
||||||
etag: etag,
|
etag: etag,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user