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.301,-123.131.

To link to it, you would use ‘geo:49.301,-123.131’.

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.301,-123.131). 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.

  • OldChicoAle@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    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.caOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    23 days ago

    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
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

      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.

    • zekad@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      20 days ago

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

    • unexposedhazard@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

      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
        link
        fedilink
        English
        arrow-up
        0
        ·
        22 days ago

        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?

    • Otter@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

      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

  • deltapi@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    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

  • DougPiranha42@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    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
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

      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

  • ddplf@szmer.info
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    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
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

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

      • ddplf@szmer.info
        link
        fedilink
        English
        arrow-up
        0
        ·
        23 days ago

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

  • aim4harmony@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

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

  • ArchEngel@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    23 days ago

    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.

  • Outdated4134@piefed.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    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.

    • Ech@lemmy.ca
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

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

    • Otter@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

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

      • titanicx@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        23 days ago

        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.

        • Otter@lemmy.caOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          23 days ago

          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

        • SkaveRat@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          0
          ·
          23 days ago

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

          Voyager does not, for example