TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.16k stars 361 forks source link

3DTiles catalog items causing errors in 2D (Leaflet) mode #6303

Open staffordsmith83 opened 2 years ago

staffordsmith83 commented 2 years ago

First Issue

When loading a 3DTileset catalog item in 2D mode, if you click on Ideal Zoom there is an error and the spinners run indefinitely:

image

To replicate:

Uncaught TypeError: Cannot read properties of undefined (reading 'east')
    at Leaflet.doZoomTo (Leaflet.ts?fd81:488:1)
    at Leaflet.doZoomTo (Leaflet.ts?fd81:481:1)
    at Leaflet.zoomTo (GlobeOrMap.ts?17d2:81:1)
    at executeAction (mobx.module.js?daf9:951:1)
    at Leaflet.zoomTo (mobx.module.js?daf9:938:1)
    at ViewingControls.zoomTo (ViewingControls.tsx?3b95:215:1)
    at executeAction (mobx.module.js?daf9:951:1)
    at ViewingControls.zoomTo (mobx.module.js?daf9:938:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:188:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:237:1)

Second related issue

Pasted image 20220526105222
staffordsmith83 commented 2 years ago

E.g. To add a 3DTileset, add the following to the catalog array in TerriaMap/wwwroot/init/simple.json in TerriaMap:

{
  "type": "3d-tiles",
  "name": "Fort Denison",
  "url": "https://nsw.digitaltwin.terria.io/api/v0/data/a99c8280-dbfe-475a-8a4e-3c2d2ca87513/3dtiles/tileset.json",
  "id": "adsfsadfds"
},