YSK about the Geo URI scheme, a standard way to link to a location so that users can open it in any map application or website

For each example in this post, I will be linking to the sea otter pools at the Vancouver aquarium. That location has the coordinates of 49.30063,-123.13149

To link to it, you would use 'geo:49.30063,-123.13149'.

Depending on your web browser, pasting that into the search bar might prompt you to select which map website you want to use to view that location. For me in Firefox, it asked me to pick between Google Maps and OpenStreetMaps. It's even more convenient on mobile, where it asks me which map app I want to open it with. Both CoMaps and Google Maps handled it correctly.

If you are writing a post or comment on Lemmy/Piefed/etc., you can place it in the second part of the markdown link format: [Sea Otter Pools](geo:49.30063,-123.13149). This would output like this: Sea Otter Pools

The linked OpenStreetMap wiki page has a good summary of how well various apps support this scheme. A lot of people here are active in the open source space, so please consider following up with the apps that are currently missing support or have partial support for this: https://wiki.openstreetmap.org/wiki/Geo_URI_scheme


EDIT: I forgot to mention, you can also use apps like this one to convert maps links between each other

https://github.com/jakubvalenta/GeoShare

https://f-droid.org/packages/page.ooooo.geoshare/

https://apt.izzysoft.de/fdroid/index/apk/page.ooooo.geoshare

705 points · 89 comments · view on lemmy.world

89 Comments

abbadon420@sh.itjust.works · 66 pts · 3d

This is neat

squirrel@cake.kobel.fyi · 55 pts · 3d (3 replies)

Sadly it doesn't work sharing a geo link in Signal, and they don't want to implement it. GitHub Issue

unexposedhazard@discuss.tchncs.de · 39 pts · 3d (1 reply)

Same with element. They used to support it but dropped it. Really stupid excuse in that github issue. If adding support for sonething so simple adds lots of complexity then your codebase is garbage. This is why we cant have nice things.

Ghoelian@piefed.social · 6 pts · 2d

Lol the pr is only 2 files, one of which is a test class. I do wonder why they wrote their own parser, does javas url handler not support the geo scheme either or something?

zekas@sh.itjust.works · 1 pts · 22h

Gotta marvel at the logic at work. No one supports it, neither should we. Great way to ensure nothing ever happens.

lawks@aussie.zone · 38 pts · 3d (4 replies)

It has abysmal support. All the places you'd need it to work without anything special, like link recognition in messaging apps and email clients, it rarely does. Even apps that could make good use of specific locations for inputs often don't register a handler for the scheme. It's been that way for years, and I don't expect it to get a whole lot better.

sik0fewl@piefed.ca · 26 pts · 3d (1 reply)

The link does not even render in Voyager, unfortunately.

greatwhitebuffalo41@slrpnk.net · 6 pts · 3d

Yeah I noticed that was well

grue@lemmy.world · 18 pts · 3d

That's exactly why YSK (especially if you're a developer)!

SlurpingPus@lemmy.world · 3 pts · 2d

Pro tip: on Android, the Automate app can receive text shared to it and do custom things — such as getting coordinates, slapping 'geo:' on them, and opening in a map app. This can alleviate some of the pains by the user selecting and sharing the coords by hand. The app is paid and requires some programming chops, but is hella useful for custom automation.

Viking_Hippie@lemmy.dbzer0.com · 30 pts · 3d (2 replies)

I will be linking to the sea otter pools at the Vancouver aquarium

checks username

Party at your place?

otter@lemmy.ca · 32 pts · 3d (1 reply)

You don't need to bring clams, but it's polite to do so

LastYearsIrritant@sopuli.xyz · 11 pts · 3d

BYOOR

Bring Your Oyster Opening Rock

DougPiranha42@lemmy.world · 18 pts · 3d (1 reply)

This sounds nice. On iphone, nothing happens when I click your link. When I paste it in safari, it searches for it, and the ddg results are coordinates finder websites, not related to the specific location.

CombatWombat@feddit.online · 6 pts · 3d

This is only true if you don't have an app installed to handle the link schema. When I click the link, it opens Organic Maps

logi@lemmy.world · 16 pts · 3d

Tapping that little NK on my android phone That seems to work.

naught101@lemmy.world · 13 pts · 3d (3 replies)

Link doesn't work in voyager. Does in Firefox though!

bampop@lemmy.world · 1 pts · 2d (2 replies)

