I am trying to use the Geocoder API for java located at: http://code.google.com/p/geocoder-java/
These are the lines of code that I wrote, and it works great when I run it as a GAE web application.
final Geocoder geocoder = new Geocoder(); GeocoderRequest geocoderRequest = new GeocoderRequestBuilder().setAddress(req.getParameter("location").toString()).setLanguage("en").getGeocoderRequest(); GeocodeResponse geocoderResponse = geocoder.geocode(geocoderRequest); List<GeocoderResult> someList = geocoderResponse.getResults(); GeocoderResult data = someList.get(0); GeocoderGeometry data_2 = data.getGeometry(); BigDecimal Latitude = data_2.getLocation().getLat(); BigDecimal Longitude = data_2.getLocation().getLng();
What he does is what I give in the text, for example, a new York, and he discovers the longitude and latitude of this area.
However, when I put the same lines of code in GAE, sometimes when I run this code, I get a validation constraint exception located in " GeocoderResult data = someList.get(0) ";
Sometimes I donβt get an error and correctly displays the coordinates on a web page. So, I'm a bit confused, on the website, does it show that it supports GAE, or is there something wrong with the geocoder provided by Google itself, has some problems?
This usually does not work in the afternoon or at midnight Eastern time.
source share