Commit 912c572aedff9509315a1913f1b5b3eecda2fa34

Authored by Igor Kulikov
1 parent b855d82f

UI: Map widget improvements.

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