]> git.openstreetmap.org Git - rails.git/commitdiff
Make overpass server URL configurable
authorTom Hughes <tom@compton.nu>
Thu, 13 Mar 2014 19:28:45 +0000 (19:28 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 16 Mar 2014 16:18:13 +0000 (16:18 +0000)
app/assets/javascripts/index/query.js
app/assets/javascripts/osm.js.erb
config/example.application.yml

index 1a91c202ce9f0ccfc722d8ac05510fc901e95684..bc4c26771913e6f4fbb855fc3b7064400b0f0482 100644 (file)
@@ -177,7 +177,7 @@ OSM.Query = function(map) {
     });
 
     $.ajax({
-      url: "http://overpass-api.de/api/interpreter",
+      url: OSM.OVERPASS_URL,
       method: "POST",
       data: {
         data: "[timeout:5][out:json];" + query,
index 719c6b83266433a6e461f5eb1afb8d6d5d0a5c76..15c1682d5f0e14e925a8c5a4496da16ff577dc02 100644 (file)
@@ -8,6 +8,7 @@ OSM = {
   API_VERSION:           <%= API_VERSION.to_json %>,
   STATUS:                <%= STATUS.to_json %>,
   MAX_NOTE_REQUEST_AREA: <%= MAX_NOTE_REQUEST_AREA.to_json %>,
+  OVERPASS_URL:          <%= OVERPASS_URL.to_json %>,
 
   apiUrl: function (object) {
     var url = "/api/" + OSM.API_VERSION + "/" + object.type + "/" + object.id;
index d6a855ef5003b68fb343298bac7b60fd2a1faa73..702d411bac5e5371e934391e76118ffa8ac84b9b 100644 (file)
@@ -84,6 +84,8 @@ defaults: &defaults
   require_terms_seen: false
   # Whether to require users to agree to the CTs before editing
   require_terms_agreed: false
+  # URL of Overpass instance to use for feature queries
+  overpass_url: http://overpass-api.de/api/interpreter
 
 development:
   <<: *defaults