For me in Firefox it just takes me to my search engine, which proposes a bunch of sites to convert gps coordinates, top item is a front end for google maps. No OpenStreetMaps to be seen. Doesn't look like it's a universally supported thing. Also none of the position links in this thread are clickable

naught101@lemmy.world · 1 pts · 2d (1 reply)

I'm on a phone, haven't tried it on a PC yet

bampop@lemmy.world · 1 pts · 2d

That's probably what makes the difference

Outdated4134@piefed.zip · 12 pts · 3d (7 replies)

For me, there is no link. I copied it and pasted it (geo:49.30063, -123.13149) several different things and none of them worked correctly.

otter@lemmy.ca · 1 pts · 3d (5 replies)

Which app/frontend are you using? It looks like some of the Lemmy/Piefed clients don't support it properly.

Outdated4134@piefed.zip · 4 pts · 2d (1 reply)

Voyager

hanrahan@slrpnk.net · 4 pts · 2d

FYI Works with Summit

titanicx@lemmy.zip · -1 pts · 3d (2 replies)

I don't see how which app on Lemmy would matter as far as geo-coordinates because all you're linking there is literally a latitude and longitude of coordinates. And if they paste it into a web browser, it wouldn't matter what lemmy client they use.

SkaveRat@discuss.tchncs.de · 6 pts · 3d

Frontend apps need to recognize the markdown as a valid url scheme and parse it accordingly

Voyager does not, for example

otter@lemmy.ca · 3 pts · 3d

Some apps display/handle links in weird ways. It's the same reason why the OSM link above lists information about support on different messaging apps. I assume some of it comes down to sanitizing inputs, or whether a specific library an app is using has support for it, or if an app offloads the task to the system share sheet

For example, the links work for me in Boost for Lemmy and Summit, but not in Voyager. Another user mentioned submitting an issue to the developer of their particular app

ech@lemmy.ca · -3 pts · 3d

You have a space after the comma which is ruining the formatting. Try it without.

deltapi@lemmy.world · 11 pts · 3d

Very cool, this was the result for me, so at least on android it seems to work as advertised. A picture of an app choice dialog after checking on a 'geo' link showing several map/location apps to choose from

chunes@lemmy.world · 7 pts · 3d

Depending on your web browser, pasting that into the search bar might prompt you to select which map website you want to use to view that location. For me in Firefox, it asked me to pick between Google Maps and OpenStreetMaps.

I'm on Firefox and all it did was initiate a web search that found one result: this thread. If it's a hyperlink, all it does is open a blank page.

otter@lemmy.ca · 7 pts · 3d (1 reply)

An unnecessary complicated example where I use an image in the first part of the markdown notation:

