Hi all!
1. A concise explanation of the problem you're experiencing.
I am trying to draw a PolyLineCollection of about 30 lines to a 2D Scene with a WebMercatorProjection, and getting the following error:
Cesium.js:221938 An error occurred while rendering. Rendering has stopped.
undefined
TypeError: Cannot read property 'search' of undefined
TypeError: Cannot read property 'search' of undefined
at PolylineBucket.updateShader (http://localhost:8080/js/lib/cesium/Build/CesiumUnminified/Cesium.js:141653:39)
at createVertexArrays (http://localhost:8080/js/lib/cesium/Build/CesiumUnminified/Cesium.js:141300:24)
at PolylineCollection.update (http://localhost:8080/js/lib/cesium/Build/CesiumUnminified/Cesium.js:140947:13) ... trace continues
The problem is the material's shaderSource property is undefined. The error occurs after the lines have been added, upon the next render call.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I am trying to implement a dynamic graticule for our web app. Since it uses the 2D mode exclusively, it is reasonably easy to pick the correct scale based on what the camera's frustum can see. (3D support may come someday).
4. The Cesium version you're using, your operating system and browser.
I'm using Cesium version 1.36, Chrome Version 60.0.3112.90 (Official Build) (32-bit), and Windows 10 64-bit.