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,
 | 
			
		||||
                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)
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
@ -99,6 +99,7 @@ export default class TbMapWidget {
 | 
			
		||||
                lngKeyName: "lng",
 | 
			
		||||
                showLabel: true,
 | 
			
		||||
                label: "",
 | 
			
		||||
                labelColor: ctx.widgetConfig.color || '#000000',
 | 
			
		||||
                color: "#FE7569",
 | 
			
		||||
                useColorFunction: false,
 | 
			
		||||
                colorFunction: null,
 | 
			
		||||
 | 
			
		||||
@ -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] });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user