[![A computer icon of a map location pinpoint with geographic context.](https://thumb.wikimedia.org/wikipedia/commons/thumb/e/e2/Pin_location_context.svg/330px-Pin_location_context.svg.png)](geo:49.30063,-123.13149)

Which renders as:

A computer icon of a map location pinpoint with geographic context.


Also, no, I do not live at this location. Not currently.

Zachariah@lemmy.world · 17 pts · 3d

Also, no, I do not live at this location. Not currently.

You otter consider it though. Free food. Swim any time you want. That’s the life.

Also: Unfortunately, in Voyager, the geo link is rendered just as the link description and isn’t clickable. And on iOS, I tried Firefox Focus and Safari and both just took me to a web search for longitude and latitude. I really wish it worked because it’s a great feature.

friend_of_satan@lemmy.world · 7 pts · 3d (4 replies)

I wonder if it would make sense to have a URL scheme for that instead, like geo://49.30063,-123.13149

filcuk@feddit.uk · 6 pts · 2d (1 reply)

What about tel:, or mailto:, sms:, callto:

friend_of_satan@lemmy.world · 2 pts · 2d

I'm trying to say "great job pointing that out" without soundling like an LLM. But seriously, I'm happy you pointed that out. I completely forgot about those syntaxes. After you mentioned them, I went and browsed RFC3986 and found these sample URIs, which include news, mailto, ftp, and more, which covers both // style and non-// style. https://www.rfc-editor.org/info/rfc3986/#section-1.1.2

It's too late for me to claim that I fully grok the nuances, so that'll have to wait for anther day, but I appreciate your comment. TIL some cool stuff.

AA5B@lemmy.world · 2 pts · 2d (1 reply)

It’s hard not to immediately want to extend this to astronomy

friend_of_satan@lemmy.world · 2 pts · 2d

maybe geo:earth.surface/lat,lon?date=date or geo:mars.sky?lat=lat,lon=lon,date=date or something? I'm sure there could be a stanard syntax for but I'm pretty ignorant about how that could work well.

aim4harmony@lemmy.world · 6 pts · 3d

I got the correct area on Fennec -> CoMaps (app) on /e/OS. ☺️ The website alone resulted in a blank page.

smeenz@lemmy.nz · 6 pts · 2d (6 replies)

Doesn't work on the moon.

MimicJar@lemmy.world · 8 pts · 2d (1 reply)

Technically it does.

The default is to use the Coordinate Reference System for the Earth, but if you wanted to use the moon then you'd use something like,

geo:37.786971,-122.399677;crs=Moon-2011;u=35

smeenz@lemmy.nz · 3 pts · 2d

Nice !

Goodlucksil@lemmy.dbzer0.com · 3 pts · 2d (3 replies)

Geo means earth. Of course it won't work outside of the Earth

smeenz@lemmy.nz · 2 pts · 2d (1 reply)

Ah, my mistake, there is no geography, geology, or geometry on the moon.

Goodlucksil@lemmy.dbzer0.com · 1 pts · 2d

People who named them like so didn't think that there would be geometry, geology or geography on the moon. Or they just interpreted it as land.

potter2010@lemmy.ca · 0 pts · 2d

Well, most places people go to are outside the earth. (Just barely outside.)

kn33@lemmy.world · 6 pts · 3d (5 replies)

I zoomed in on bumfuck, Kansas to try this out. Let's see.

pelespirit@sh.itjust.works · 2 pts · 3d (2 replies)

You need the ! to start it off.

![Let’s see](geo:37.1213785, -98.9773100)

Edit: Not working

Edit 2, trying again:

![Let’s see](geo:37.1213785 -98.9773100)

Edit 3: no worky

Edit 4: Now it works as a link, thanks to the other posters, but it doesn't really do anything. Maybe Ublock Origin?

Let’s see

some_kind_of_guy@lemmy.world · 5 pts · 3d

It's the whitespace

otter@lemmy.ca · 4 pts · 3d

The exclamation mark is for images, yours isn't working because of the space in the coordinates

ech@lemmy.ca · 2 pts · 3d (1 reply)

Remove the space

Like this.

*Downvotes for helping someone is a new one. Strange.

kn33@lemmy.world · 3 pts · 3d

Ah, neat. Works now.

RollingZeppelin@piefed.ca · 6 pts · 3d (1 reply)

On my Maps for Android, it only zooms to the Aquarium, there's no pointer for the Sea Otter Pools.

otter@lemmy.ca · 3 pts · 3d

It seems that google maps is a bit hit or miss, maybe locations that have more details work better?

Google maps does not have anywhere near the level of detail openstreetmaps does for that location

GTG3000@programming.dev · 5 pts · 2d (2 replies)

Doesn't do anything as far as I can tell? Or is this android specific?

Also the links don't work in discord.

gwl@lemmy.blahaj.zone · 5 pts · 2d (1 reply)

It's what's known as a "Protocol URI", which the OS and/or browser have to choose what to do with that

Sounds like you have an OS or Browser that haven't implemented the protocol

WhyJiffie@sh.itjust.works · 5 pts · 2d

not only that. some clients including voyager don't recognize geo uris as openable links

anotherandrew@lemmy.mixdown.ca · 5 pts · 3d (1 reply)

Heh, on my iPhone it wants to open an NFC reading app for the sea otter geo: link

otter@lemmy.ca · 1 pts · 3d

How odd 😄

roomy@lemmy.world · 4 pts · 2d (2 replies)

I opened this in CoMaps and now i have a permanent map pointer to it hah

Hupf@feddit.org · 2 pts · 2d

Permanent sea otters? I'd count that as a win.

otter@lemmy.ca · 1 pts · 2d

Oops 😄

I think if you clear the cache it might go away. Mine doesn't show it anymore

scytale@piefed.zip · 4 pts · 3d (1 reply)

Can the commercial map apps spit out that format when sharing a location? I met up with a random person last week to buy a used item off of marketplace and they sent me an Apple maps pin of the exact apartment building they were in. I didn’t have apple maps installed.

otter@lemmy.ca · 5 pts · 3d

There are apps that can translate links into different formats, I would recommend that for your use case:

https://github.com/jakubvalenta/GeoShare

https://f-droid.org/packages/page.ooooo.geoshare/

https://apt.izzysoft.de/fdroid/index/apk/page.ooooo.geoshare

Wizard_Pope@lemmy.world · 4 pts · 2d (3 replies)

The link just does nothing for me on jerboa

arschfidel@discuss.tchncs.de · 8 pts · 2d (1 reply)

For me it does work when I hold press the link and then choose "Open in external" in the popup that opens. But yes, simply tapping does nothing.

Quexotic@infosec.pub · 1 pts · 2d

For me it fails when I do that.

hanrahan@slrpnk.net · 1 pts · 2d

FYI does using Summit

ArchEngel@lemmy.ca · 4 pts · 3d

Does not seem to open via Thunder. Can confirm that copying and pasting it into CoMaps or Waterfox works great though.

I have submitted a feature request to Thunder.

cloudsurfer@feddit.org · 3 pts · 2d (2 replies)

Does anyone know, why GitHub of all places does not support geo links in their readme or issue markdown files?

filcuk@feddit.uk · 2 pts · 2d

Mailto is explicitly allowed in the sanitizer they use, other such uri schemes aren't.
This is relatively standard, likely due to the mixed support.
Geo is not well supported, and ones like sms are platform-dependent.
It's just a pain noone wants to deal with.

gwl@lemmy.blahaj.zone · 1 pts · 2d

Edit: oops replied to the wrong person

anon_8675309@lemmy.world · 3 pts · 3d

Can’t get to work on iPhone. Apple fuckery?

phar@lemmy.world · 3 pts · 3d (1 reply)

When I pasted mine into duck duck go it didn't work. I deleted Geo and typed location, and now it works

Edit: spelling

GreyEyedGhost@piefed.ca · 1 pts · 3d

It doesn't work in Voyager, so I pasted it into ddg and I got a list of relevant apps to open it with.

Nurgus@lemmy.world · 3 pts · 2d (3 replies)

Is this better than What Three Words which also has a URL scheme? And is more memorable.

teolan@lemmy.world · 7 pts · 2d (1 reply)

The geo URL scheme works even for non English speakers and it won't give you a location on the other side of the world if you lake a typo or pronounce it bad.

Blackmist@feddit.uk · 2 pts · 2d

I mean, that's kind of on purpose with W3W.

A slight error should make the recipient go "Wait, what? That's in Venezuela!" rather than sending an ambulance crew to a location like 20 miles away from you.

otter@lemmy.ca · 5 pts · 2d

Since WhatThreeWords is proprietary, it likely won't be as easy to get it implemented in everything. I think the difficulty with coordinates can be solved by having an easy way to copy the Geo URI from various map apps

TheRiskiestBiscuit@reddthat.com · 3 pts · 2d

Could be just my configuration, but does not work in Brave, does not work in Safari, DOES work in Orion.

ddplf@szmer.info · 3 pts · 3d (2 replies)

Does Goo*le maps support it? Because they usually don't give a flying fuck about anything that would make it possible to share data with open-source solutions.

9point6@lemmy.world · 5 pts · 3d (1 reply)

Of course it does, they're not gonna miss an opportunity to get you into their app from somewhere else

ddplf@szmer.info · 1 pts · 3d

Well they don't consume GPX files, which is pretty abhorrent in itself

gwl@lemmy.blahaj.zone · 2 pts · 2d (2 replies)

Lemme see test link

AdrianTheFrog@lemmy.world · 2 pts · 2d (1 reply)

test link

I guess yours isn't working because there's a space in it

gwl@lemmy.blahaj.zone · 2 pts · 2d

Ooh okay, I expected it to ignore the space, nice!

Yep, works with the default lemmy frontend and Waterfox then

fdnomad@programming.dev · 2 pts · 2d

Neat, works well for me on Boost / Android

OldChicoAle@lemmy.world · 2 pts · 3d (1 reply)

Cool stuff, but don't use this for your business. You want actual links that will always work regardless of browser support for Geo. You want your customers to easily retrieve information so you gain their business.

otter@lemmy.ca · 1 pts · 3d

Definitely, IMO a business should link to multiple options to catch the most customers

I believe both google and apple maps support generic links with coordinates, although I don't know the exact structure

seadoo@lemmy.world · 2 pts · 3d

What about coordinate projections? No crs in that format.