Fix: some resources were insecure when using ssl
This commit is contained in:
parent
1fce3f8718
commit
70eecac6be
10
api_gmaps.js
10
api_gmaps.js
@ -121,10 +121,10 @@ function setMarker(p,i,posLen) {
|
|||||||
position: p.coordinates,
|
position: p.coordinates,
|
||||||
title: p.dateoccured
|
title: p.dateoccured
|
||||||
});
|
});
|
||||||
if (latest==1) { marker.setIcon('http://maps.google.com/mapfiles/dd-end.png') }
|
if (latest==1) { marker.setIcon('//maps.google.com/mapfiles/dd-end.png') }
|
||||||
else if (i==0) { marker.setIcon('http://maps.google.com/mapfiles/marker_greenA.png') }
|
else if (i==0) { marker.setIcon('//maps.google.com/mapfiles/marker_greenA.png') }
|
||||||
else if (i==posLen-1) { marker.setIcon('http://maps.google.com/mapfiles/markerB.png') }
|
else if (i==posLen-1) { marker.setIcon('//maps.google.com/mapfiles/markerB.png') }
|
||||||
else { marker.setIcon('http://labs.google.com/ridefinder/images/mm_20_gray.png') }
|
else { marker.setIcon('//maps.gstatic.com/mapfiles/ridefinder-images/mm_20_gray.png') }
|
||||||
// popup
|
// popup
|
||||||
var content = '<div id="popup">'+
|
var content = '<div id="popup">'+
|
||||||
'<div id="pheader">'+lang_user+': '+p.username.toUpperCase()+'<br />'+lang_track+': '+p.trackname.toUpperCase()+
|
'<div id="pheader">'+lang_user+': '+p.username.toUpperCase()+'<br />'+lang_track+': '+p.trackname.toUpperCase()+
|
||||||
@ -161,7 +161,7 @@ function addChartEvent(chart) {
|
|||||||
if (selection) {
|
if (selection) {
|
||||||
var id = selection.row;
|
var id = selection.row;
|
||||||
var icon = markers[id].getIcon();
|
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);
|
altTimeout = setTimeout(function() { markers[id].setIcon(icon); },2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -39,39 +39,42 @@ function init() {
|
|||||||
};
|
};
|
||||||
map = new OpenLayers.Map('map-canvas', options);
|
map = new OpenLayers.Map('map-canvas', options);
|
||||||
// default layer: OpenStreetMap
|
// 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);
|
map.addLayer(mapnik);
|
||||||
if (layer_ocm==1) {
|
if (layer_ocm==1) {
|
||||||
// OpenCycleMap
|
// OpenCycleMap
|
||||||
var ocm = new OpenLayers.Layer.OSM('OpenCycleMap',
|
var ocm = new OpenLayers.Layer.OSM('OpenCycleMap',
|
||||||
['http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png',
|
['//a.tile.thunderforest.com/cycle/${z}/${x}/${y}.png',
|
||||||
'http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png',
|
'//b.tile.thunderforest.com/cycle/${z}/${x}/${y}.png',
|
||||||
'http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png']);
|
'//c.tile.thunderforest.com/cycle/${z}/${x}/${y}.png']);
|
||||||
map.addLayer(ocm);
|
map.addLayer(ocm);
|
||||||
}
|
}
|
||||||
if (layer_mq==1) {
|
if (layer_mq==1) {
|
||||||
// MapQuest-OSM
|
// MapQuest-OSM
|
||||||
var mq = new OpenLayers.Layer.OSM('MapQuest-OSM',
|
var mq = new OpenLayers.Layer.OSM('MapQuest-OSM',
|
||||||
['http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg',
|
['//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',
|
'//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',
|
'//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']);
|
'//otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg']);
|
||||||
map.addLayer(mq);
|
map.addLayer(mq);
|
||||||
}
|
}
|
||||||
if (layer_osmapa==1) {
|
if (layer_osmapa==1) {
|
||||||
// osmapa.pl
|
// osmapa.pl
|
||||||
var osmapa = new OpenLayers.Layer.OSM('osmapa.pl',
|
var osmapa = new OpenLayers.Layer.OSM('osmapa.pl',
|
||||||
['http://a.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
|
['//a.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
|
||||||
'http://b.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
|
'//b.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png',
|
||||||
'http://c.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png']);
|
'//c.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png']);
|
||||||
map.addLayer(osmapa);
|
map.addLayer(osmapa);
|
||||||
}
|
}
|
||||||
if (layer_ump==1) {
|
if (layer_ump==1) {
|
||||||
// UMP
|
// UMP
|
||||||
var ump = new OpenLayers.Layer.OSM('UMP',
|
var ump = new OpenLayers.Layer.OSM('UMP',
|
||||||
['http://1.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
|
['//1.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
|
||||||
'http://2.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
|
'//2.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
|
||||||
'http://3.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png']);
|
'//3.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png']);
|
||||||
map.addLayer(ump);
|
map.addLayer(ump);
|
||||||
}
|
}
|
||||||
var position = new OpenLayers.LonLat(init_longitude,init_latitude).transform(wgs84, mercator);
|
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 lonLat = new OpenLayers.LonLat(p.longitude,p.latitude).transform(wgs84,mercator);
|
||||||
var size = new OpenLayers.Size(21, 25);
|
var size = new OpenLayers.Size(21, 25);
|
||||||
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
|
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); }
|
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('http://www.openstreetmap.org/openlayers/img/marker-green.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('http://www.openstreetmap.org/openlayers/img/marker.png',size,offset); }
|
else if (i==posLen-1) { var icon = new OpenLayers.Icon('//www.openstreetmap.org/openlayers/img/marker.png',size,offset); }
|
||||||
else {
|
else {
|
||||||
size = new OpenLayers.Size(12, 20);
|
size = new OpenLayers.Size(12, 20);
|
||||||
offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
|
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);
|
var marker = new OpenLayers.Marker(lonLat,icon);
|
||||||
layerMarkers.addMarker(marker);
|
layerMarkers.addMarker(marker);
|
||||||
@ -197,7 +200,7 @@ function addChartEvent(chart) {
|
|||||||
var id = selection.row;
|
var id = selection.row;
|
||||||
var marker = layerMarkers.markers[id];
|
var marker = layerMarkers.markers[id];
|
||||||
var url = marker.icon.url;
|
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);
|
altTimeout = setTimeout(function() { marker.setUrl(url); },2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -100,7 +100,7 @@ if ($trackid>0 && $userid>0) {
|
|||||||
// marker styles
|
// marker styles
|
||||||
addStyle($xml,"red","http://maps.google.com/mapfiles/markerA.png");
|
addStyle($xml,"red","http://maps.google.com/mapfiles/markerA.png");
|
||||||
addStyle($xml,"green","http://maps.google.com/mapfiles/marker_greenB.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
|
$style = "#redStyle"; // for first element
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalMeters = 0;
|
$totalMeters = 0;
|
||||||
|
@ -111,7 +111,6 @@ $lang_form = '
|
|||||||
<option value="en"'.(($lang=="en")?' selected':'').'>English</option>
|
<option value="en"'.(($lang=="en")?' selected':'').'>English</option>
|
||||||
<option value="pl"'.(($lang=="pl")?' selected':'').'>Polski</option>
|
<option value="pl"'.(($lang=="pl")?' selected':'').'>Polski</option>
|
||||||
<option value="de"'.(($lang=="de")?' selected':'').'>Deutsch</option>
|
<option value="de"'.(($lang=="de")?' selected':'').'>Deutsch</option>
|
||||||
<option value="hu"'.(($lang=="hu")?' selected':'').'>Magyar</option>
|
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
';
|
';
|
||||||
@ -165,13 +164,13 @@ print
|
|||||||
';
|
';
|
||||||
if ($mapapi == "gmaps") {
|
if ($mapapi == "gmaps") {
|
||||||
print
|
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>
|
<script type="text/javascript" src="api_gmaps.js"></script>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print
|
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>
|
<script type="text/javascript" src="api_openlayers.js"></script>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
4
main.js
4
main.js
@ -318,11 +318,11 @@ function loadMapAPI(api) {
|
|||||||
var url = new Array();
|
var url = new Array();
|
||||||
if (api=='gmaps') {
|
if (api=='gmaps') {
|
||||||
url.push('api_gmaps.js');
|
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 {
|
else {
|
||||||
url.push('api_openlayers.js');
|
url.push('api_openlayers.js');
|
||||||
url.push('http://openlayers.org/api/OpenLayers.js');
|
url.push('//openlayers.org/api/OpenLayers.js');
|
||||||
}
|
}
|
||||||
addScript(url[0]);
|
addScript(url[0]);
|
||||||
waitAndLoad(api,url);
|
waitAndLoad(api,url);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user