I'm trying to recover a Geocode Service request using jQuery with this
very simple script:

<script type="text/javascript">
$(document).ready(function() {
$.getJSON("http://maps.google.com/maps/api/geocode/json?
address=1600+Amphitheatre+Parkway&sensor=false", parse_data);
});

function parse_data(data)
{
alert(data);
}
</script>

However, it is not working because of an access denied error. I
realize this is related to the cross domain security restriction noted
in this post:
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/45dafd059c3b82f/ac3ad57d6e45a04f?lnk=gst&q=json#ac3ad57d6e45a04f

This post further goes on to prescribe using the google.maps.Geocoder
object, but I could not determine how that works with using the
Geocode Service. I have used the google.maps.Geocoder object to
geocode single addresses, but I've been giving the impression that
with version 3 of the API the Geocode Service is the preferred
approach.

Can jQuery.getJSON be used to access the Service? I know there is a
piece or two of information I'm missing, and I'd be greatful for some
clarification.

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to