From 24d2ac0ec2738c579b3edb36ae1b70943703b974 Mon Sep 17 00:00:00 2001 From: Erwan Guyader Date: Mon, 26 May 2014 11:34:01 +0200 Subject: [PATCH] 4967 Use https to load the location form OSM --- app/assets/javascripts/osmlocator.js | 2 +- spec/javascripts/osmlocator-spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/osmlocator.js b/app/assets/javascripts/osmlocator.js index 1ff766294..509413f9d 100644 --- a/app/assets/javascripts/osmlocator.js +++ b/app/assets/javascripts/osmlocator.js @@ -6,7 +6,7 @@ OSM.Locator = function(){ navigator.geolocation.getCurrentPosition(function(position) { lat=position.coords.latitude; lon=position.coords.longitude; - var display_name =$.getJSON("http://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"&addressdetails=3", function(data){ + var display_name =$.getJSON("https://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"&addressdetails=3", function(data){ return callback(data.display_name, position.coords); }); },errorGettingPosition); diff --git a/spec/javascripts/osmlocator-spec.js b/spec/javascripts/osmlocator-spec.js index 5cd22fa69..173ea4a5b 100644 --- a/spec/javascripts/osmlocator-spec.js +++ b/spec/javascripts/osmlocator-spec.js @@ -7,7 +7,7 @@ describe("Locator", function(){ }; $.getJSON = function(url, myCallback){ - if(url == "http://nominatim.openstreetmap.org/reverse?format=json&lat=1&lon=2&addressdetails=3") + if(url == "https://nominatim.openstreetmap.org/reverse?format=json&lat=1&lon=2&addressdetails=3") { return myCallback({ display_name: 'locator address' }) }