Skip to content

An Android app to open Google Maps in other map apps and to create geo: links

License

Notifications You must be signed in to change notification settings

jakubvalenta/geoshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geo Share app icon

Geo Share

An Android app to open Google Maps in other map apps and to create geo: links.

Get it on F-Droid Get it on Izzy on Droid

When to Use Geo Share

If someone sends you a Google Maps link but you prefer using OpenStreetMap, you can share the link with Geo Share. The app will open it in an installed map app of your choice, such as OsmAnd or Organic Maps.

If you like finding places on Google Maps but prefer a different app for navigation, you can share the location from Google Maps with Geo Share. The app will open it in your favorite navigation app.

You can also use the app to copy Google Maps links as geo: links to your clipboard.

Intro

How to View Google Maps Locations in Other Map Apps

Share a location from Google Maps app or from your web browser.

Screenshot of Google Maps' share screen

Choose Share geo: and Geo Share will let you open the location in any installed map app.

Screenshot of Geo Share's share screen

Configure Android to Offer Alternative Maps for Google Links (Optional)

First, go to Settings > Apps > Maps > Open by default and disable Maps from opening links automatically.

Screenshot of Google Maps' Open By default settings

Then go to Settings > Apps > Geo Share > Open by default > Add links and enable Geo Share to handle its supported links.

Screenshot of Geo Share's Open By default settings

Make sure to select at least maps.google.com and maps.app.goo.gl. If some links are grayed out, other Google apps may be set as their default handlers. You can locate these apps and adjust their settings as we did with Google Maps.

How to Create geo: Links

Select Copy geo: when sharing from Google Maps.

Screenshot of Google Maps' share screen

Or simply open Geo Share and paste your Google Maps link.

Screenshot Geo Share's geo: link conversion form

How It Works and Privacy Considerations

There are three scenarios how Geo Share turns a Google Maps URL into a geo: URI. Two of them can connect to Google's servers.

  1. If the Google Maps URL already contains geographic coordinates (for example https://www.google.com/maps/place/Central+Park/data=!3d44.4490541!4d26.0888398), then it's parsed and no request to Google's servers is made.

  2. If the Google Maps URL doesn't contain geographic coordinates (for example https://www.google.com/maps/place/Central+Park/), then Geo Share asks you if it can connect to Google.

    If you allow connecting to Google, then Geo Share makes an HTTP GET request to Google Maps and parses the coordinates from the HTML response. You can imagine it as curl https://www.google.com/maps/place/Central+Park/ | grep -E '/@[0-9.,-]+'.

    If you don't allow connecting to Google, then Geo Share creates a geo: link with a place search term (for example geo:0,0?q=Central%20Park).

  3. If the Google Maps URL is a short link (for example https://maps.app.goo.gl/TmbeHMiLEfTBws9EA), then Geo Share asks you if it can connect to Google.

    If you allow connecting to Google, then Geo Share makes an HTTP HEAD request to the short link and reads the full link from the response headers. You can imagine it as curl -I https://maps.app.goo.gl/TmbeHMiLEfTBws9EA | grep location:. Then Geo Share continues with scenario 1. or 2., depending on whether the full link contains coordinates or not. In case of scenario 2., another connection to Google will be made, but this time without asking.

    If you don't allow connecting to Google, then Geo Share cancels the creation of the geo: link.

Go to Preferences to permanently allow or deny connecting to Google instead of always asking, which is the default.

Compatibility with the GMaps WV App

It's not possible to share a link from GMaps WV with Geo Share, because GMaps WV already produces geo: links. So you don't need Geo Share and can directly share a location from GMaps WV with another map app.

Reporting Issues

Geo Share supports many Google Maps URL formats. Still, if you find a link that doesn't work, please report an issue on GitHub.

Screenshots

Screenshot of Geo Share's main screen Screenshot of Geo Share's share screen Screenshot of Geo Share asking for permission to connect to Google Screenshot of Geo Share's intro screen

Installation

From an App Store (Recommended)

Get the app on F-Droid or Izzy on Droid.

From an APK File

  1. Download the APK from GitHub.

  2. Verify the APK signature:

    apksigner verify --print-certs page.ooooo.geoshare.apk

    Expected output:

    Signer #1 certificate DN: CN=Jakub Valenta, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=DE
    Signer #1 certificate SHA-256 digest: 1b27b17a9df05321a93a47df31ed0d6645ebe55d0e89908157d71c1032d17c10
    Signer #1 certificate SHA-1 digest: f847c6935fa376a568a56ca458896b9236e22b6c
    Signer #1 certificate MD5 digest: 6bcaa6bd5288a6443754b85bf6700374
    
  3. Install the APK on your phone using adb:

    adb -d install page.ooooo.geoshare.apk

Development

Open this repo in Android Studio to build and run the app, and to run unit tests and integrated tests.

Generating a Signed Release APK

make sign keystore_path=/path/to/your/keystore.jks

Installing the Release APK on Your Phone

make install

Testing Various Google Maps Links

Link with coordinates in URL:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/place/Pozna%C5%84+Old+Town,+61-001+Pozna%C5%84,+Poland/data=!4m6!3m5!1s0x47045b49399cf863:0xf61cbcaacd7d3070!7e2!8m2!3d52.4083009!4d16.929066199999998' page.ooooo.geoshare.debug

Link with view centerpoint coordinates in URL:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/place/Berlin,+Germany/@52.5067296,13.2599309,11z/' page.ooooo.geoshare.debug

Short link:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://maps.app.goo.gl/eukZjpeYrrvX3tDw6' page.ooooo.geoshare.debug

Link with coordinates only in HTML:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/place/Berlin,+Germany/' page.ooooo.geoshare.debug

Place list link:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://www.google.com/maps/placelists/list/mfmnkPs6RuGyp0HOmXLSKg' page.ooooo.geoshare.debug

Google Search link:

adb -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d 'https://g.co/kgs/91UYXud' page.ooooo.geoshare.debug

Link shared as a SEND Intent:

adb -s emulator-5554 shell am start -W -a android.intent.action.SEND -t text/plain -e android.intent.extra.TEXT "https://www.google.com/maps/place/Berlin,+Germany/@52.5067296,13.2599309,11z/" page.ooooo.geoshare.debug

Contributing

Feel free to remix this project under the terms of the GNU General Public License version 3 or later. See COPYING and NOTICE.