Skip to content
Snippets Groups Projects
Commit 1d690ed4 authored by Florent Lavelle's avatar Florent Lavelle
Browse files

keep leaflet cirlcleMarker for cirlce symbols

parent bff0195e
No related branches found
No related tags found
2 merge requests!254version 2.3.2,!235REDMINE_ISSUE-12758
...@@ -398,7 +398,10 @@ const mapUtil = { ...@@ -398,7 +398,10 @@ const mapUtil = {
if (color == undefined){ if (color == undefined){
color = featureType.color; color = featureType.color;
} }
const colorValue = color.value ? color.value : color; const colorValue =
color.value && color.value.length ?
color.value : typeof color === 'string' && color.length ?
color : '#000000';
if (geomJSON.type === 'Point') { if (geomJSON.type === 'Point') {
if ( if (
customFieldOption && customFieldOption &&
...@@ -407,7 +410,10 @@ const mapUtil = { ...@@ -407,7 +410,10 @@ const mapUtil = {
featureType.colors_style.value.icons && featureType.colors_style.value.icons &&
!!Object.keys(featureType.colors_style.value.icons).length !!Object.keys(featureType.colors_style.value.icons).length
) { ) {
if (featureType.colors_style.value.icons[customFieldOption]) { if (
featureType.colors_style.value.icons[customFieldOption] &&
featureType.colors_style.value.icons[customFieldOption] !== 'circle'
) {
const iconHTML = ` const iconHTML = `
<i <i
class="fas fa-${featureType.colors_style.value.icons[customFieldOption]} fa-lg" class="fas fa-${featureType.colors_style.value.icons[customFieldOption]} fa-lg"
...@@ -428,16 +434,16 @@ const mapUtil = { ...@@ -428,16 +434,16 @@ const mapUtil = {
.addTo(featureGroup); .addTo(featureGroup);
} else { } else {
L.circleMarker(geomJSON.coordinates, { L.circleMarker(geomJSON.coordinates, {
color: color, color: colorValue,
radius: 4, radius: 4,
fillOpacity: 0.5, fillOpacity: 0.5,
weight: 3, weight: 3,
}) })
.bindPopup(popupContent) .bindPopup(popupContent)
.addTo(featureGroup); .addTo(featureGroup);
} }
} else { } else {
if (featureType.icon) { if (featureType.icon && featureType.icon !== 'circle') {
const iconHTML = ` const iconHTML = `
<i <i
class="fas fa-${featureType.icon} fa-lg" class="fas fa-${featureType.icon} fa-lg"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment