Browse Source

UI: Map widget improvements.

pull/122/head
Igor Kulikov 9 years ago
parent
commit
912c572aed
  1. 6
      ui/src/app/widget/lib/map-widget.js

6
ui/src/app/widget/lib/map-widget.js

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

Loading…
Cancel
Save