mapbox / mapbox/mapbox-annotation-extension
MGLSymbolStyleAnnotation not showing up
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 11
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
First of all, thanks for this great lib.
I am trying to display a MGLSymbolStyleAnnotation without success. I tried with the other StyleAnnotation like the Circle one and it's working perfectly.
Bellow my piece of test code:
```
MGLSymbolAnnotationController *symbolController = [[MGLSymbolAnnotationController alloc] initWithMapView:mapView];
MGLSymbolStyleAnnotation *symbolAnnotation = [[MGLSymbolStyleAnnotation alloc] initWithCoordinate:CLLocationCoordinate2DMake(46, 0)];
symbolAnnotation.text = @"TEST";
symbolAnnotation.textFontSize = 16;
symbolAnnotation.textHaloColor = UIColor.brownColor;
symbolAnnotation.textColor = UIColor.blueColor;
[symbolController addStyleAnnotation:symbolAnnotation];
```
There is no image attached to this Symbol but it's on purpose. I of course tried by attaching an image but same result, the annotation is not showing up. This piece of code is well located in the `didFinishLoadingStyle` callback.
Thank you in advance.
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 the MGLSymbolAnnotationController and MGLSymbolStyleAnnotation setup in the didFinishLoadingStyle callback, comparing it with the working Circle style annotation path. Verify the behavior with and without an image, and consider the issue resolved when the symbol's text or image renders on the map.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100