Skip to content

Conversation

@jessicamcinchak
Copy link
Member

When rendering a static geojson FeatureCollection (eg output by drawMode + 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:
Screenshot from 2025-09-08 16-01-13
Screenshot from 2025-09-08 16-02-14

@netlify
Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for oslmap ready!

Name Link
🔨 Latest commit e960653
🔍 Latest deploy log https://app.netlify.com/projects/oslmap/deploys/68bee354ed461600088040a3
😎 Deploy Preview https://deploy-preview-574--oslmap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jessicamcinchak jessicamcinchak requested a review from a team September 8, 2025 14:08
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -

Image

I suspect this is just an issue with the Pitsby sandbox as opposed to this PR, but just wanted to flag!

@jessicamcinchak jessicamcinchak merged commit 043b0f1 into main Sep 8, 2025
5 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/add-showGeojsonDataLabels-prop branch September 8, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants