kekscom / osmbuildings

OSM Buildings Classic 2.5D
http://osmbuildings.org
BSD 2-Clause "Simplified" License
505 stars 140 forks source link

Custom load buildings ? #68

Closed iuliangcata closed 10 years ago

iuliangcata commented 10 years ago

Hi there,

I have a simple question, is it possible to obtain data for certain buildings and only represent those with this library (maybe from a file or json/geojson) ? I imagine the way the gps applications do with the most important monuments in the world capitals, but somehow applying the same concept here ...?

Thank you.

kekscom commented 10 years ago

Yes, totally possible. Use ´.set(GeoJSON)´ for that. Example: http://osmbuildings.org/examples/GeoJSON.php

iuliangcata commented 10 years ago

Ok, nice, but what does thoose coordinates represent ? Do they represent the building's foundation so to say (2d model) ? And does the library auto generates the height ?

kekscom commented 10 years ago

Exactly. If you have more complex objects, you'll need to create more geometries + heights. minHeight also helps you to stack objects. Check bottom most section 'Data' of README for supported GeoJSON properties: https://github.com/kekscom/osmbuildings/blob/master/README.md