UI: Control maps labels color.
This commit is contained in:
parent
7d4da490fe
commit
795d54b74e
@ -200,7 +200,7 @@ export default class TbGoogleMap {
|
|||||||
map: this.map,
|
map: this.map,
|
||||||
icon: pinImage,
|
icon: pinImage,
|
||||||
shadow: pinShadow,
|
shadow: pinShadow,
|
||||||
labelContent: '<b>'+settings.label+'</b>',
|
labelContent: '<div style="color: '+ settings.labelColor +';"><b>'+settings.label+'</b></div>',
|
||||||
labelClass: "tb-labels",
|
labelClass: "tb-labels",
|
||||||
labelAnchor: new google.maps.Point(50, height + 20)
|
labelAnchor: new google.maps.Point(50, height + 20)
|
||||||
});
|
});
|
||||||
|
|||||||
@ -99,6 +99,7 @@ export default class TbMapWidget {
|
|||||||
lngKeyName: "lng",
|
lngKeyName: "lng",
|
||||||
showLabel: true,
|
showLabel: true,
|
||||||
label: "",
|
label: "",
|
||||||
|
labelColor: ctx.widgetConfig.color || '#000000',
|
||||||
color: "#FE7569",
|
color: "#FE7569",
|
||||||
useColorFunction: false,
|
useColorFunction: false,
|
||||||
colorFunction: null,
|
colorFunction: null,
|
||||||
|
|||||||
@ -78,7 +78,7 @@ export default class TbOpenStreetMap {
|
|||||||
marker.setIcon(icon);
|
marker.setIcon(icon);
|
||||||
if (settings.showLabel) {
|
if (settings.showLabel) {
|
||||||
marker.unbindTooltip();
|
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] });
|
{ 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);
|
var marker = L.marker(location, {icon: icon}).addTo(this.map);
|
||||||
|
|
||||||
if (settings.showLabel) {
|
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] });
|
{ className: 'tb-marker-label', permanent: true, direction: 'top', offset: [0, -height + 10] });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user