Parsing for WhatsApp fixed #1550
This commit is contained in:
parent
3b2352f18b
commit
e18c365c62
1 changed files with 1 additions and 15 deletions
|
@ -358,12 +358,6 @@ public class GeoPointParserUtil {
|
|||
System.out.println("url: " + url);
|
||||
actual = GeoPointParserUtil.parse(url);
|
||||
assertGeoPoint(actual, new GeoParsedPoint(dlat, dlon, z));
|
||||
|
||||
// http://www.google.com/maps/?q=loc:34.99393,-106.61568&z=11 (Treasure Island)
|
||||
// url = "http://www.google.com/maps/?q=loc:" + dlat + "," + dlon + " (" + name +") ";
|
||||
// System.out.println("url: " + url);
|
||||
// actual = GeoPointParserUtil.parse(url);
|
||||
// assertGeoPoint(actual, new GeoParsedPoint(dlat, dlon, name));
|
||||
|
||||
// https://www.google.com/maps/preview#!q=paris&data=!4m15!2m14!1m13!1s0x47e66e1f06e2b70f%3A0x40b82c3688c9460!3m8!1m3!1d24383582!2d-95.677068!3d37.0625!3m2!1i1222!2i718!4f13.1!4m2!3d48.856614!4d2.3522219
|
||||
url = "https://www.google.com/maps/preview#!q=paris&data=!4m15!2m14!1m13!1s0x47e66e1f06e2b70f%3A0x40b82c3688c9460!3m8!1m3!1d24383582!2d-95.677068!3d37.0625!3m2!1i1222!2i718!4f13.1!4m2!3d48.856614!4d2.3522219";
|
||||
|
@ -419,14 +413,6 @@ public class GeoPointParserUtil {
|
|||
actual = GeoPointParserUtil.parse(url);
|
||||
assertGeoPoint(actual, new GeoParsedPoint(dlat, dlon, z));
|
||||
|
||||
// whatsapp
|
||||
// https://maps.google.com/maps?q=loc:34.99393,-106.61568 (LG Brainz)
|
||||
z = GeoParsedPoint.NO_ZOOM;
|
||||
url = "https://maps.google.com/maps?q=loc:" + dlon + "," + dlon + " (LG Brainz)";
|
||||
System.out.println("url: " + url);
|
||||
actual = GeoPointParserUtil.parse(url);
|
||||
assertGeoPoint(actual, new GeoParsedPoint(dlon + 1, dlon, z));
|
||||
|
||||
// http://www.google.com/maps/search/food/34,-106,14z
|
||||
url = "http://www.google.com/maps/search/food/" + ilat + "," + ilon + "," + z + "z";
|
||||
System.out.println("url: " + url);
|
||||
|
@ -968,7 +954,7 @@ public class GeoPointParserUtil {
|
|||
if(opath.contains(pref)) {
|
||||
opath = opath.substring(opath.lastIndexOf(pref) + pref.length());
|
||||
}
|
||||
final String postf = "\\s\\((\\p{IsAlphabetic}|\\s)*\\)$";
|
||||
final String postf = "\\s\\((\\p{L}|\\s)*\\)$";
|
||||
opath = opath.replaceAll(postf, "");
|
||||
System.out.println("opath=" + opath);
|
||||
return parseGoogleMapsPath(opath, params);
|
||||
|
|
Loading…
Reference in a new issue