tentone / geo-three

Tile based geographic world map visualization library for threejs
https://tentone.github.io/geo-three/docs/
MIT License
699 stars 112 forks source link

Fix for maxZoom in subdivide when height provider is not defined #33

Closed Avnerus closed 2 years ago

Avnerus commented 2 years ago

Hi! Thank you for this great library. I encountered the following error when not using a height provider:

MapNode.ts:171 Uncaught TypeError: Cannot read properties of null (reading 'maxZoom')
    at MapPlaneNode.subdivide (MapNode.ts:171:87)
    at LODRaycast.updateLOD (LODRaycast.ts:86:10)
    at MapView.onBeforeRender (MapView.ts:106:12)
    at renderObject (three.js:15763:12)
    at renderObjects (three.js:15758:9)
    at renderScene (three.js:15722:7)
    at WebGLRenderer.render (three.js:15621:7)
    at render ((index):102:16)

This is how I was able to get around it.

tentone commented 2 years ago

Thanks a lot for this fix in the library!

Cheers