4967 Use https to load the location form OSM
This commit is contained in:
parent
5f0a11dfa6
commit
24d2ac0ec2
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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' })
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue