Skip to content

Commit 5e02268

Browse files
authored
Update scripts.jsp
1 parent db43088 commit 5e02268

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/webapp/WEB-INF/views/inc/scripts.jsp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,14 @@
163163
}).setView([ lat, lon ], 3);
164164
L.marker([ lat, lon ]).addTo(map);
165165
}
166-
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
166+
var osmurl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png';
167+
if(document.location.href.indexOf('https://') == 0){
168+
osmurl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
169+
}
170+
L.tileLayer(osmurl, {
167171
attribution : '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
168172
}).addTo(map);
173+
169174
},
170175
mapInWidget : function(forceLoad) {
171176
if ($('map').length > 0) {

0 commit comments

Comments
 (0)