Commit 912c572aedff9509315a1913f1b5b3eecda2fa34

Authored by Igor Kulikov
1 parent b855d82f

UI: Map widget improvements.

@@ -172,7 +172,7 @@ export default class TbMapWidget { @@ -172,7 +172,7 @@ export default class TbMapWidget {
172 showLabel: subscriptionLocationSettings.showLabel !== false, 172 showLabel: subscriptionLocationSettings.showLabel !== false,
173 displayTooltip: subscriptionLocationSettings.displayTooltip !== false, 173 displayTooltip: subscriptionLocationSettings.displayTooltip !== false,
174 label: datasource.name, 174 label: datasource.name,
175 - labelColor: this.ctx.widgetConfig.color || '#000000', 175 + labelColor: subscriptionLocationSettings.labelColor || this.ctx.widgetConfig.color || '#000000',
176 color: "#FE7569", 176 color: "#FE7569",
177 useColorFunction: false, 177 useColorFunction: false,
178 colorFunction: null, 178 colorFunction: null,
@@ -197,6 +197,8 @@ export default class TbMapWidget { @@ -197,6 +197,8 @@ export default class TbMapWidget {
197 } 197 }
198 198
199 this.locationsSettings.push(locationsSettings); 199 this.locationsSettings.push(locationsSettings);
  200 + latKeyIndex = -1;
  201 + lngKeyIndex = -1;
200 } 202 }
201 index++; 203 index++;
202 } 204 }
@@ -576,7 +578,7 @@ export default class TbMapWidget { @@ -576,7 +578,7 @@ export default class TbMapWidget {
576 resize() { 578 resize() {
577 if (this.map && this.map.inited()) { 579 if (this.map && this.map.inited()) {
578 this.map.invalidateSize(); 580 this.map.invalidateSize();
579 - if (this.locations && this.locations.size > 0) { 581 + if (this.locations && this.locations.length > 0) {
580 var bounds = this.map.createBounds(); 582 var bounds = this.map.createBounds();
581 for (var m = 0; m < this.markers.length; m++) { 583 for (var m = 0; m < this.markers.length; m++) {
582 this.map.extendBoundsWithMarker(bounds, this.markers[m]); 584 this.map.extendBoundsWithMarker(bounds, this.markers[m]);