-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tie POI names to icons #234
Comments
The traditional solution for this is to (ab)use shieldsymbolizers, to guarantee both text and image at the same time. Since my preferred hierarchy of preference is:
|
I honestly cannot recall this many detached names in the old style. Do you know if there were? I guess we now have z19, so the number of zoom levels that render shops has increased from 2 to 3. |
Maybe more shops are tagged so places with high density of POIs are more common? |
IMHO it is better to render only icon or only text rather than nothing. |
Does anyone have any suggestions on how to accomplish this? |
I think andy's solution is workable |
Wouldn't that cause the label from POI 1 to prevent the icon from POI 2 from rendering? I think icons should always have a higher priority than labels. |
Yes, I get the feeling that this has increased recently in my home area. And I don't think that there were many shops added. Right now, doctors begin to show up in the tiles, which is great. But this adds many more icons. Maybe the distance between icon and label (text-dy?) has been increased too much? Especially the generic shop dot is too far away with most Roman labels. Since we can't use a dynamic distance that follows the actual letters (or can we?), hopefully #957 will be possible somehow. It may reduce these "orphan" icons significantly. |
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
Noticed this happening to bus stops and memorials with names missing, example here: https://www.openstreetmap.org/node/502530719#map=17/55.95858/-3.20779 @nebulon42 hoping your PR will solve it :) |
Unfortunately, that's unlikely. My PR would solve labels without icons. At the link it looks like the bus stop label is blocked by the address. |
Am I mistaken or isn't that exactly what my link is, a bus stop label without an icon? 😕 What about this memorial without an icon then? https://www.openstreetmap.org/node/4725017784#map=17/56.05863/-3.23502 |
Hm, ok, I'm only seeing a bus icon without label on z18 but never mind. The memorial I see too. Yes, that should be solved by #2597. |
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
…s, a second pass of only icons fills up free space, dy was harmonized, restructuring of code to avoid repetition, fixes gravitystorm#234
We currently have no good way to accomplish this, so I am going to close this issue.
I agree. @springmeyer what do you think of this? I can imagine others struggle with the same problem so I think this would be nice to have in Mapnik. |
this is already available for a very long time: https://github.com/mapnik/mapnik/wiki/ShieldSymbolizer
sent from a phone
… On 8. May 2018, at 01:31, Matthijs Melissen ***@***.***> wrote:
We currently have no good way to accomplish this, so I am going to close this issue.
At that point though, I wonder whether it's better to introduce a new feature in mapnik to have a grouped-symbolizer with controllable characteristics.
I agree. @springmeyer what do you think of this? I can imagine others struggle with the same problem so I think this would be nice to have in Mapnik.
|
No, that is not what we need: shield symbolizers prevent rendering text without icon, however they also prevent rendering icons without text. We don't want the latter. |
I did already show that it is possible to have both in #2597. However, there is also a GroupSymbolizer in Mapnik 3, but someone would have to implement it for CartoCSS. |
sent from a phone
On 8. May 2018, at 03:01, Matthijs Melissen ***@***.***> wrote:
No, that is not what we need: shield symbolizers prevent rendering text without icon, however they also prevent rendering icons without text. We don't want the latter.
you could first try the shields and after that try just markers to fill up the gaps. Admittedly there is a performance penalty involved.
|
Is this penalty significant? |
#2597 was interesting. I've noticed this problem is particularly acute with aerodromes (airports) at low zoom levels in my area. The airport is often right next to the town, so the icon may be blocked by the name of the town, but the purple text label renders right below the town name. |
From #234 (comment):
I understand that would make icons with optional labels possible? Is there anybody willing to do that? |
If a POI icon conflicts with another label but not its text right now the text will be rendered without any icon. Examples have shown up in #232 and maybe #201 but I've seen it locally.
A simple example is
The restaurant text conflicts with the icon. Also, the text is not centered on the POI because it's offset to below to allow for an icon.
A more complex example is
AFG Kabul Bakery (
shop=bakery
) has its label rendered, but the icon conflicts with the icon for Zahra's Ultimate Hair Design (shop = hairdresser
). With the name it's fairly obvious what AFG Kabul Bakery is, but there's no icon to it.Oddly, it looks like the text for Zahra's Ultimate Hair Design conflicts with the AFG Kabul Bakery text.
It would be an improvement if the POI name was only rendered in conjunction with the icon, and if there wasn't room for the icon it didn't render either.
This will probably not impact rendered POI density significantly because in dense areas where this is an issue the blank space from removing the name will probably be taken up by another icon.
The text was updated successfully, but these errors were encountered: