Skip to content

Commit

Permalink
Adding better color support for GeoJSON shapes on map
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Jan 11, 2024
1 parent bea283f commit 9ddb476
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/main/java/org/computate/frFR/java/EcrirePageClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -3262,19 +3262,25 @@ else if(entiteAttribuer) {
tl(4, "if(feature.geometry.type == 'Point') {");
tl(5, "return {");
tl(6, "radius: 8");
tl(6, ", fillColor: '#ff7800'");
tl(6, ", color: '#000'");
tl(6, ", fillColor: (feature.properties.areaServedColors && feature.properties.areaServedColors[feature.index] ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))");
tl(6, ", color: (feature.properties.areaServedColors && feature.properties.areaServedColors[feature.index] ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))");
tl(6, ", weight: 1");
tl(6, ", opacity: 1");
tl(6, ", fillOpacity: 0.8");
tl(6, ", opacity: 0.7");
tl(6, ", fillOpacity: 0.7");
tl(5, "};");
tl(4, "} else if(feature.geometry.type == 'LineString') {");
tl(5, "return {");
tl(6, "color: (feature.properties.areaServedColors && feature.properties.areaServedColors[feature.index] ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))");
tl(6, ", weight: 5");
tl(6, ", opacity: 0.7");
tl(5, "};");
tl(4, "} else {");
tl(5, "return {");
tl(6, " fillColor: '#ff7800'");
tl(6, " fillColor: (feature.properties.areaServedColors && feature.properties.areaServedColors[feature.index] ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))");
tl(6, ", color: (feature.properties.areaServedColors && feature.properties.areaServedColors[feature.index] ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))");
tl(6, ", weight: 5");
tl(6, ", opacity: 1");
tl(6, ", fillOpacity: 0.8");
tl(6, ", weight: 3");
tl(6, ", opacity: 0.7");
tl(6, ", fillOpacity: 0.7");
tl(5, "};");
tl(4, "}");
tl(0, "{{/inline}}");
Expand Down

0 comments on commit 9ddb476

Please sign in to comment.