Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7dfac515ba
1 changed files with 5 additions and 1 deletions
|
@ -201,11 +201,15 @@ public class GeoIntentActivity extends OsmandListActivity {
|
||||||
*/
|
*/
|
||||||
private MyService extract(Uri data) {
|
private MyService extract(Uri data) {
|
||||||
if ("http".equalsIgnoreCase(data.getScheme()) && "maps.google.com".equals(data.getHost())) {
|
if ("http".equalsIgnoreCase(data.getScheme()) && "maps.google.com".equals(data.getHost())) {
|
||||||
String q = data.getQueryParameter("q");
|
String q = data.getQueryParameter("q").split(" ")[0];
|
||||||
if (q.indexOf(',') != -1) {
|
if (q.indexOf(',') != -1) {
|
||||||
int i = q.indexOf(',');
|
int i = q.indexOf(',');
|
||||||
String lat = q.substring(0, i);
|
String lat = q.substring(0, i);
|
||||||
String lon = q.substring(i + 1);
|
String lon = q.substring(i + 1);
|
||||||
|
if (lat.indexOf(":") != -1) {
|
||||||
|
i = lat.indexOf(":");
|
||||||
|
lat = lat.substring(i + 1);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
double llat = Double.parseDouble(lat.trim());
|
double llat = Double.parseDouble(lat.trim());
|
||||||
double llon = Double.parseDouble(lon.trim());
|
double llon = Double.parseDouble(lon.trim());
|
||||||
|
|
Loading…
Reference in a new issue