feat: add showGeojsonDataLabels prop#574
Merged
jessicamcinchak merged 1 commit intomainfrom Sep 8, 2025
Merged
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
DafyddLlyr
approved these changes
Sep 8, 2025
Contributor
DafyddLlyr
left a comment
There was a problem hiding this comment.
Working locally as expected, I'll keep an eye on repo for version bump 👍
When trying this out in the docs sandbox for this PR, I hit an error however. I'm using the following sandbox value -
<my-map
geojsonColor="#ff0000"
geojsonBuffer="10"
hideResetControl
staticMode
osVectorTilesApiKey=""
showGeojsonDataLabels
geojsonData={"type": "Feature","properties": {"label": "dafydd","color": "hotpink"},"geometry": {"type": "Polygon","coordinates": [[[-0.128307852848053, 51.50748361634746],[-0.1274388171272278, 51.50773069282454],[-0.12710085879135133, 51.507243216327],[-0.12802890311050416, 51.50705957656797],[-0.128307852848053, 51.50748361634746]]]}}
/>This throws the following error and does not display the map -
I suspect this is just an issue with the Pitsby sandbox as opposed to this PR, but just wanted to flag!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When rendering a static geojson
FeatureCollection(eg output bydrawMode+drawMany), we want the option to display feature labels! Labels will be "off" by default. Styles (label position, size, stroke & fill) match configs for the drawing vector layer.Examples for various


drawType: