1

I've started to get complaints from my users about maps instance, launched from my app, resulting in "no results found". I noticed that after the last update of maps ( I dont keep up to date in maps versin), if i try to launch using the intent geo:latitude,longitude?q=latitude,longitude(label), though it will center the map correctly, it will display result not found for most of south america and a few countries on Europe. The strangest thing is that the map activity shows that it is searching for "latitude, longitude". If i manually change the search string to "latitude,longitude" (blank removed) it will find the location. Where should i report this ? The blank is inserted by the intent itself.

If you want to test it, open google maps , and search for example "-23.612, -46.882" and after that search "-23.612,-46.882" and it will work.

Jose
  • 121
  • 4
  • 8

2 Answers2

3

It looks like, despite being documented here, you can't rely on the (label). I initially got a report from our QA team that was testing on Google Maps 6.12.0. After some testing and research I found a lot of reports about problems, including the following:

Community
  • 1
  • 1
theblang
  • 10,215
  • 9
  • 69
  • 120
0

You can workaround it adding quotes around the location.

Something like this:

Uri uri = Uri.parse("geo:0,0?q=\""+latitude+","+longitude+"\"");
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
intent.setPackage("com.google.android.apps.maps");
startActivity(intent);

But you lost the capability of setting a tag label. Tell me if you found a way to add it too.

Delaled
  • 9
  • 3