Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyline crashes in rotatable 2D #4619

Closed
hpinkos opened this issue Nov 7, 2016 · 1 comment
Closed

Polyline crashes in rotatable 2D #4619

hpinkos opened this issue Nov 7, 2016 · 1 comment

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Nov 7, 2016

Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/VYusO_-raDQ

  1. Move the camera around in 3D for a little bit
  2. Switch to 2D
  3. Rotate the camera around for a while

This crash should happen within 30 or so seconds:

RangeError: Maximum call stack size exceeded
at createPotentiallyVisibleSet (http://cesiumjs.org/Cesium/Source/Scene/Scene.js:1260:41)
at createPotentiallyVisibleSet (http://cesiumjs.org/Cesium/Source/Scene/Scene.js:1407:13)

var viewer = new Cesium.Viewer('cesiumContainer', {
    mapMode2D: Cesium.MapMode2D.ROTATE
});

viewer.entities.add({
    polyline: {
        positions: Cesium.Cartesian3.fromDegreesArrayHeights([-75.4627181, 45.524289, 3958, -75.4635136, 45.5295842, 3954, -75.464534, 45.5347732, 3934, -75.4646561, 45.535289, 3932, -75.4647847, 45.5358073, 3929, -75.4649045, 45.5363146, 3927, -75.4650264, 45.5368254, 3926, -75.4651527, 45.5373319, 3924, -75.4652834, 45.5378344, 3924, -75.4654175, 45.5383352, 3924, -75.465556, 45.5388336, 3923, -75.4657034, 45.5393301, 3924, -75.4658628, 45.5398213, 3926]),
        width: 1,
        material: Cesium.Color.RED
    }
});
viewer.entities.add({
    polyline: {
        positions: Cesium.Cartesian3.fromDegreesArrayHeights([-75.4741781, 45.51729, 3020, -75.4748893, 45.5173451, 2980, -75.4755844, 45.5174227, 2951, -75.4762554, 45.5175152, 2928, -75.476902, 45.5175888, 2908, -75.4775185, 45.5176424, 2891, -75.4781004, 45.5176831, 2877, -75.4786469, 45.5177198, 2865, -75.4791591, 45.5177593, 2852, -75.4796424, 45.5178019, 2840, -75.480101, 45.5178417, 2826, -75.4805371, 45.5178802, 2811, -75.4809562, 45.5179197, 2794, -75.4813618, 45.5179583, 2776, -75.481761, 45.517994, 2756, -75.4821581, 45.5180282, 2736, -75.4825616, 45.5180568, 2714, -75.4829718, 45.5180765, 2693, -75.483389, 45.51809, 2671, -75.4838114, 45.5180948, 2650, -75.4842375, 45.518095, 2629, -75.4846652, 45.5180911, 2608, -75.4850936, 45.5180824, 2587, -75.4855187, 45.518067, 2568, -75.4859409, 45.518047, 2548, -75.4863628, 45.5180269, 2528, -75.4867812, 45.5180076, 2508, -75.487199, 45.5179934, 2488, -75.4876179, 45.5179868, 2467, -75.4880399, 45.5179896, 2447, -75.4884659, 45.518002, 2427, -75.4888971, 45.5180222, 2406, -75.489331, 45.5180433, 2386, -75.4897688, 45.5180619, 2366, -75.4902103, 45.5180758, 2346, -75.4906543, 45.5180834, 2326, -75.4910953, 45.5180873, 2307, -75.4915321, 45.518089, 2288, -75.4919665, 45.5180901, 2269, -75.4923977, 45.5180902, 2250, -75.4928244, 45.5180939, 2232, -75.4932497, 45.5181082, 2212, -75.4936745, 45.5181356, 2193, -75.4940985, 45.5181661, 2174, -75.4945198, 45.5181939, 2155, -75.4949379, 45.5182183, 2136, -75.4953523, 45.5182385, 2117, -75.4957639, 45.5182553, 2099, -75.4961737, 45.5182728, 2080, -75.49658, 45.5182905, 2061, -75.4969839, 45.5183063, 2043, -75.4973895, 45.5183204, 2024, -75.4977956, 45.5183346, 2005]),
        width: 1,
        material:  Cesium.Color.RED
    },
});


viewer.zoomTo(viewer.entities);
viewer.scene.morphComplete.addEventListener(function () {
    viewer.zoomTo(viewer.entities);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant