Skip to content

Commit

Permalink
fix lat-long swap in maps
Browse files Browse the repository at this point in the history
  • Loading branch information
tonka3000 committed Jul 24, 2024
1 parent 9def913 commit d9e34a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# RaycastUI Changelog

## [1.0.1] - 2024-07-24

- Fix latitude longitude coordinate swap when calling Apple Maps

## [Initial Version] - 2024-02-18
2 changes: 1 addition & 1 deletion src/lib/maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function openInMaps({ coordinates: c, mapType }: MapsQuery) {
const up = new URL("maps://maps.apple.com/");
const mt = mapType ? mapTypeMapping[mapType] : undefined;
if (c) {
up.searchParams.set("ll", `${c.long},${c.lat}`);
up.searchParams.set("q", `${c.lat},${c.long}`);
}
if (mt) {
up.searchParams.set("t", mt);
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function MyTest() {
title="Maps"
actions={
<ActionPanel>
<Action.OpenMaps title="Coordinates" coordinates={{ long: 51.5007292, lat: -0.1272003 }} />
<Action.OpenMaps title="Coordinates" coordinates={{ lat: 51.5007292, long: -0.1272003 }} />
<Action.OpenMaps title="Map Type" mapType="Satellite" />
</ActionPanel>
}
Expand Down

0 comments on commit d9e34a8

Please sign in to comment.