public class Geocoder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HTTP_GEOHASH_ORG
The Constant HTTP_GEOHASH_ORG.
|
static String |
HTTP_MAPS_GOOGLE_COM_MAPS_API_GEOCODE_JSON
The Constant HTTP_MAPS_GOOGLE_COM_MAPS_API_GEOCODE_JSON.
|
static String |
HTTP_MAPS_GOOGLE_COM_MAPS_API_GEOCODE_XML
The Constant HTTP_MAPS_GOOGLE_COM_MAPS_API_GEOCODE_XML.
|
| Constructor and Description |
|---|
Geocoder() |
| Modifier and Type | Method and Description |
|---|---|
static de.alpharogroup.jgeohash.GeoHashPoint |
getGeocodingData(String xmldata)
Gets the geo code data from the given String that represents an xml string that is returned
from the google geo code service.
|
static de.alpharogroup.jgeohash.GeoHashPoint |
getGeocodingData(de.alpharogroup.address.book.entities.Zipcodes address)
Gets the geo code data from the given Zipcodes Object.
|
static String |
getGeolocationAsXml(String address)
Gets the geolocation as xml.
|
static String |
getGoogleXmlResponse(String params)
Gets the google xml response.
|
static String |
getJsonResponse(String params)
Gets the json response.
|
static String |
getPlainTextResponse(String geohash)
Gets the plain text response.
|
static String |
getUrlParameters(Map<String,String> parameters)
Gets the url parameters.
|
static String |
getUrlParams(String address,
boolean sensor)
Gets the url params.
|
static void |
setGeocodingData(de.alpharogroup.address.book.entities.Addresses address)
Sets the geocoding data.
|
public static final String HTTP_MAPS_GOOGLE_COM_MAPS_API_GEOCODE_JSON
public static final String HTTP_MAPS_GOOGLE_COM_MAPS_API_GEOCODE_XML
public static final String HTTP_GEOHASH_ORG
public static de.alpharogroup.jgeohash.GeoHashPoint getGeocodingData(String xmldata) throws ParserConfigurationException, SAXException, IOException
xmldata - the xmldataIOException - Signals that an I/O exception has occurred.SAXException - Signals that an SAX error or warning has occurred.ParserConfigurationException - Indicates a serious configuration error.public static de.alpharogroup.jgeohash.GeoHashPoint getGeocodingData(de.alpharogroup.address.book.entities.Zipcodes address)
throws MalformedURLException,
IOException,
ParserConfigurationException,
SAXException
address - the addressMalformedURLException - the malformed url exceptionIOException - Signals that an I/O exception has occurred.SAXException - Signals that an SAX error or warning has occurred.ParserConfigurationException - Indicates a serious configuration error.public static String getGeolocationAsXml(String address) throws MalformedURLException, IOException
address - the addressMalformedURLException - the malformed url exceptionIOException - Signals that an I/O exception has occurred.public static String getGoogleXmlResponse(String params) throws MalformedURLException, IOException
params - the paramsMalformedURLException - the malformed url exceptionIOException - Signals that an I/O exception has occurred.public static String getJsonResponse(String params) throws MalformedURLException, IOException
params - the paramsMalformedURLException - the malformed url exceptionIOException - Signals that an I/O exception has occurred.public static String getPlainTextResponse(String geohash) throws MalformedURLException, IOException
geohash - the paramsMalformedURLException - the malformed url exceptionIOException - Signals that an I/O exception has occurred.public static String getUrlParameters(Map<String,String> parameters) throws UnsupportedEncodingException
parameters - the parametersUnsupportedEncodingException - the unsupported encoding exceptionpublic static String getUrlParams(String address, boolean sensor) throws UnsupportedEncodingException
address - the addresssensor - the sensorUnsupportedEncodingException - the unsupported encoding exceptionpublic static void setGeocodingData(de.alpharogroup.address.book.entities.Addresses address)
throws MalformedURLException,
IOException,
ParserConfigurationException,
SAXException
address - the new geocoding dataMalformedURLException - the malformed url exceptionIOException - Signals that an I/O exception has occurred.SAXException - Signals that an SAX error or warning has occurred.ParserConfigurationException - Indicates a serious configuration error.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.