org.wicketstuff.gmap.geocoder
Class Geocoder

java.lang.Object
  extended by org.wicketstuff.gmap.geocoder.Geocoder
All Implemented Interfaces:
Serializable

public class Geocoder
extends Object
implements Serializable

Geocoder. See: https://developers.google.com/maps/documentation/geocoding/

Author:
Thijs Vonk, Dieter Tremel
See Also:
Serialized Form

Field Summary
static String OUTPUT_JSON
           
static String OUTPUT_XML
           
 
Constructor Summary
Geocoder()
           
 
Method Summary
 GLatLng decode(String response)
           
 String encode(String address)
          builds the google geo-coding url
 GLatLng geocode(String address)
           
protected  InputStream invokeService(String address)
          fetches the url content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_XML

public static final String OUTPUT_XML
See Also:
Constant Field Values

OUTPUT_JSON

public static final String OUTPUT_JSON
See Also:
Constant Field Values
Constructor Detail

Geocoder

public Geocoder()
Method Detail

decode

public GLatLng decode(String response)
               throws GeocoderException,
                      org.apache.wicket.ajax.json.JSONException
Throws:
GeocoderException
org.apache.wicket.ajax.json.JSONException

encode

public String encode(String address)
builds the google geo-coding url

Parameters:
address -
Returns:

geocode

public GLatLng geocode(String address)
                throws Exception
Parameters:
address -
Returns:
Throws:
IOException
Exception

invokeService

protected InputStream invokeService(String address)
                             throws IOException
fetches the url content

Parameters:
address -
Returns:
Throws:
IOException


Copyright © 2014. All rights reserved.