Make overpass server URL configurable

This commit is contained in:
Tom Hughes 2014-03-13 19:28:45 +00:00
parent 913da4a8db
commit 5f970fe334
3 changed files with 4 additions and 1 deletions

View file

@ -177,7 +177,7 @@ OSM.Query = function(map) {
}); });
$.ajax({ $.ajax({
url: "http://overpass-api.de/api/interpreter", url: OSM.OVERPASS_URL,
method: "POST", method: "POST",
data: { data: {
data: "[timeout:5][out:json];" + query, data: "[timeout:5][out:json];" + query,

View file

@ -8,6 +8,7 @@ OSM = {
API_VERSION: <%= API_VERSION.to_json %>, API_VERSION: <%= API_VERSION.to_json %>,
STATUS: <%= STATUS.to_json %>, STATUS: <%= STATUS.to_json %>,
MAX_NOTE_REQUEST_AREA: <%= MAX_NOTE_REQUEST_AREA.to_json %>, MAX_NOTE_REQUEST_AREA: <%= MAX_NOTE_REQUEST_AREA.to_json %>,
OVERPASS_URL: <%= OVERPASS_URL.to_json %>,
apiUrl: function (object) { apiUrl: function (object) {
var url = "/api/" + OSM.API_VERSION + "/" + object.type + "/" + object.id; var url = "/api/" + OSM.API_VERSION + "/" + object.type + "/" + object.id;

View file

@ -84,6 +84,8 @@ defaults: &defaults
require_terms_seen: false require_terms_seen: false
# Whether to require users to agree to the CTs before editing # Whether to require users to agree to the CTs before editing
require_terms_agreed: false require_terms_agreed: false
# URL of Overpass instance to use for feature queries
overpass_url: http://overpass-api.de/api/interpreter
development: development:
<<: *defaults <<: *defaults