Aircraft label styling
This commit is contained in:
parent
c23438a5cf
commit
ff7aafe0bb
|
|
@ -470,17 +470,17 @@ PlaneObject.prototype.updateIcon = function() {
|
||||||
|
|
||||||
this.markerIcon = icon;
|
this.markerIcon = icon;
|
||||||
|
|
||||||
if (AircraftLabels) {
|
if (AircraftLabels && this.flight != null) {
|
||||||
this.markerStyle = new ol.style.Style({
|
this.markerStyle = new ol.style.Style({
|
||||||
image: this.markerIcon,
|
image: this.markerIcon,
|
||||||
text: new ol.style.Text({
|
text: new ol.style.Text({
|
||||||
text: this.flight,
|
text: this.flight.trim(),
|
||||||
fill: new ol.style.Fill({color: 'white' }),
|
fill: new ol.style.Fill({color: 'white'}),
|
||||||
stroke: new ol.style.Stroke({color: 'black', width: 3}),
|
backgroundFill: new ol.style.Stroke({color: 'rgba(0, 47, 93, 0.8'}),
|
||||||
textAlign: 'left',
|
textAlign: 'center',
|
||||||
textBaseline: "top",
|
offsetY: -20,
|
||||||
offsetX: 20,
|
font: '10px Helvetica',
|
||||||
font: '12px sans-serif'
|
padding: [1,0,0,2]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -510,17 +510,17 @@ PlaneObject.prototype.updateIcon = function() {
|
||||||
this.staticIcon.setOpacity(opacity);
|
this.staticIcon.setOpacity(opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AircraftLabels) {
|
if (AircraftLabels && this.flight != null) {
|
||||||
this.markerStyle = new ol.style.Style({
|
this.markerStyle = new ol.style.Style({
|
||||||
image: this.markerIcon,
|
image: this.markerIcon,
|
||||||
text: new ol.style.Text({
|
text: new ol.style.Text({
|
||||||
text: this.flight,
|
text: this.flight.trim(),
|
||||||
fill: new ol.style.Fill({color: 'white' }),
|
fill: new ol.style.Fill({color: 'white'}),
|
||||||
stroke: new ol.style.Stroke({color: 'black', width: 3}),
|
backgroundFill: new ol.style.Stroke({color: 'rgba(0, 47, 93, 0.8)'}),
|
||||||
textAlign: 'left',
|
textAlign: 'center',
|
||||||
textBaseline: "top",
|
offsetY: -20,
|
||||||
offsetX: 20,
|
font: '10px Helvetica',
|
||||||
font: '12px sans-serif'
|
padding: [1,0,0,2]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue