mapbox / mapbox/mapbox-maps-flutter
SDF image and PointAnnotation
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to add an SDF image using:
```
Uint8List _markerSdf = (await rootBundle.load('assets/map/marker_sdf.png')).buffer.asUint8List();
PointAnnotationOptions(
geometry: geometry,
iconSize: 1,
iconOffset: [0, 4],
symbolSortKey: 10,
image: _markerSdf,
iconColor: Colors.red.value,
iconOpacity: 255,
iconHaloColor: Colors.black.value,
iconHaloWidth: .5,
iconAnchor: IconAnchor.BOTTOM,
)
```
... but the colors aren't working, I'm getting a blurry white image in the shape of my icon. Is there something else I need to do to make this work?

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PointAnnotationOptions and the loaded marker_sdf.png asset, focusing on how the image, iconColor, iconOpacity, and halo options are expected to interact. Reproduce the provided Flutter example and compare the result with the SDF image requirements; done means identifying whether the behavior is supported and documenting or validating the required usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100