Making unknown locator bands/modes read as "other" on the map.
This commit is contained in:
parent
ccb5e049a1
commit
f02c017b92
|
|
@ -50,8 +50,12 @@ LocatorManager.prototype.update = function(id, data, map) {
|
||||||
// Do not update unless locator present
|
// Do not update unless locator present
|
||||||
if (!(id in this.locators)) return false;
|
if (!(id in this.locators)) return false;
|
||||||
|
|
||||||
|
// Make sure we have valid band and mode names
|
||||||
|
if (!data.band) data.band = 'other';
|
||||||
|
if (!data.mode) data.mode = 'other';
|
||||||
|
|
||||||
// Keep track of bands
|
// Keep track of bands
|
||||||
if(!(data.band in this.bands)) {
|
if (!(data.band in this.bands)) {
|
||||||
this.bands[data.band] = '#000000';
|
this.bands[data.band] = '#000000';
|
||||||
this.assignColors(this.bands);
|
this.assignColors(this.bands);
|
||||||
if (this.colorMode === 'band') {
|
if (this.colorMode === 'band') {
|
||||||
|
|
@ -61,7 +65,7 @@ LocatorManager.prototype.update = function(id, data, map) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep track modes
|
// Keep track modes
|
||||||
if(!(data.mode in this.modes)) {
|
if (!(data.mode in this.modes)) {
|
||||||
this.modes[data.mode] = '#000000';
|
this.modes[data.mode] = '#000000';
|
||||||
this.assignColors(this.modes);
|
this.assignColors(this.modes);
|
||||||
if (this.colorMode === 'mode') {
|
if (this.colorMode === 'mode') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue