opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
238 stars 176 forks source link

Building just show at zoom 17 #69

Open apachemaven opened 10 years ago

apachemaven commented 10 years ago

OsmJsonMapActivity from `vtm-android-example'.

The building just show at zoom 17, while I say 'show' I mean the 3d effect.

But when zoom in to 18+, the building will disappear.

Screenshot:http://pbrd.co/RSyXHd

Is this intented?

hjanetzek commented 10 years ago

If I recall correct zoom 17 for extruded buildings is hardcoded in ExtrusionRenderer and there should also be a comment that this class needs be generalized :)

hjanetzek commented 10 years ago

no.. 17 is hardcoded in BuildingsLayer. Do you really need to serve tiles at z18? I rather plan to only go up to maybe 15 for our tiles and derive the higher zoom tiles to avoid redundancy

apachemaven commented 10 years ago

Yes, but I thought the 17 is the min-zoom:

private final static int MIN_ZOOM = 17;

So I am surprised why it does not work at zoom 17 +.

And for tiles, we plan to server tiles to 19+ :(

hjanetzek commented 10 years ago

Should not be hard to modify ExtrusionRenderer to compile tiles with higher zoomlevels. Though I would suggest to use a separate tileset for the buildings instead that you serve at for only one zoomlevel unless you plan to provide different building LODs.

apachemaven commented 10 years ago

I just have a look at the codes at ExtrusionRender, and I found that I am not exactly sure the logic of it since I found this line:

https://github.com/opensciencemap/vtm/blob/master/vtm/src/org/oscim/renderer/ExtrusionRenderer.java#L140

It seems that the render have consider the situation of zoom level 17+1(18) and 17-1(16), but I do not find out why the building does not show.