Find latitude and longitude with Google Maps IE9

For IE9 find latitude and longitude using XDomainRequest

var isIE = (window.navigator.userAgent.indexOf('MSIE') > 0 || window.navigator.userAgent.indexOf('rv') > 0);
var isIE9 = parseInt($.browser.version, 10) == 9 ? true : false;
if (isIE && isIE9) {
    var xdr = new XDomainRequest();
    var query = 'http://maps.google.com/maps/api/geocode/json?address=1600 Amphitheatre Parkway, Mountain View, CA&sensor=false&language=en';
    if (xdr) {
        xdr.onload = function () {
            $('pre').html(xdr.responseText);
        }
        xdr.onerror = function () { /* error handling here */
        }
        xdr.open('GET', query);
        xdr.send();
    }

}
Find latitude and longitude with Google Maps IE9 Find latitude and longitude with Google Maps IE9 Reviewed by Bhaumik Patel on 8:16 AM Rating: 5