Skip to content

Commit

Permalink
docs: Fix docs on marker stroke width
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Nov 18, 2024
1 parent 6ec6fcd commit 488ce9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/markerFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var pointFeature = require('./pointFeature');
* @property {number|function} [strokeOffset=-1] The position of the stroke
* compared to the radius. This can only be -1, 0, or 1 (the sign of the
* value is used).
* @property {boolean|function} [radiusIncludeStroke=true] If truthy or
* @property {boolean|function} [radiusIncludesStroke=true] If truthy or
* undefined, the `radius` includes the `strokeWidth` based on the
* `strokeOffset`. If defined and falsy, the radius does not include the
* `strokeWidth`.
Expand Down
6 changes: 4 additions & 2 deletions tutorials/marker/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ block mainTutorial
- `symbolValue`: a number that modifies how the symbol appears, usually in the range of [0, 1]. This is often the ratio of the minor axis of the symbol to its major axis. For `triangle`, it is the length of the base side compared to the identical sides.
- `rotation`: the rotation in radians.
- `rotateWithMap`: a boolean; if true, the symbol rotates when the map is rotated. If false, it remains in the same orientation on the screen.
- `radius`: in pixels. This includes the stroke width, if any.
- `radius`: in pixels. Depending on `strokeOffset` and `radiusIncludesStroke`, this can include half or all of the stroke width.
- `radiusIncludesStroke`: if truthy or undefined, the `radius` includes the `strokeWidth` based on the `strokeOffset`. If defined and falsy, the radius does not include the `strokeWidth`; set this to `false` if `scaleWithZoom` is set to `"fill"`.
- `strokeWidth`: the width of the stroke around the symbol in pixels.
- `scaleWithZoom`: one of the values defined in `geo.markerFeature.scaleModes`. If `none`, the symbols remains the same size when the map is zoomed. This can also be `fill`, `stroke`, or `all`, in which case the symbol will change size when the map is zoomed. The `radius` and `strokeWidth` are in pixels at zoom level 0.
- `strokeOffset`: the position of the stroke compared to the radius. This can only be -1 (inside), 0 (centered at the radius), or 1 (outside).
- `scaleWithZoom`: one of the values defined in `geo.markerFeature.scaleModes`. If `none`, the symbols remains the same size when the map is zoomed. This can also be `fill`, `stroke`, or `all`, in which case the symbol will change size when the map is zoomed. If scaling with zoom, the `radius` and `strokeWidth` are in pixels at zoom level 0.
- `fillColor`
- `fillOpacity`
- `strokeColor`
Expand Down

0 comments on commit 488ce9b

Please sign in to comment.