Update GeoPointParserUtil.java
This commit is contained in:
parent
1313f6d81f
commit
8514e8a2ce
1 changed files with 5 additions and 11 deletions
|
@ -956,20 +956,14 @@ public class GeoPointParserUtil {
|
||||||
} else if (queryMap != null) {
|
} else if (queryMap != null) {
|
||||||
String queryStr = queryMap.get("query");
|
String queryStr = queryMap.get("query");
|
||||||
if (queryStr != null) {
|
if (queryStr != null) {
|
||||||
String[] vls = null;
|
queryStr = queryStr.replace("+", " ").replace("/|,", " ");
|
||||||
if (queryStr.contains(",")) {
|
String[] vls = queryStr.split(" ");
|
||||||
vls = queryStr.split("/|,");
|
|
||||||
} else if (queryStr.contains(" ")) {
|
|
||||||
vls = queryStr.split(" ");
|
|
||||||
}
|
|
||||||
if (vls != null && vls.length == 2) {
|
if (vls != null && vls.length == 2) {
|
||||||
lat = parseSilentDouble(vls[0]);
|
lat = parseSilentDouble(vls[0]);
|
||||||
lon = parseSilentDouble(vls[1]);
|
lon = parseSilentDouble(vls[1]);
|
||||||
if (lat == 0 || lon == 0) {
|
}
|
||||||
return new GeoParsedPoint(queryStr.replace("+", " ").replace("/|,", " "));
|
if (lat == 0 || lon == 0) {
|
||||||
}
|
return new GeoParsedPoint(queryStr);
|
||||||
} else {
|
|
||||||
return new GeoParsedPoint(queryStr.replace("+", " ").replace("/|,", " "));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue