diff --git a/mobile/plugins/user-location.user.js b/mobile/plugins/user-location.user.js index ee279269..4dbd30ba 100644 --- a/mobile/plugins/user-location.user.js +++ b/mobile/plugins/user-location.user.js @@ -39,13 +39,6 @@ window.plugin.userLocation.setup = function() { icon: new plugin.userLocation.icon() }); - // copy location to android clipboard on marker click - marker.on('click', function(e) { - window.console.log('marker location'); - var ll = e.target.getLatLng(); - window.androidCopy('https://maps.google.com/?q=loc:'+ll.lat+','+ll.lng+'%20('+PLAYER.nickname+')'); - }); - plugin.userLocation.marker = marker; marker.addTo(window.map); // jQueryUI doesn’t automatically notice the new markers diff --git a/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java b/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java index f3aefeb7..a1ea1cab 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java +++ b/mobile/src/com/cradle/iitc_mobile/share/ShareActivity.java @@ -14,6 +14,7 @@ import android.view.MenuItem; import com.cradle.iitc_mobile.R; +import java.text.DecimalFormatSymbols; import java.util.ArrayList; public class ShareActivity extends FragmentActivity implements ActionBar.TabListener { @@ -72,11 +73,15 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList // we merge gmaps intents with geo intents since it is not possible // anymore to set a labeled marker on geo intents ArrayList intents = new ArrayList(); - String gMapsUri = "http://maps.google.com/maps?q=loc:" + mLl + "%20(" + mTitle + ")"; - Intent gMapsIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(gMapsUri)); + 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 geoUri = "geo:" + mLl; Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri)); - intents.add(gMapsIntent); intents.add(geoIntent); addTab(intents, R.string.tab_map, R.drawable.location_map);