Adding more details about stationary markers.
This commit is contained in:
parent
22a447f590
commit
c504589b76
@ -143,7 +143,11 @@ $(function(){
|
|||||||
marker.comment = update.location.comment;
|
marker.comment = update.location.comment;
|
||||||
marker.weather = update.location.weather;
|
marker.weather = update.location.weather;
|
||||||
marker.altitude = update.location.altitude;
|
marker.altitude = update.location.altitude;
|
||||||
|
marker.height = update.location.height;
|
||||||
|
marker.power = update.location.power;
|
||||||
|
marker.gain = update.location.gain;
|
||||||
marker.device = update.location.device;
|
marker.device = update.location.device;
|
||||||
|
marker.directivity = update.location.directivity;
|
||||||
|
|
||||||
if (expectedCallsign && expectedCallsign == update.callsign) {
|
if (expectedCallsign && expectedCallsign == update.callsign) {
|
||||||
map.panTo(pos);
|
map.panTo(pos);
|
||||||
@ -462,24 +466,24 @@ $(function(){
|
|||||||
|
|
||||||
if (marker.weather.rain && (marker.weather.rain.day>0)) {
|
if (marker.weather.rain && (marker.weather.rain.day>0)) {
|
||||||
weatherString += makeListItem('Rain',
|
weatherString += makeListItem('Rain',
|
||||||
marker.weather.rain.hour + ' mm/h, ' +
|
marker.weather.rain.hour.toFixed(0) + ' mm/h, ' +
|
||||||
marker.weather.rain.day + ' mm/day'
|
marker.weather.rain.day.toFixed(0) + ' mm/day'
|
||||||
// marker.weather.rain.sincemidnight + ' mm since midnight'
|
// marker.weather.rain.sincemidnight + ' mm since midnight'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (marker.weather.snowfall) {
|
if (marker.weather.snowfall) {
|
||||||
weatherString += makeListItem('Snow', marker.weather.snowfall + ' cm');
|
weatherString += makeListItem('Snow', marker.weather.snowfall.toFixed(1) + ' cm');
|
||||||
}
|
}
|
||||||
|
|
||||||
weatherString += '</p>';
|
weatherString += '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (marker.altitude || marker.device) {
|
if (marker.altitude || marker.device || marker.power || marker.height || marker.gain || marker.directivity) {
|
||||||
detailsString += '<p>' + makeListTitle('Details');
|
detailsString += '<p>' + makeListTitle('Details');
|
||||||
|
|
||||||
if (marker.altitude) {
|
if (marker.altitude) {
|
||||||
detailsString += makeListItem('Altitude', marker.altitude + ' m');
|
detailsString += makeListItem('Altitude', marker.altitude.toFixed(0) + ' m');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (marker.device) {
|
if (marker.device) {
|
||||||
@ -489,6 +493,22 @@ $(function(){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (marker.height) {
|
||||||
|
detailsString += makeListItem('Height', marker.height.toFixed(0) + ' m');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (marker.power) {
|
||||||
|
detailsString += makeListItem('Power', marker.power);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (marker.gain) {
|
||||||
|
detailsString += makeListItem('Gain', marker.gain);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (marker.directivity) {
|
||||||
|
detailsString += makeListItem('Direction', marker.directivity);
|
||||||
|
}
|
||||||
|
|
||||||
detailsString += '</p>';
|
detailsString += '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ class AprsLocation(LatLngLocation):
|
|||||||
|
|
||||||
def __dict__(self):
|
def __dict__(self):
|
||||||
res = super(AprsLocation, self).__dict__()
|
res = super(AprsLocation, self).__dict__()
|
||||||
for key in ["comment", "symbol", "course", "speed", "altitude", "weather", "device"]:
|
for key in ["comment", "symbol", "course", "speed", "altitude", "weather", "device", "power", "height", "gain", "directivity"]:
|
||||||
if key in self.data:
|
if key in self.data:
|
||||||
res[key] = self.data[key]
|
res[key] = self.data[key]
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user