// alte Version für Google:
function DisplayStation($brand, $addr, $lat, $lng, $e5, $e10, $diesel, $time) {
$ContentString = 'Tankstelle: '+$brand+'
'+
$addr+'
'+
''+
'| E5: '+$e5+' € | E10: '+$e10+' € |
'+
'| Diesel: '+$diesel+' € | ('+$time+') |
'+
'
';
var infowindow = new google.maps.InfoWindow({
content: $ContentString
});
var flagimage = {
url: 'http://bot.sevelen.de/tankbot/flagpole.png',
// This marker is 20 pixels wide by 32 pixels high.
size: new google.maps.Size(40, 25),
// The origin for this image is (0, 0).
origin: new google.maps.Point(0, 0),
labelOrigin: new google.maps.Point(20, 10), // Mitte label = Mitte des Icons
labelColor : 'FFFF00',
// The anchor for this image is the base of the flagpole at (0, 32).
anchor: new google.maps.Point(20, 25)
};
var TSmarker = new google.maps.Marker({
position : {lat: $lat, lng: $lng},
map : map,
draggable : false,
icon : flagimage,
label : $e5+'',
title : '('+$brand +') E5= '+$e5+' EUR'
});
TSmarker.addListener('click', function() {
infowindow.open(map, TSmarker)
});
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var tspin;
var tspos;
function agecolor(jsage) {
var $zeitfarbe = '#0000FF';
// alert(jsage);
if (jsage > 600) {$zeitfarbe = '#008800'; } // rot ( = 3 h)
if (jsage > 3600) {$zeitfarbe = '#F09C52'; } // orange ( = 60 min) vorab berechnetes Alter des Updates in Sekunden
if (jsage > 10800) {$zeitfarbe = '#FF8080'; } // rot ( = 3 h)
if (jsage > 172800){$zeitfarbe = '#AAAAAA'; } // grau ( = 2 Tage)
return ($zeitfarbe);
}
function BingDisplayStation($brand, $addr, $lat, $lng, $e5, $e10, $diesel, $time, $age) {
// alert($zeit);
tspos = new Microsoft.Maps.Location($lat, $lng),
$farbe = agecolor($age);
$waddr = $addr.replace(/, / , '
'); // WordWrapAdresse: Komme wird zu Zeilenumbruch
$label = ' ' +$e5.toFixed(2)+ ' '.toString(); //läßt sich sonst nicht anzeigen, wahrscheinlich ZAHL | toFixed zeigt Kommastellen wenn 2,00
tspin = new Microsoft.Maps.Pushpin(tspos, { text:$label , title:$brand, subTitle:$addr, color:$farbe, enableHoverStyle:true });
//Add the pushpin to the map
// InfoBox vorbereiten:
var infobox = new Microsoft.Maps.Infobox(tspos, { text:'A', title: $time +' *' + $brand.toUpperCase() +'* ', description: 'E5 :' +$e5.toFixed(2) +' €
E10: '+$e10.toFixed(2) +' €
Diesel: '+$diesel.toFixed(2) + ' €
'+$waddr + '', visible: false, maxHeight:150 } );
infobox.setMap(map);
// Pin mit InfoBox verbinden:
Microsoft.Maps.Events.addHandler(tspin, 'click', function () {
infobox.setOptions({ visible: true });
});
map.entities.push(tspin);
}
function StationsFromList() {
Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'u57088'@'10.129.173.57' (using password: YES) in /homepages/u17656/b_tank/x_get_current.php:16
Stack trace:
#0 /homepages/u17656/b_tank/x_get_current.php(16): mysqli->__construct('db19.variomedia...', 'u57088', Object(SensitiveParameterValue), 'db57088')
#1 /homepages/u17656/b_tank/x_index.php(66): getCurrent('101437\r\n')
#2 {main}
thrown in /homepages/u17656/b_tank/x_get_current.php on line 16