]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/osrm.js
Add CORS for engines that support it
[rails.git] / app / assets / javascripts / routing_engines / osrm.js
index 4122a0b4d73ecf52fbad0b1d1e4e2264a7796c54..fde871019917d671f699eb154619412dd74f191b 100644 (file)
@@ -24,7 +24,7 @@ OSRMEngine.prototype.createConfig = function() {
                                if (this._hints[pair]) url+= "&hint="+this._hints[pair];
                        }
                        if (isFinal) url+="&instructions=true";
-                       this.requestJSONP(url+"&jsonp=");
+                       this.requestCORS(url);
                },
                gotRoute: function(router,data) {
                        if (data.status==207) {