Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps 7 started with geo intent is dropping a pin at the closest address to a coordinate instead of the exact location
    primarykey
    data
    text
    <p>In my app users can save the latitude and longitude of a particular location. I want them to able to launch other apps on their phone via a <a href="http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00#section-4.3" rel="nofollow">geo intent</a> such as Google Maps so that they can easily get exact directions back to it. Here is the code I am using to generate the geo intent:</p> <pre><code>public static Intent getFindIntent(Context context) { Intent intent = new Intent(); SharedPreferences prefs = Tools.getPrefs(context); String latitude = prefs.getString(Const.LAT_KEY, ""); String longitude = prefs.getString(Const.LONG_KEY, ""); intent.setAction(Intent.ACTION_VIEW); String uri = String.format(Locale.US, "geo:%s,%s?z=%d&amp;q=%s,%s", latitude, longitude, Const.ZOOM_LEVEL, latitude, longitude); intent.setData(Uri.parse(uri)); return intent; } </code></pre> <p>Obviously most people will use Google Maps since it's on everyone's phone. When I first released my application Google Maps would start and drop a pin at the exact coordinates specified in the q parameter of the geo uri that is set as data for the intent. With the release of Google Maps 7, maps seems to drop a pin at the closest <em>address</em> to the provided coordinates. This poses a problem to me since users should be able to navigate back to the saved position exactly, and not an address near it. The only place I have found this documented is <a href="http://developer.android.com/guide/appendix/g-app-intents.html" rel="nofollow">here</a>. The docs are from the official Android Developer site but they are very sparse. Are there alternatives to the geo intent to provide this functionality or is there something wrong with my code? I think Google Maps is breaking it's API contract since I am providing coordinates and not an address. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload