jakubvalenta / geoshare

An Android app to turn Google Maps links into geo: links
https://f-droid.org/packages/page.ooooo.geoshare/
GNU General Public License v3.0
36 stars 0 forks source link

Use place coordinates from the 'data' URL parameter #7

Closed jakubvalenta closed 1 week ago

jakubvalenta commented 1 week ago

This is an example Google Maps URL:

https://www.google.com/maps/place/RAI+-+Romantic+%26+Intimate/@44.5190589,25.7489796,11.42z/data=!4m6!3m5!1s0x40b1ffed911b9fcf:0x7394a7e7855d3929!8m2!3d44.4490541!4d26.0888398!16s%2Fg%2F11svmp0zhs

It contains two sets of coordinates:

  1. /@44.5190589,25.7489796,11.42z/ -- the map center point
  2. !3d44.4490541!4d26.0888398! -- the coordinates of the place

Currently Geo Share uses the center point coordinates (1.) and adds a q= parameter to search the place by name around the center point:

geo:44.5190589,25.7489796?q=RAI%20-%20Romantic%20%26%20Intimate&z=11

But we could use place coordinates (2.) and omit the q= parameter:

geo:44.4490541,26.0888398?z=11

The result should be that when this geo URL is opened in OsmAnd, it immediately shows the precise location of the place without showing the search UI.