From 3e541c3acd6821236c13762a44f369acd825cfee Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Thu, 1 Aug 2013 00:37:56 +0200 Subject: [PATCH] add zoom to gmaps url --- .../com/cradle/iitc_mobile/share/ShareActivity.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java b/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java index a1ea1cab..2fb34366 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java +++ b/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java @@ -75,11 +75,13 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList ArrayList intents = new ArrayList(); DecimalFormatSymbols decFormat = new DecimalFormatSymbols(); // thx to gmaps, this only works for the decimal point separator - if (decFormat.getDecimalSeparator() == '.') { - String gMapsUri = "http://maps.google.com/maps?q=loc:" + mLl + "%20(" + mTitle + ")"; - Intent gMapsIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(gMapsUri)); - intents.add(gMapsIntent); - } + String gMapsUri; + if (decFormat.getDecimalSeparator() == '.') + gMapsUri = "http://maps.google.com/maps?q=loc:" + mLl + "%20(" + mTitle + ")&z=" + mZoom; + 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; Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri)); intents.add(geoIntent);