diff options
author | Miroslav Genov <mgenov@gmail.com> | 2017-04-02 15:28:55 +0300 |
---|---|---|
committer | Miroslav Genov <mgenov@gmail.com> | 2017-04-02 15:28:55 +0300 |
commit | 153061a23ca21dcce30325acea894d6c27d8f8fe (patch) | |
tree | 2a055c14b330469fe5c4d567a7e217701e3394ee | |
parent | dc06c950883b2ea0e8947dc33d8060f8524c3f3a (diff) |
geocode when page is served from https
Google maps is now geo-coding correctly requested address even when page
is served from HTTPS.
-rwxr-xr-x | static/js/google_map.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static/js/google_map.js b/static/js/google_map.js index 0bf73d5..fd0d7b7 100755 --- a/static/js/google_map.js +++ b/static/js/google_map.js @@ -33,7 +33,7 @@ function init() { var addresses = ['Ghent']; for (var x = 0; x < addresses.length; x++) { - $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+addresses[x]+'&sensor=false', null, function (data) { + $.getJSON('//maps.googleapis.com/maps/api/geocode/json?address='+addresses[x]+'&sensor=false', null, function (data) { var p = data.results[0].geometry.location var latlng = new google.maps.LatLng(p.lat, p.lng); new google.maps.Marker({ @@ -46,4 +46,4 @@ function init() { } } -google.maps.event.addDomListener(window, 'load', init);
\ No newline at end of file +google.maps.event.addDomListener(window, 'load', init); |