TerriaJS / terriajs

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

Terria errors when using clipToRectangle on esri-MapServer when rectangle is outside area covered by layer #723

Open meh9 opened 9 years ago

meh9 commented 9 years ago

Example:

        {
          "name": "Rekt",
          "layers": "Australian_Bathymetry_Topography",
          "url": "http://www.ga.gov.au/gis/rest/services/marine_coastal/Australian_Bathymetry_Topography/MapServer",
          "type": "esri-mapServer",
          "clipToRectangle": true,
          "rectangle": [
            "5",
            "-5",
            "5",
            "-5"
          ]
        }
stevage commented 8 years ago

Test case

Stack trace:

TypeError: Cannot read property 'east' of undefined
TypeError: Cannot read property 'east' of undefined
    at Function.l.intersection (http://nationalmap.gov.au/build/nationalmap.js:33:8848)
    at V._createTileImagerySkeletons (http://nationalmap.gov.au/build/nationalmap.js:63:26018)
    at http://nationalmap.gov.au/build/nationalmap.js:156:30489
    at _.forEachLoadedTile (http://nationalmap.gov.au/build/nationalmap.js:160:18021)
    at G._onLayerAdded (http://nationalmap.gov.au/build/nationalmap.js:156:30457)
    at G._onLayerShownOrHidden (http://nationalmap.gov.au/build/nationalmap.js:156:31005)
    at n.raiseEvent (http://nationalmap.gov.au/build/nationalmap.js:32:4323)
    at c._update (http://nationalmap.gov.au/build/nationalmap.js:157:4731)
    at G.initialize (http://nationalmap.gov.au/build/nationalmap.js:156:27480)
    at _.beginFrame (http://nationalmap.gov.au/build/nationalmap.js:160:18545)
kring commented 8 years ago

The example above doesn't work anymore because the MapServer is no longer available, but the bug reported here is still a problem. Here's a new link to reproduce it: http://nationalmap.gov.au/#clean&https://gist.githubusercontent.com/kring/600bf12e9b724e3dafbcf958452839d5/raw/4fe9e4b0a9b21494f2ec7840b3fc783f09c6ea79/rekt.json

kring commented 6 years ago

Still a problem with the link above, in 3D only.