This commit is contained in:
James Lyne 2022-02-17 19:55:10 +00:00
parent dfcaa6bf42
commit e3f1b72d8c

View File

@ -52,8 +52,8 @@ export class LiveAtlasProjection {
latLngToLocation(latLng: LatLng, y: number): Coordinate { latLngToLocation(latLng: LatLng, y: number): Coordinate {
const ptw = this.mapToWorld, const ptw = this.mapToWorld,
lon = this.tileSize + latLng.lat * (1 << this.nativeZoomLevels), lat = this.tileSize + latLng.lat * (1 << this.nativeZoomLevels),
lat = latLng.lng * (1 << this.nativeZoomLevels), lon = latLng.lng * (1 << this.nativeZoomLevels),
x = ptw[0] * lon + ptw[1] * lat + ptw[2] * y, x = ptw[0] * lon + ptw[1] * lat + ptw[2] * y,
z = ptw[6] * lon + ptw[7] * lat + ptw[8] * y; z = ptw[6] * lon + ptw[7] * lat + ptw[8] * y;