add zoom to gmaps url
This commit is contained in:
parent
e84cfb3a0d
commit
3e541c3acd
@ -75,11 +75,13 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
|
|||||||
ArrayList<Intent> intents = new ArrayList<Intent>();
|
ArrayList<Intent> intents = new ArrayList<Intent>();
|
||||||
DecimalFormatSymbols decFormat = new DecimalFormatSymbols();
|
DecimalFormatSymbols decFormat = new DecimalFormatSymbols();
|
||||||
// thx to gmaps, this only works for the decimal point separator
|
// thx to gmaps, this only works for the decimal point separator
|
||||||
if (decFormat.getDecimalSeparator() == '.') {
|
String gMapsUri;
|
||||||
String gMapsUri = "http://maps.google.com/maps?q=loc:" + mLl + "%20(" + mTitle + ")";
|
if (decFormat.getDecimalSeparator() == '.')
|
||||||
Intent gMapsIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(gMapsUri));
|
gMapsUri = "http://maps.google.com/maps?q=loc:" + mLl + "%20(" + mTitle + ")&z=" + mZoom;
|
||||||
intents.add(gMapsIntent);
|
else
|
||||||
}
|
gMapsUri = "http://maps.google.com/maps?ll=" + mLl + "&z=" + mZoom;
|
||||||
|
Intent gMapsIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(gMapsUri));
|
||||||
|
intents.add(gMapsIntent);
|
||||||
String geoUri = "geo:" + mLl;
|
String geoUri = "geo:" + mLl;
|
||||||
Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri));
|
Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri));
|
||||||
intents.add(geoIntent);
|
intents.add(geoIntent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user