mapbox / mapbox/mapbox-maps-flutter

Is there a way to show different marker-point pictures within one cluster layer when use clusters scheme?

Open
#652 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

mapbox_maps_flutter: ^2.1.0
Flutter 3.22.2

I wonder if there any way on how can I render point markers with custom pictures when use clusters scheme.
According to your "cluster" [ documentation ](https://docs.mapbox.com/mapbox-gl-js/example/cluster/) I see that I can add only one collection of points inside one layer and I can attach a cluster view (a circle for instance) and an "unclustered" view to this particular layer. In order to show exactly a custom picture from local source as an "unclustered" view I can assing a picture to this layer and this picture attaches to the all "unclustered" points and this applies to the whole layer.
Throughout all your [documentation](https://docs.mapbox.com/mapbox-gl-js/example/cluster/) I did not find any way on how to assing a custom picture to the particular point to be shown within a one clustered layer.

I want to point that I've already tried to use different layers to use different "unclustered" pictures where I had to use different points collections, but in this case I faced a different clusters views stacked on each other and this looks ugly and user experience is the worst. Here is my [code](https://gist.github.com/fufylev/cd85d8fded9bbd056f7a5f0a830e0385)

In order to clarify my thoughts here is a [gist](https://gist.github.com/fufylev/eef6074b70972995928df582600c5cdc) on how it is implemented in the Yandex [map-kit](https://pub.dev/packages/yandex_mapkit) in my other project. Everything is clear and very easy to use. No any JSON or dynamic object with totally unclear to programmers parematers.

Here is how we desire that this looks like

Снимок экрана 2024-08-14 в 10 21 00

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the cluster documentation and the two linked gists, then trace how mapbox_maps_flutter exposes clustered and unclustered point layers. Done means determining whether one clustered layer can display distinct images per unclustered point and, if not, defining the API change needed to support that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.