kekscom / osmbuildings

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

Any documentation on "very basic OL3 support"? #92

Closed tomchadwin closed 8 years ago

tomchadwin commented 8 years ago

I've added the Leaflet code to qgis2web (https://github.com/tomchadwin/qgis2web), and it works brilliantly. I'm now trying to add support for qgis2web's OL3 output. I've used the OL3 JS file in /dist, but I'm getting an error.

Can anyone tell me what is possible/not possible with OL3, and how to do it?

tomchadwin commented 8 years ago

The error thrown is:

OSMBuildings-OL3.debug.js:2160:
TypeError: Cannot read property 'appendChild' of null(…)
kekscom commented 8 years ago

Looks like it can't append the OSM Buildings layer to some map container. Could you provide some demo environment in order to check?

tomchadwin commented 8 years ago

It's the output from qgis2web:

That gives the error above.

kekscom commented 8 years ago

Could you provide me a sample site with qgis2web output or could you share screen?

tomchadwin commented 8 years ago

I'll do an export and upload it somewhere. I'll see if I can also simplify it a bit. Share screen is an option - I'm in the UK, as far as timezone goes.

tomchadwin commented 8 years ago

Zip is here: https://github.com/tomchadwin/osmbuildings/blob/master/osmbuildings-ol3.zip

kekscom commented 8 years ago

:+1: Helps me to get the error. I'll check.

kekscom commented 8 years ago

I've added a fix. Please retry.

tomchadwin commented 8 years ago

Brilliant - that appears to have sorted it. Many thanks!

tomchadwin commented 8 years ago

This version is now used in qgis2web master, and on initial tests seems to work a treat. Thanks once again.

kekscom commented 8 years ago

You're welcome :-)