Skip to content

Commit

Permalink
fix: map navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
louiechristie committed Mar 2, 2023
1 parent f04c7b8 commit 2df128c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/templates/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const Page = ({ page, ctx, places }) => {
href={`https://maps.google.com/?q=${location?.latitude},${location?.longitude}&ll=${location?.latitude},${location?.longitude}`}
>
Google Maps
</a>{" "}
</a>
{", "}
<a
href={`http://maps.apple.com/?sll=${location?.latitude},${location?.longitude}&z=10&t=s`}
>
Expand Down
11 changes: 7 additions & 4 deletions src/components/templates/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,20 @@ const Post = ({ post, ctx, places }) => {
<figcaption>
Navigate there using{" "}
<a
href={`https://maps.google.com/?q=${latitude},${longitude}&ll=${latitude},${longitude}`}
href={`https://maps.google.com/?q=${location?.latitude},${location?.longitude}&ll=${location?.latitude},${location?.longitude}`}
>
Google Maps
</a>{" "}
</a>
{", "}
<a
href={`http://maps.apple.com/?sll=${latitude},${longitude}&z=10&t=s`}
href={`http://maps.apple.com/?sll=${location?.latitude},${location?.longitude}&z=10&t=s`}
>
Apple Maps
</a>
, or{" "}
<a href={`geo:${latitude},${longitude}`}>another map app</a>
<a href={`geo:${location?.latitude},${location?.longitude}`}>
another map app
</a>
</figcaption>
</figure>
</div>
Expand Down

0 comments on commit 2df128c

Please sign in to comment.