Hello,
For vaadin7.1.10 version Is there any Geocoder addon supports which convert location into lat ,lon or any other solution to get it done?
You could just use the Google maps Geocoder Java API
https://code.google.com/p/geocoder-java/
Thanks, John Ahlroos.
hi, I am trying to get lat,lon by location name using Geocoder as given below.
public void GetLocation(String address) {
final Geocoder geocoder = new Geocoder();
GeocoderRequest geocoderRequest = new GeocoderRequestBuilder().setAddress(address).getGeocoderRequest();
GeocodeResponse geocoderResponse = geocoder.geocode(geocoderRequest);
List results = geocoderResponse.getResults();
float latitude = results.get(0).getGeometry().getLocation().getLat().floatValue();
float longitude = results.get(0).getGeometry().getLocation().getLng().floatValue();
}
But i am getting “geocoderResponse” value as NULL and below Error -
09:55:02,550 INFO [STDOUT]
09:55:02,547 ERROR [Geocoder]
Connection timed out:
connect
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI
mpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
va:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
Impl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:996)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:932)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:850)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1300)
at java.net.URL.openStream(URL.java:1037)
at com.google.code.geocoder.Geocoder.request(Geocoder.java:69)
at com.google.code.geocoder.Geocoder.geocode(Geocoder.java:60)
Fix the java.net.ConnectException: Connection timed out: connect Problem.
set
System.setProperty(“http.proxyHost”, “ProxyHostName”);
System.setProperty(“http.proxyPort”, “ProxyPortNumber”);
Hi,
I want to create a Circular Geofence around a Region on googleMap for Vaadin7 ?
Please help!!
Thanks In advance!!