Fix reprojection-by-code example in IE9 by using JSONP
This commit is contained in:
@@ -65,7 +65,10 @@ function setProjection(code, name, proj4def, bbox) {
|
|||||||
|
|
||||||
function search(query) {
|
function search(query) {
|
||||||
resultSpan.innerHTML = 'Searching...';
|
resultSpan.innerHTML = 'Searching...';
|
||||||
$.ajax('http://epsg.io/?format=json&q=' + query).then(function(response) {
|
$.ajax({
|
||||||
|
url: 'http://epsg.io/?format=json&q=' + query,
|
||||||
|
dataType: 'jsonp',
|
||||||
|
success: function(response) {
|
||||||
if (response) {
|
if (response) {
|
||||||
var results = response['results'];
|
var results = response['results'];
|
||||||
if (results && results.length > 0) {
|
if (results && results.length > 0) {
|
||||||
@@ -84,6 +87,7 @@ function search(query) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setProjection(null, null, null, null);
|
setProjection(null, null, null, null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user