* the Earth as well as an optional altitude above the surface. See
* <a href="http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00">
* http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00</a>.
* the Earth as well as an optional altitude above the surface. See
* <a href="http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00">
* http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00</a>.
}
// Drop geo, query portion
int queryStart = rawText.indexOf('?', 4);
}
// Drop geo, query portion
int queryStart = rawText.indexOf('?', 4);
geoURIWithoutQuery = rawText.substring(4, queryStart);
}
int latitudeEnd = geoURIWithoutQuery.indexOf(',');
geoURIWithoutQuery = rawText.substring(4, queryStart);
}
int latitudeEnd = geoURIWithoutQuery.indexOf(',');
double latitude, longitude, altitude;
try {
latitude = Double.parseDouble(geoURIWithoutQuery.substring(0, latitudeEnd));
double latitude, longitude, altitude;
try {
latitude = Double.parseDouble(geoURIWithoutQuery.substring(0, latitudeEnd));
longitude = Double.parseDouble(geoURIWithoutQuery.substring(latitudeEnd + 1, longitudeEnd));
altitude = Double.parseDouble(geoURIWithoutQuery.substring(longitudeEnd + 1));
}
longitude = Double.parseDouble(geoURIWithoutQuery.substring(latitudeEnd + 1, longitudeEnd));
altitude = Double.parseDouble(geoURIWithoutQuery.substring(longitudeEnd + 1));
}
- return new GeoParsedResult(rawText, latitude, longitude, altitude);
+ return new GeoParsedResult(latitude, longitude, altitude, query);