alacarte-maps / alacarte

Renderer for OpenStreetMap tiles.
https://alacarte-maps.github.io/
Other
58 stars 18 forks source link

Implement text-offset MapCSS property #14

Closed AMDmi3 closed 11 years ago

TheMarex commented 11 years ago

Do you think the automatic label placement (where we move the labels around by a few pixels to reduce overlap) should be disabled if the offset was set manually? Also, do you think labels should automatically be placed below/above icons if they are set on the same node? How should the text-offset be handled in this case? Thanks for the contribution. :-)

AMDmi3 commented 11 years ago

I actually don't have much experience in map rendering/styles, so just my humble opinion:

Do you think the automatic label placement (where we move the labels around by a few pixels to reduce overlap) should be disabled if the offset was set manually?

I don't think so - there's no reason for offset label to be handled differently from unoffset one. In a sense, offset label has even less attachment to its base point so it may be moved around at least as freely.

Also, do you think labels should automatically be placed below/above icons if they are set on the same node?

Explicit is better than implicit, so no. I can also imagine semitransparent labels or specially designed icons (with top and bottom parts with a gap in between for the label) for which such behavior will be unwanted.

TheMarex commented 11 years ago

Hm, yes placing the label above icons automatically would probably make things much more confusing for users. (since the offset would not always have the same origin) In this case, your patch implements the feature correctly.

Just a side note, I tag my commits with the module it touches (e.g. with [renderer] when it was something rendering related). In a rather large an diverse code base it makes spotting changes easier.