Fix: some resources were insecure when using ssl

This commit is contained in:
Bartek Fabiszewski 2016-10-29 14:05:13 +02:00
parent 1fce3f8718
commit 70eecac6be
13 changed files with 315 additions and 313 deletions

View File

@ -121,10 +121,10 @@ function setMarker(p,i,posLen) {
position: p.coordinates,
title: p.dateoccured
});
if (latest==1) { marker.setIcon('http://maps.google.com/mapfiles/dd-end.png') }
else if (i==0) { marker.setIcon('http://maps.google.com/mapfiles/marker_greenA.png') }
else if (i==posLen-1) { marker.setIcon('http://maps.google.com/mapfiles/markerB.png') }
else { marker.setIcon('http://labs.google.com/ridefinder/images/mm_20_gray.png') }
if (latest==1) { marker.setIcon('//maps.google.com/mapfiles/dd-end.png') }
else if (i==0) { marker.setIcon('//maps.google.com/mapfiles/marker_greenA.png') }
else if (i==posLen-1) { marker.setIcon('//maps.google.com/mapfiles/markerB.png') }
else { marker.setIcon('//maps.gstatic.com/mapfiles/ridefinder-images/mm_20_gray.png') }
// popup
var content = '<div id="popup">'+
'<div id="pheader">'+lang_user+': '+p.username.toUpperCase()+'<br />'+lang_track+': '+p.trackname.toUpperCase()+
@ -161,7 +161,7 @@ function addChartEvent(chart) {
if (selection) {
var id = selection.row;
var icon = markers[id].getIcon();
markers[id].setIcon('http://maps.google.com/mapfiles/marker_orange.png');
markers[id].setIcon('//maps.google.com/mapfiles/marker_orange.png');
altTimeout = setTimeout(function() { markers[id].setIcon(icon); },2000);
}
});

View File

@ -39,39 +39,42 @@ function init() {
};
map = new OpenLayers.Map('map-canvas', options);
// default layer: OpenStreetMap
var mapnik = new OpenLayers.Layer.OSM();
var mapnik = new OpenLayers.Layer.OSM('OpenStreetMap',
['//a.tile.openstreetmap.org/${z}/${x}/${y}.png',
'//b.tile.openstreetmap.org/${z}/${x}/${y}.png',
'//c.tile.openstreetmap.org/${z}/${x}/${y}.png']);
map.addLayer(mapnik);
if (layer_ocm==1) {
// OpenCycleMap
var ocm = new OpenLayers.Layer.OSM('OpenCycleMap',
['http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png',
'http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png',
'http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png']);
['//a.tile.thunderforest.com/cycle/${z}/${x}/${y}.png',
'//b.tile.thunderforest.com/cycle/${z}/${x}/${y}.png',
'//c.tile.thunderforest.com/cycle/${z}/${x}/${y}.png']);
map.addLayer(ocm);
}
if (layer_mq==1) {
// MapQuest-OSM
var mq = new OpenLayers.Layer.OSM('MapQuest-OSM',
['http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
'http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
'http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
'http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg']);
['//otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
'//otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
'//otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
'//otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg']);
map.addLayer(mq);
}
if (layer_osmapa==1) {
// osmapa.pl
var osmapa = new OpenLayers.Layer.OSM('osmapa.pl',
['http://a.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
'http://b.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
'http://c.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png']);
['//a.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
'//b.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
'//c.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png']);
map.addLayer(osmapa);
}
if (layer_ump==1) {
// UMP
var ump = new OpenLayers.Layer.OSM('UMP',
['http://1.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
'http://2.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
'http://3.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png']);
['//1.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
'//2.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
'//3.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png']);
map.addLayer(ump);
}
var position = new OpenLayers.LonLat(init_longitude,init_latitude).transform(wgs84, mercator);
@ -145,13 +148,13 @@ function setMarker(p,i,posLen) {
var lonLat = new OpenLayers.LonLat(p.longitude,p.latitude).transform(wgs84,mercator);
var size = new OpenLayers.Size(21, 25);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
if (latest==1) { var icon = new OpenLayers.Icon('http://www.openstreetmap.org/openlayers/img/marker.png',size,offset); }
else if (i==0) { var icon = new OpenLayers.Icon('http://www.openstreetmap.org/openlayers/img/marker-green.png',size,offset); }
else if (i==posLen-1) { var icon = new OpenLayers.Icon('http://www.openstreetmap.org/openlayers/img/marker.png',size,offset); }
if (latest==1) { var icon = new OpenLayers.Icon('//www.openstreetmap.org/openlayers/img/marker.png',size,offset); }
else if (i==0) { var icon = new OpenLayers.Icon('//www.openstreetmap.org/openlayers/img/marker-green.png',size,offset); }
else if (i==posLen-1) { var icon = new OpenLayers.Icon('//www.openstreetmap.org/openlayers/img/marker.png',size,offset); }
else {
size = new OpenLayers.Size(12, 20);
offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new OpenLayers.Icon('http://labs.google.com/ridefinder/images/mm_20_gray.png',size,offset);
var icon = new OpenLayers.Icon('//maps.gstatic.com/mapfiles/ridefinder-images/mm_20_gray.png',size,offset);
}
var marker = new OpenLayers.Marker(lonLat,icon);
layerMarkers.addMarker(marker);
@ -197,7 +200,7 @@ function addChartEvent(chart) {
var id = selection.row;
var marker = layerMarkers.markers[id];
var url = marker.icon.url;
marker.setUrl('http://www.openstreetmap.org/openlayers/img/marker-gold.png');
marker.setUrl('//www.openstreetmap.org/openlayers/img/marker-gold.png');
altTimeout = setTimeout(function() { marker.setUrl(url); },2000);
}
});

