Skip to content

Commit

Permalink
Adjust marker SLD styling
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jun 26, 2024
1 parent 9678340 commit d9c783b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/VectorLayerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const VectorLayerUtils = {
},
createSld(geometrytype, styleName, styleOptions, layerOpacity, dpi = 96, scaleFactor = 1.0) {
let opts = {};
const dpiScale = dpi / 96 * scaleFactor;
// Special cases
if (styleName === 'text') {
// Make geometry transparent
Expand All @@ -155,15 +156,14 @@ const VectorLayerUtils = {
} else if (styleName === 'marker') {
opts = {
strokeColor: [0, 0, 255, 1],
strokeWidth: 4,
strokeWidth: 1 * dpiScale,
fillColor: [255, 255, 255, 1],
circleRadius: 6
circleRadius: 2 * dpiScale
};
} else {
// Default style
opts = styleOptions;
}
const dpiScale = dpi / 96 * scaleFactor;

const ensureHex = (rgb) => (!Array.isArray(rgb) ? rgb : ('#' + (0x1000000 + (rgb[2] | (rgb[1] << 8) | (rgb[0] << 16))).toString(16).slice(1)));
const opacity = (rgb) => {
Expand Down

0 comments on commit d9c783b

Please sign in to comment.