Skip to content

Commit

Permalink
fix: Rotate coordinates for Mapbox GL
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Oct 31, 2022
1 parent 5f52bfd commit 9d68fb7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions lib/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12772,10 +12772,6 @@ Object {
"geometry": Object {
"coordinates": Array [
Array [
Array [
14.60190128636069,
37.464406338104496,
],
Array [
14.600668902543442,
37.91801270483731,
Expand All @@ -12792,6 +12788,10 @@ Object {
14.60190128636069,
37.464406338104496,
],
Array [
14.600668902543442,
37.91801270483731,
],
],
],
"type": "Polygon",
Expand Down Expand Up @@ -12819,10 +12819,6 @@ Object {
"geometry": Object {
"coordinates": Array [
Array [
Array [
14.60190128636069,
37.464406338104496,
],
Array [
14.600668902543442,
37.91801270483731,
Expand All @@ -12839,6 +12835,10 @@ Object {
14.60190128636069,
37.464406338104496,
],
Array [
14.600668902543442,
37.91801270483731,
],
],
],
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion lib/kml/ground_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ function getLatLonBox(node: Element): Polygon | null {
const bbox: BBox = [west, south, east, north];
let coordinates = [
[
[west, south], // bottom left
[west, north], // top left
[east, north], // top right
[east, south], // top right
[west, south], // bottom left (again)
[west, north], // top left
],
];
if (typeof rotation === "number") {
Expand Down

0 comments on commit 9d68fb7

Please sign in to comment.