diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index 08968b1f51..f38e6096ec 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -312,8 +312,15 @@ public class GeoIntentActivity extends OsmandListActivity { //geo:47.6,-122.3?z=11 //allow for http://tools.ietf.org/html/rfc5870 (geo uri) , just ignore everything after ';' final String pattern = "([\\-0-9.]+),([\\-0-9.]+)(?:,([\\-0-9.]+))?(?:\\?z=([0-9]+))?(?:;.*)?"; + int indexQ = schemeSpecific.indexOf("&q"); + final Matcher matcher; + if (indexQ != -1){ + final String schemeQ = schemeSpecific.substring(0,indexQ); + matcher = Pattern.compile(pattern).matcher(schemeQ); + } else { + matcher = Pattern.compile(pattern).matcher(schemeSpecific); + } - final Matcher matcher = Pattern.compile(pattern).matcher(schemeSpecific); if (matcher.matches()) { final double lat = Double.valueOf(matcher.group(1));