Hai,

Im trying to geocode using HttpUrlConnection.
The url im using is
"http://www.google.com/url?sa=D&q=http://maps.google.com/maps/api/
geocode/json%3Flatlng%3D-33.873038,151.20563%26sensor
%3Dfalse&usg=AFQjCNE3BWgqF9HXBkymHk2_qVkBbiB-pA"

String encodedUrl = URLEncoder.encode(url,"UTF-8");
serverAddress = new URL(encodedUrl);

on the broweser im getting the location but when im trying the same
from java code im getting the below exception

java.net.MalformedURLException: no protocol: http%3A%5C%2F%5C
%2Fwww.google.com%5C%2Furl%3Fsa%3DD%26q%3Dhttp%3A%5C%2F%5C
%2Fmaps.google.com%5C%2Fmaps%5C%2Fapi%5C%2Fgeocode%5C%2Fjson%253Flatlng
%253D-33.873038%2C151.20563%2526sensor%253Dfalse%26usg
%3DAFQjCNE3BWgqF9HXBkymHk2_qVkBbiB-pA
        at java.net.URL.<init>(URL.java:567)

plz help.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to