View File

@ -100,7 +100,7 @@ if ($trackid>0 && $userid>0) {
// marker styles
addStyle($xml,"red","http://maps.google.com/mapfiles/markerA.png");
addStyle($xml,"green","http://maps.google.com/mapfiles/marker_greenB.png");
addStyle($xml,"gray","http://labs.google.com/ridefinder/images/mm_20_gray.png");
addStyle($xml,"gray","http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_gray.png");
$style = "#redStyle"; // for first element
$i = 0;
$totalMeters = 0;

View File

@ -111,7 +111,6 @@ $lang_form = '
<option value="en"'.(($lang=="en")?' selected':'').'>English</option>
<option value="pl"'.(($lang=="pl")?' selected':'').'>Polski</option>
<option value="de"'.(($lang=="de")?' selected':'').'>Deutsch</option>
<option value="hu"'.(($lang=="hu")?' selected':'').'>Magyar</option>
</select>
</form>
';
@ -165,13 +164,13 @@ print
';
if ($mapapi == "gmaps") {
print
' <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?'.(isset($gkey)?'key='.$gkey.'&':'').'sensor=false"></script>
' <script type="text/javascript" src="//maps.googleapis.com/maps/api/js'.(isset($gkey)?'?key='.$gkey:'').'"></script>
<script type="text/javascript" src="api_gmaps.js"></script>
';
}
else {
print
' <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
' <script type="text/javascript" src="//openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript" src="api_openlayers.js"></script>
';
}

View File

@ -318,11 +318,11 @@ function loadMapAPI(api) {
var url = new Array();
if (api=='gmaps') {
url.push('api_gmaps.js');
url.push('//maps.googleapis.com/maps/api/js?'+((gkey!==null)?('key='+gkey+'&'):'')+'sensor=false&callback=init');
url.push('//maps.googleapis.com/maps/api/js?'+((gkey!==null)?('key='+gkey+'&'):'')+'callback=init');
}
else {
url.push('api_openlayers.js');
url.push('http://openlayers.org/api/OpenLayers.js');
url.push('//openlayers.org/api/OpenLayers.js');
}
addScript(url[0]);
waitAndLoad(api,url);