Home Ask Login Register

Developers Planet

Your answer is one click away!

user2836345 February 2016

Add text under markers in mapbox ios

I'm using Mapbox SDK in my iOS app (using Swift). I want a label to show under every marker like this:

enter image description here

I couldn't find anywhere in the docs or on stackoverflow how I can achieve that. I tried to make the text a part of the marker image, but the text does not resize itself that way and things are a mess when markers are close (or when you zoom out).

Does anybody know how I can make that happen?


friedbunny February 2016

Right now, you'll want to do this at the GL style level using Mapbox Studio — not as dynamic annotations.

Doing it in the style allows labels to be recalculated and customized based on the surrounding data and map state, whereas annotations currently aren't as customizable.

Post Status

Asked in February 2016
Viewed 2,851 times
Voted 11
Answered 1 times


Leave an answer

Quote of the day: live life