Skip to content

Commit

Permalink
bugfix(Feature2Texture): prevent drawing points if they lack style
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie committed Oct 20, 2022
1 parent 826b5bd commit 5706e6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Converter/Feature2Texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ function drawFeature(ctx, feature, extent, style, invCtxScale) {
const contextStyle = (geometry.properties.style || style).drawingStylefromContext(context);

if (contextStyle) {
if (feature.type === FEATURE_TYPES.POINT) {
if (
feature.type === FEATURE_TYPES.POINT
&& contextStyle.point
) {
// cross multiplication to know in the extent system the real size of
// the point
const px = (Math.round(contextStyle.point.radius * invCtxScale) || 3 * invCtxScale) * scaleRadius;
Expand Down

0 comments on commit 5706e6f

Please sign in to comment.