iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.1k stars 298 forks source link

Proposition : creation of a layer from an object #892

Closed hcaillau closed 5 years ago

hcaillau commented 5 years ago

Instead of :

buildings.source = { url: 'https://example.com/geosjon.json', protocol: 'file', projection: 'EPSG:4326', format: 'application/json', zoom: { min: 2, max: 2 } };

could be great to be able to do this :

buildings.source = { source : geojson, protocol : 'object', projection: 'EPSG:4326', zoom: { min: 2, max: 2 } };

where geojson is an object.

zarov commented 5 years ago

Yes, thanks for the proposition: we should indeed be able to load data without fetching it, but by providing it directly. That's basically a new type of source to add, if you want you could do it, I don't see too much work on this.

zarov commented 5 years ago

If you need something to work right now, you can patch iTowns using this commit https://github.com/zarov/itowns/commit/2dd057a3d7ee9e9f4a06d977d15de5cc38cd424f

It is a quick hack, but I don't want to have something like this to do until I'm done with the quick reorganization explained in #880

gchoqueux commented 5 years ago

@zarov it's added in #1033 ?

zarov commented 5 years ago

Yes, and we don't even have a new protocol or whatsoever

gchoqueux commented 5 years ago

resolved with #1033