Closed epicanriome closed 10 years ago
Hi, I'm glad you like the library. Thank you. As you are already hacking a bit, check constants.js, there is a MIN_ZOOM setting. You probably need to combine this with your MAX_HEIGHT changes.
Hey. I tried what you said but it didn't work. My buildings all disappear at zoom level 15. At level 20 all my buildings show up, at level 19 too. But for level 18 and smaller it seems like less and less buildings are built until level 15 where no buildings appear. I don't need to see them under level 15 but i want to see them all at superior levels. I can't find where you decide if you have to add a building depending on its height and the current zoom level.
Yes, that is where you need to tweak MIN_ZOOM and FlatBuildings.MAX_HEIGHT. MIN_ZOOM is generally the min zoom level from which buildings are drawn - reduce it. Then MAX_HEIGHT determines from which height on buildings are eleveted objects or just flat polygons (if below that threshold). The value is fixed but building height in screen pixels gets reduced by zooming out. Means: the further your are virtually away, the less detail is visible (better performance too). I can just assume, most of your builings have rather low heights. You should probably tweak this too. For further help I would need to see some running sample of your project.
[edit] corrected some awful typos
From level 15+ this should be working fine now.
Hi,
First i wanna say thanks for you awesome work. I use OSMBuildings as a plugin with Leaflet map. I use loadData method with my own database. It works well except that i want the buildings show up at smaller zoom levels. My buildings appear on the last two zoom levels but i want to see them before. I tried to change the MAX_HEIGHT on flatBuildings and it almost gave me what i need but only some of the buildings appear in 3d. I wanna know how to do this. Is there a way?