Skip to content

Commit

Permalink
Fix point styles
Browse files Browse the repository at this point in the history
- Allows setting a bespoke circle radius
- Honors the stroke width and color on the outline of the point
- Fixes opacity to work with points
  • Loading branch information
theduckylittle committed Nov 8, 2024
1 parent 35dfece commit ed2ef85
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/desktop/mapbook.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
<layer name="default" selectable="true" status="on">
<style><![CDATA[
{
"circle-radius": ["coalesce", ["get", "style:stroke-width"], 4],
"circle-radius": ["coalesce", ["get", "style:circle-radius"], 10],
"circle-color": ["coalesce", ["get", "style:fill-color"], "#fec44f"],
"circle-stroke-color": ["coalesce", ["get", "style:stroke-color"], "#d95f0e"],
"circle-stroke-width": ["coalesce", ["get", "style:stroke-width"], 4],
"circle-stroke-opacity": ["coalesce", ["get", "style:stroke-opacity"], 0.8],
"circle-opacity": ["coalesce", ["get", "style:fill-opacity"], 0.6],
"fill-color": ["coalesce", ["get", "style:fill-color"], "#fec44f"],
"fill-opacity": ["coalesce", ["get", "style:fill-opacity"], 0.6],
"line-color": ["coalesce", ["get", "style:stroke-color"], "#d95f0e"],
Expand Down Expand Up @@ -53,6 +56,9 @@
<property name="style:stroke-width"
label="Stroke size" type="range" min="0" max="10" default="4" />

<property name="style:circle-radius"
label="Point size" type="range" min="2" max="25" default="4" />

<property name="style:stroke-opacity"
label="Stroke opacity" type="range"
min="0" max="1" step="0.1" default="0.8" />
Expand Down

0 comments on commit ed2ef85

Please sign in to comment.