mardi 19 mai 2015

Location uri negative latitude Google maps android

I'm trying to start an intent for displaying a map in android,

The intent is created as described here:

 String uri = String.format(Locale.ENGLISH, "geo:0,0?q=%f,%f(%s)", latitude, longitude,name);
    Uri parse = Uri.parse(uri);
    Intent intent = new Intent(Intent.ACTION_VIEW, parse);
    if(intent.resolveActivity(context.getPackageManager())!=null){
        context.startActivity(intent);
    }

When i set my URI to a positive latitude everything works ok, but when i select a location with negative longitude, i get a toast saying "No results for ......" and no marker.

Any workaround on this?(Maybe representing the URI as XX°XX'XX"S) I guess i'm not the only one having this problem, any help would be appreciated

Aucun commentaire:

Enregistrer un commentaire