Skip to content

How to Set Circle Sizes in Meters #205

Answered by dimfeld
BramLeisink asked this question in Q&A
Discussion options

You must be logged in to vote

It's possible but not directly supported by Maplibre. I would recommend checking out this Stackoverflow thread and pick whichever solution looks best to you. That's for MapboxGL but all the same stuff applies here.

The two best solutions seem to be:

  • Use turf.circle or similar to generate a GeoJSON circle-ish polygon and display that instead
  • Set circle-radius to an interpolation expression that modifies the size based on the zoom level. If you do this, see the comment on that page that starts with "FYI, the stops syntax can now be replaced with an interpolation expression" since the stops syntax in the answer itself no longer works.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BramLeisink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants