Closed treant-prime closed 4 years ago
You would need to triangulate objects from GeoJSON. This is done for example in WebGL version of OSM Buildings. See https://github.com/OSMBuildings/OSMBuildings/tree/master/src/triangulate If too complicated for your needs, an OSM source providing OBJ files might be better fit.
I've learned how to calculate proper coordinates from long and lat. I've also managed to download proper Mapbox tile from these coordinates (example http://a.tiles.mapbox.com/v3/osmbuildings.kbpalbpk/16/36308/21713.png).
But I still have CORS Policy warning. I can't download any JSON to work with. What can I do to avoid CORS policy warning?
Simply: put it on a web server :-) Can be a any localhost.
Hi, I'm still working on rendering 3D city based on GeoJSON data.
Here is what I've managed to render form MAPZEN geoJSON:
I would like to do the same thing with OSMB since your JSONs are similar in structure.
Unfortunately I still have problem with CORS policy (even after putting project on server). I'm using your codepen example http://codepen.io/osmbuildings/pen/avXGJy. http://a.data.osmbuildings.org/0.2/uejws863/tile/16/35210/21492.json
Should I use other url, with proper key?
Use key anonymous
instead.
@treant-prime I would like to ask you how to import the geojson data to babylon and use it as a ground?
I'm trying to render a city in Babylon JS. Babylon uses WebGL engine too.
Values returned by GeoJSON are not readable by Babylon JS. Is there any way i can use coordinates form OSMBuildings to represent them as Babylon JS objects?