Page MenuHomePhabricator

Allow geo intents: link geo URIs instead of https://tools.wmflabs.org/geohack/geohack.php
Open, MediumPublic

Description

Clicking on coordinates in the Wikipedia app launches
https://tools.wmflabs.org/geohack/geohack.php?pagename=Accra&params=5_33_N_0_12_W_type:city(2291352)_region:GH

Would it be possible to launch a geo intent instead (or perhaps optionally launch a geo intent)?

When using the wikipedia app offline (e.g. sight seeing abroad) the geohack link is not useful. A geo intent would be able to launch OSMAnd or a cached portion of google maps.

Event Timeline

Bjohas created this task.May 30 2016, 7:48 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 30 2016, 7:48 PM
Dbrant added a subscriber: Dbrant.May 30 2016, 9:05 PM

A very interesting idea! When tapping on coordinates within the app, I agree that it makes a lot more sense to launch a default geo: intent that will trigger the Android activity chooser to allow the user to pick the maps app that will handle the intent.

Dbrant triaged this task as Medium priority.May 30 2016, 9:06 PM
Klaus3b added a subscriber: Klaus3b.

this ticket is about sending a geo-intent. The opposite, receiving a geo-intent is also interesting (https://phabricator.wikimedia.org/T139329)

Does a standard definition of a "geo-intent" or "geo intent" exist? Do you just mean a geo URI?

Klaus3b added a comment.EditedMar 29 2017, 3:05 PM

Standard geo- intent means an android intent with ACTION_VIEW or ACTION_SEND and data in geo-uri format.

android java code looks like this

double lat = 52.1;
double lon = 9.2;
String geoUri = String.format(Locale.ENGLISH, "geo:%f,%f", lat, lon);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(geoUri));
startActivity(intent);

For details see https://github.com/k3b/k3b-geoHelper/wiki/Android-Geo-howto In this ticket wikipeedia is the GEOClientActivity.

MaxSem moved this task from Backlog to Tracking on the GeoData board.Mar 30 2017, 4:43 PM

It seems that the coordinates link has disappeared from articles altogether (i.e. when the article is read in the app). Why is that? Thanks!

@Bjohas1: General questions unrelated to a specific task can be asked on the mailing list at https://lists.wikimedia.org/mailman/listinfo/mobile-l

Standard geo- intent means an android intent with ACTION_VIEW or ACTION_SEND and data in geo-uri format.

Sounds like a "yes" to me. Providing geo URIs makes sense to me. It might however easier to rewrite the geohack URLs to geo URIs in mobile rather than the opposite.

Would be amazing if somebody could look into adding a geo intent...

Nemo_bis renamed this task from geo intent instead of https://tools.wmflabs.org/geohack/geohack.php to Allow geo intents: link geo URIs instead of https://tools.wmflabs.org/geohack/geohack.php.Nov 18 2017, 11:59 AM

Hopefully the task summary is clearer now.

Restricted Application added a project: Discovery-Search. · View Herald TranscriptJul 31 2018, 4:38 PM
debt added a subscriber: debt.

This is for the extension geodata, not the geodata project (or Discovery Search). Adding Maps tag back in for future prioritization.