support parsing all Google Maps URLs

This adds support for hosts like:
* www.google.com.tr
* www.google.co.uk

and many more...
This commit is contained in:
Hans-Christoph Steiner 2015-03-31 22:29:48 -04:00
parent b8b7e02798
commit dac0cf725b

View file

@ -861,7 +861,7 @@ public class GeoPointParserUtil {
return new GeoParsedPoint(matcher.group(1), matcher.group(2), z, params.get("text"));
}
}
} else if (host.matches("(?:www\\.)?(?:maps\\.)?google\\.[a-z]+")) {
} else if (host.matches("(?:www\\.)?(?:maps\\.)?google\\.[a-z.]+")) {
Map<String, String> params = getQueryParameters(uri);
if(params.containsKey("daddr")){
return parseGoogleMapsPath(params.get("daddr"), params);