Skip to content
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

inconsistent amenity / landuse/highway services name display #1118

Closed
dieterdreist opened this issue Nov 10, 2014 · 18 comments
Closed

inconsistent amenity / landuse/highway services name display #1118

dieterdreist opened this issue Nov 10, 2014 · 18 comments

Comments

@dieterdreist
Copy link

At this location the right POI (Chef Express) is shown in z17 hiding the name of the services area ("Magliana"): http://www.openstreetmap.org/#map=17/41.81916/12.40550
But at zoom 18 and 19 it is the contrary: http://www.openstreetmap.org/#map=18/41.81954/12.40551
(in z19 the other POI name is omitted in favor of "Magliana").
You can see by looking at the z17 for the other direction that the name of the services area would be displayed in z17 as well...

@matthijsmelissen
Copy link
Collaborator

Can't reproduce - the name 'Chef Express' does not appear at z17 for me.

@dieterdreist
Copy link
Author

2014-11-10 12:46 GMT+01:00 math1985 [email protected]:

Can't reproduce - the name 'Chef Express' does not appear at z17 for me.

maybe a caching issue (you may have gotten a tile from another tileserver,
I have just added these POIs 2 hours ago). This is the tile where I see the
name:
http://c.tile.openstreetmap.org/17/70052/48744.png
[image: http://c.tile.openstreetmap.org/17/70052/48744.png]

@dieterdreist
Copy link
Author

btw., now I also got to see the old tile (for the same address). You can
see that it is the old tile when you see only one coffee cup (cafe) instead
of 2 fast foods. Just reload until you get a recent version, it has to do
with the distributed tile servers...

@matthijsmelissen
Copy link
Collaborator

I see it now. The rendering order if: first icons from large to small areas, than text from large to small areas. On z17, the Magliana text cannot be rendered because it would overlap with the icon. The Chef Express text does fit as it is rendered slightly lower than the Magliana text. On z18, the Magliana text fits, but then the Chef Express text doesn't fit anymore.

Not sure if this is a bug?

@dieterdreist
Copy link
Author

2014-11-10 13:17 GMT+01:00 math1985 [email protected]:

I see it now. The rendering order if: first icons from large to small
areas, than text from large to small areas. On z17, the Magliana text
cannot be rendered because it would overlap with the icon. The Chef Express
text does fit as it is rendered slightly lower than the Magliana text. On
z18, the Magliana text fits, but then the Chef Express text doesn't fit
anymore.

Not sure if this is a bug?

IMHO we should enable flexible text positioning for areas bigger than x in
zoom y (i.e. zoom dependent label positioning flexibility). That way we
could ensure that important areas get their text rendered in zoom levels
like 17 or 18 while keeping text for POIs visible by rendering it first.

@matthijsmelissen
Copy link
Collaborator

Is there a way to accomplish that in Mapnik?

@matthijsmelissen
Copy link
Collaborator

That's actually #1069.

@dieterdreist
Copy link
Author

2014-11-11 1:32 GMT+01:00 math1985 [email protected]:

That's actually #1069
#1069.

This aside (which would be beneficial IMHO), we could also think of
reordering the rendering to have area names appear before POI icons (or
some POI icons). The current way produces strange results when zooming in
(like in this example).

@matkoniecz matkoniecz added this to the Bugs and improvements milestone Nov 30, 2014
@matthijsmelissen
Copy link
Collaborator

Hmm, I don't think hiding POI icons in order to render an area name is an improvement.

It's not clear here what the bug or solution is, so I will close this issue. I would be happy to discuss concrete solutions - feel free to create a new issue for them.

@dieterdreist
Copy link
Author

2014-12-08 19:17 GMT+01:00 math1985 [email protected]:

It's not clear here what the bug or solution is, so I will close this
issue.

using something like

placement-type="simple"
placements="N,S,E,W"

for the area-label would enable flexible positioning and could help in
many cases to get the label rendered...

@matthijsmelissen
Copy link
Collaborator

I tried but I didn't get that work. Not sure if it works for anyone else?

@dieterdreist
Copy link
Author

2014-12-17 17:45 GMT+01:00 math1985 [email protected]:

I tried but I didn't get that work. Not sure if it works for anyone else?

works for me on mapnik 2.2.0, but I am not using Carto but XML styles,
maybe that's the reason?

@matthijsmelissen
Copy link
Collaborator

works for me on mapnik 2.2.0, but I am not using Carto but XML styles, maybe that's the reason?

@dieterdreist Could you give me an XML style file that works? Carto generates XML styles, so in principle it shouldn't matter.

@pnorman
Copy link
Collaborator

pnorman commented Jan 26, 2015

@systemed, you know of a hacky way to get placements into CartoCSS, right?

@systemed
Copy link
Contributor

I do, but I stole it off @gravitystorm: mapbox/carto#238

@yohanboniface
Copy link

@math1985 Have you added the dx/dy properties too?

Here is an example that works: https://github.com/yohanboniface/transilien-network-carto/blob/master/style.mss#L129 in case it helps

@dieterdreist
Copy link
Author

2015-01-25 20:40 GMT+01:00 math1985 [email protected]:

works for me on mapnik 2.2.0, but I am not using Carto but XML styles,
maybe that's the reason?

@dieterdreist https://github.com/dieterdreist Could you give me an XML
style where this works? Carto generates XML styles, so in principle it
shouldn't matter.

sorry for replying late, I had overlooked this issue. I really don't do
anything special, this is an example:

    <Rule>
        <Filter>([place]='town')</Filter>
        &minscale_zoom14;
        &maxscale_zoom14;
        <TextSymbolizer fontset-name="bold-fonts" size="13"

fill="rgb(240,241,241)" wrap-width="20" placement-type="simple"
placements="N,E,S,W,NE,SE,NW,SW">[name]

@matkoniecz matkoniecz reopened this Feb 24, 2015
@matthijsmelissen
Copy link
Collaborator

Duplicate with #957 and #1069.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants