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:
12
js/v3.ts
12
js/v3.ts
@@ -315,13 +315,13 @@ export function bytesToHeader(bytes: ArrayBuffer, etag?: string): Header {
|
||||
tileType: v.getUint8(94),
|
||||
minZoom: v.getUint8(95),
|
||||
maxZoom: v.getUint8(96),
|
||||
minLon: v.getFloat32(97, true),
|
||||
minLat: v.getFloat32(101, true),
|
||||
maxLon: v.getFloat32(105, true),
|
||||
maxLat: v.getFloat32(109, true),
|
||||
minLon: v.getInt32(97, true) / 10000000,
|
||||
minLat: v.getInt32(101, true) / 10000000,
|
||||
maxLon: v.getInt32(105, true) / 10000000,
|
||||
maxLat: v.getInt32(109, true) / 10000000,
|
||||
centerZoom: v.getUint8(113),
|
||||
centerLon: v.getFloat32(114, true),
|
||||
centerLat: v.getFloat32(118, true),
|
||||
centerLon: v.getInt32(114, true) / 10000000,
|
||||
centerLat: v.getInt32(118, true) / 10000000,
|
||||
etag: etag,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user