Skip to content

Commit

Permalink
chore(web): stringify label text (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice authored Dec 1, 2023
1 parent 7aa3463 commit 17bcc69
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ export default function Marker({ property, id, isVisible, geometry, layer, featu
[property?.near, property?.far],
);

const stringLabelText = useMemo(() => String(labelText), [labelText]);

useEffect(() => {
requestRender?.();
});
Expand Down Expand Up @@ -205,7 +207,7 @@ export default function Marker({ property, id, isVisible, geometry, layer, featu
pixelOffset={pixelOffset}
fillColor={labelColorCesium}
font={toCSSFont(labelTypography, { fontSize: 30 })}
text={labelText}
text={stringLabelText}
showBackground={labelBackground}
backgroundColor={labelBackgroundColorCesium}
backgroundPadding={labelBackgroundPadding}
Expand Down

0 comments on commit 17bcc69

Please sign in to comment.