Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intent for Google Maps 7.0.0 with location

At first I know that there are several similar questions on StackOverflow. Curriently I use the geo scheme for addressing points which can be handled by other apps.

Like in the example of the Android documentation (by the way it seems to be outdated the RFC it out!) I tried to use something like this:

geo:50.95144,6.98725?q=50.95144,6.98725%20(Disneyland)

So I get a intent chooser where I can select an App which showed me in case of Google Maps Disneyland with a marker on it. Now it seems that an update was installed which removes that support. I just get the message that this place cannot been found.

I tried to understand the RFC 5870 which defines the 'geo' URI Scheme. I don't get it exactly. It is correct that it is not possible at all to define a lable?

How can I link now a position to Google Maps?

like image 507
rekire Avatar asked Jul 11 '13 09:07

rekire


1 Answers

The WhatsApp intent is:

START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=https://maps.google.com/maps?q=loc:lat,lng+(You)&rlz=1Y1TXLS_enDE543DE543 flg=0x3000000 cmp=com.android.browser/.BrowserActivity (has extras)} from pid 2115

So if you use the following intent URI:

String geoUri = "http://maps.google.com/maps?q=loc:" + lat + "," + lng + " (" + mTitle + ")";

...it should behave like WhatsApp. Furthermore it seems that some other geo apps trigger on this intent too. But it doesn't work for all geo apps!

like image 171
cradle Avatar answered Sep 21 '22 03:09

cradle