I am trying to get the timezone for a location using latitude and longitude(as requested in the api). It is working with FF and chrome but it is throwing an error in IE(7,8,9)
var url = "https://maps.googleapis.com/maps/api/timezone/json?location=43.653226,-79.38318429999998×tamp=1331161200&sensor=true";
alert(url);
$.ajax({
type: "GET",
url: url,
cache:false,
success: function(results){
alert(results);
},
error:function(xhr, ajaxOptions, thrownError)
{
alert(thrownError);
},
fail: function(){
alert('ajax fail');
}
});
Error shows “No Transport”
Any suggestion is appreciated.
Thank you
The XDR-object of InternetExplorer currently is not supported by jQuery, you’ll need a plugin like jquery.xdomain.js
But there is another issue: the timezone-API requires the HTTPS-protocoll , when the document that requests the API doesn’t use HTTPS, it will still fail in IE.
But you may use a serverside proxy-script that fetches the result from the timezone-API and delivers it to jQuery