Reputation: 134
There is wierd situation ... everything was working and suddenly googlemaps api stopped working
$('input#find_location_button').on('click', function () {
.... some script to get value of input field and store it in data_to_send....
data_to_send['sensor'] = 'false';
// alert(JSON.stringify(data_to_send)); this alert shows everything is fine
$.ajax({
url: 'http://maps.googleapis.com/maps/api/geocode/json',
dataType: 'json',
data: data_to_send,
type: 'GET',
success: function (data)
{ alert(data); // nothing ...
.... proper closing tags ...
I have no idea why this ajax request suddenly stopped working ... in firbug console it shows nothing ... no request posted ... any ideas?
Upvotes: 0
Views: 260
Reputation: 161374
Perhaps this issue missing CORS HTTP Header explains why it stopped working.
Google Geocoding Web Service is not including Access-Control-Allow-Origin:* in HTTP header responses, so service cannot be cross-domain accesed from javascript. Until last week Friday, that header was included.
Start that issue if that is the problem.
Upvotes: 1