UI: Map widget improvements.

This commit is contained in:
Igor Kulikov 2017-04-27 12:37:58 +03:00
parent b855d82f7a
commit 912c572aed

View File

@ -172,7 +172,7 @@ export default class TbMapWidget {
showLabel: subscriptionLocationSettings.showLabel !== false, showLabel: subscriptionLocationSettings.showLabel !== false,
displayTooltip: subscriptionLocationSettings.displayTooltip !== false, displayTooltip: subscriptionLocationSettings.displayTooltip !== false,
label: datasource.name, label: datasource.name,
labelColor: this.ctx.widgetConfig.color || '#000000', labelColor: subscriptionLocationSettings.labelColor || this.ctx.widgetConfig.color || '#000000',
color: "#FE7569", color: "#FE7569",
useColorFunction: false, useColorFunction: false,
colorFunction: null, colorFunction: null,
@ -197,6 +197,8 @@ export default class TbMapWidget {
} }
this.locationsSettings.push(locationsSettings); this.locationsSettings.push(locationsSettings);
latKeyIndex = -1;
lngKeyIndex = -1;
} }
index++; index++;
} }
@ -576,7 +578,7 @@ export default class TbMapWidget {
resize() { resize() {
if (this.map && this.map.inited()) { if (this.map && this.map.inited()) {
this.map.invalidateSize(); this.map.invalidateSize();
if (this.locations && this.locations.size > 0) { if (this.locations && this.locations.length > 0) {
var bounds = this.map.createBounds(); var bounds = this.map.createBounds();
for (var m = 0; m < this.markers.length; m++) { for (var m = 0; m < this.markers.length; m++) {
this.map.extendBoundsWithMarker(bounds, this.markers[m]); this.map.extendBoundsWithMarker(bounds, this.markers[m]);