Skip to content
Discussion options

You must be logged in to vote

First, I think you want something like this for the filter:

['all', 
  ['==', 'geometry-type', 'Point'],
  ['==', ['get', 'prop'], value]
]

References for those items in the mapbox docs (which are the same in maplibre)

To your questions:

  1. Yeah, it's using the Marker internally which expects you to provide your own content in the slot. Otherwise you end up with an empty div. We could probably check $$slots.default to see if content is provided, and use DefaultMarker instead if none is provided.
  2. I think it doesn't, it will calculate the centroid instead and place a single marker. Sounds like a good idea though.
  3. I don't think there's a simple way to do it. Something could…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MarkR-triad
Comment options

@dimfeld
Comment options

Answer selected by MarkR-triad
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