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

ol.layer.VectorTile clips labels on tile boundary? #6275

Closed
aAXEe opened this issue Dec 17, 2016 · 4 comments
Closed

ol.layer.VectorTile clips labels on tile boundary? #6275

aAXEe opened this issue Dec 17, 2016 · 4 comments

Comments

@aAXEe
Copy link
Contributor

aAXEe commented Dec 17, 2016

I'm using Mapzen vector tiles for a map.
ol.layer.VectorTile clips my labels at the tile boundaries instead of drawing them completely:

grafik

Full example: https://jsfiddle.net/rn3qc4ca/

As the mapbox vector example is basically the same (and works as expected) I have no idea that the problem is.

Note: I am using the MVT format in the example. Using TopoJSON or GeoJSON results in the same problem.

This question might be about the same problem: http://stackoverflow.com/questions/40234804/ol3-geoserver-vector-tile-labels-gets-cropped/

@ahocevar
Copy link
Member

The Mapbox tiles in the mapbox-vector-tiles.html example repeat label points on neighbouring tiles with a dynamic buffer, depending on the expected label size. Mapzen tiles don't do that.

That said, the problem is with the tiles you are loading, not OpenLayers rendering them.

@aAXEe
Copy link
Contributor Author

aAXEe commented Dec 17, 2016

Thanks a lot for that description!

@pksorensen
Copy link
Contributor

I wrote my own tiling algorithm that creates vector tiles, but I fail to see how I should create the auxiliary label points.

Lets say I detect if they are close to the border, then i could create a label point in the tile next to it, but I dont see how I will ever get the styles to line up such the text from both tiles are drawn so they look like one label. ? can I read about this somewhere?

@pksorensen
Copy link
Contributor

sorry, I understand it now. The buffer of the tiles makes up for this. So the buffer should be large enough such the point is in the same location.

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

No branches or pull requests

3 participants