mapbox / mapbox-gl-style-spec

76 stars 38 forks source link

Text properties for circle types #426

Closed tristen closed 8 years ago

tristen commented 8 years ago

It would be great if the circle type also supported text properties like it's close cousin "symbol". I've often wanted to put centered text in a circle and in order to achieve this currently I need to create an svg circle, hard code it into a style and then paint a symbol property with it.

peterqliu commented 8 years ago

@tristen have you tried a symbol layer for the text, atop a circle layer for the circle?

tristen commented 8 years ago

Ah right, that's another technique. But still! creating two layers for this use-case is a little verbose and it's confusing if the layer also has interactive qualities to it.

jfirebaugh commented 8 years ago

This would almost certainly snowball into requiring support for all the properties and behaviors of symbol layers: collision / placement logic, font selection, offsets and justification, etc. We wouldn't want to implement all that twice, so we should basically consider this feature request as: "merge the symbol and circle layer types".

peterqliu commented 8 years ago

per chat, what if we folded circle into a symbol property? Each symbol can have text, image, and/or circle. Would keep things nice and DRY

jfirebaugh commented 8 years ago

I think we should keep the existing layer types.