Avoid mixed content warnings when routing queries Nominatim
This commit is contained in:
parent
250bb47cc2
commit
098f8e98f2
2 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ OSM.Directions = function (map) {
|
|||
|
||||
endpoint.awaitingGeocode = true;
|
||||
|
||||
$.getJSON('<%= NOMINATIM_URL %>search?q=' + encodeURIComponent(endpoint.value) + '&format=json', function (json) {
|
||||
$.getJSON(document.location.protocol + '<%= NOMINATIM_URL %>search?q=' + encodeURIComponent(endpoint.value) + '&format=json', function (json) {
|
||||
endpoint.awaitingGeocode = false;
|
||||
endpoint.hasGeocode = true;
|
||||
if (json.length == 0) {
|
||||
|
|
|
@ -145,7 +145,7 @@ class GeocoderController < ApplicationController
|
|||
end
|
||||
|
||||
# ask nominatim
|
||||
response = fetch_xml("#{NOMINATIM_URL}search?format=xml&q=#{escape_query(query)}#{viewbox}#{exclude}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}")
|
||||
response = fetch_xml("http:#{NOMINATIM_URL}search?format=xml&q=#{escape_query(query)}#{viewbox}#{exclude}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}")
|
||||
|
||||
# extract the results from the response
|
||||
results = response.elements["searchresults"]
|
||||
|
@ -236,7 +236,7 @@ class GeocoderController < ApplicationController
|
|||
@results = Array.new
|
||||
|
||||
# ask nominatim
|
||||
response = fetch_xml("#{NOMINATIM_URL}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}")
|
||||
response = fetch_xml("http:#{NOMINATIM_URL}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}")
|
||||
|
||||
# parse the response
|
||||
response.elements.each("reversegeocode/result") do |result|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue