I am trying to get latitude and longitude with only zip codes. I encountered
following issue and created a temporary fix for it.
What steps will reproduce the problem?
1. In geocoder request don't pass address or location
2. Set Postal code component and language only
2.1 Java code throws exception with this code
GeocoderRequest geocoderRequest = new
GeocoderRequestBuilder().addComponent(GeocoderComponent.POSTAL_CODE,
'31421').setLanguage("en").getGeocoderRequest();
Exception is: "Address or location must be defined"
2.2 Whereas google api allows it
https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:31421
What is the expected output? What do you see instead?
APi request should be parsed as valid request and google api should be called.
I got exception "Address or location must be defined"
What version of the product are you using? On what operating system?
0.16
Please provide any additional information below.
I have override the Geocoder.getURLQuery method, not to throw exception when
address or location both are not present. It should ideally check if not even
one address component is there then exception should occur
Original issue reported on code.google.com by sandeep....@gmail.com on 6 Jul 2014 at 12:25
Original issue reported on code.google.com by
sandeep....@gmail.com
on 6 Jul 2014 at 12:25