AliFlux / VectorTileRenderer

A comprehensive Vector Map Tile Renderer for .Net/C#
MIT License
183 stars 51 forks source link

Street Names #7

Open kaddrison opened 5 years ago

kaddrison commented 5 years ago

Using a MBtile file (UK) via Tileserver GL I get street names

Trying using the same style file and the same MBtile file with Vector Tile Render I dont get street names See below image image

Is there anything I'm missing

Also can more than one layer be added - I have a MBTile with some buildings on it - can this be displayed at the same time

charlenni commented 5 years ago

Perhaps I could answer instead of @AliFlux .

This project isn't complete. The easier part of rendering a map are streets and areas. They should always be drawn. An other thing is drawing of street names, town names and places. They are drawn by importance. You have to get all this text, not only from the tile to render, but for all tiles surrounding this tile. Than you have to sort this text by importance and start to draw the most important one. Than check, if there is enough room to draw the second most important. If yes, than draw it. And so on. This isn't an easy process.

If you could display more than one layer depends on your map library.

AliFlux commented 5 years ago

@charlenni is right. Displaying street names on a map is pretty complicated.

One other reason why this feature was disabled is because SkiaSharp doesn't correctly handle text that is bent along a path. It's also specified in the readme:

The text on lines/roads is intentionally disabled due to rendering issues with SkiaSharp.

However, you can enable the street names via commenting this line in SkiaCanvas.cs.

kaddrison commented 5 years ago

Thanks for that - I see what you mean - can do without

Can't seem to get a second layer on - one I have drawn with some buildings on - can you recommend any software to make a layer / how to display ?

charlenni commented 5 years ago

Look into Mapsui. Should do, what you want.

ftballguy45 commented 3 years ago

So will this project never support street names, etc?

AliFlux commented 3 years ago

I have written an algorithm to figure out if SkiaSharp would draw street names correctly or not, so far it works fine in most cases. That is why I have enabled the street names

kezara commented 2 years ago

I tried this version with names enabled, but not every street has a name, even some main roads are w/o name...could you please give any hint how to fix this?

edit: I noted that some names are upside down... just to mention, I worked with mbtiles made of serbia-latest.osm.pbf (downloaded from geofabrik) with tilemaker, all names are in cyrilic