UI: Control maps labels color.

This commit is contained in:
Igor Kulikov 2017-03-16 11:28:00 +02:00
parent 7d4da490fe
commit 795d54b74e
3 changed files with 4 additions and 3 deletions

View File

@ -200,7 +200,7 @@ export default class TbGoogleMap {
map: this.map,
icon: pinImage,
shadow: pinShadow,
labelContent: '<b>'+settings.label+'</b>',
labelContent: '<div style="color: '+ settings.labelColor +';"><b>'+settings.label+'</b></div>',
labelClass: "tb-labels",
labelAnchor: new google.maps.Point(50, height + 20)
});

View File

@ -99,6 +99,7 @@ export default class TbMapWidget {
lngKeyName: "lng",
showLabel: true,
label: "",
labelColor: ctx.widgetConfig.color || '#000000',
color: "#FE7569",
useColorFunction: false,
colorFunction: null,

View File

@ -78,7 +78,7 @@ export default class TbOpenStreetMap {
marker.setIcon(icon);
if (settings.showLabel) {
marker.unbindTooltip();
marker.bindTooltip('<b>' + settings.label + '</b>',
marker.bindTooltip('<div style="color: '+ settings.labelColor +';"><b>'+settings.label+'</b></div>',
{ className: 'tb-marker-label', permanent: true, direction: 'top', offset: [0, -height + 10] });
}
}
@ -101,7 +101,7 @@ export default class TbOpenStreetMap {
var marker = L.marker(location, {icon: icon}).addTo(this.map);
if (settings.showLabel) {
marker.bindTooltip('<b>' + settings.label + '</b>',
marker.bindTooltip('<div style="color: '+ settings.labelColor +';"><b>'+settings.label+'</b></div>',
{ className: 'tb-marker-label', permanent: true, direction: 'top', offset: [0, -height + 10] });
}