Skip to content

Commit

Permalink
Update scripts.jsp
Browse files Browse the repository at this point in the history
  • Loading branch information
dvcama authored Jan 23, 2017
1 parent db43088 commit 5e02268
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/webapp/WEB-INF/views/inc/scripts.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,14 @@
}).setView([ lat, lon ], 3);
L.marker([ lat, lon ]).addTo(map);
}
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
var osmurl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png';
if(document.location.href.indexOf('https://') == 0){
osmurl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
}
L.tileLayer(osmurl, {
attribution : '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
},
mapInWidget : function(forceLoad) {
if ($('map').length > 0) {
Expand Down

1 comment on commit 5e02268

@dvcama
Copy link
Collaborator Author

@dvcama dvcama commented on 5e02268 Jan 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osm over https

Please sign in to comment.