use simple geo intent for system languages with arabic decimal comma
since gmaps can't cope with it
This commit is contained in:
@ -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
|
||||
|
@ -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<Intent> intents = new ArrayList<Intent>();
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user