+ else {
+ // GL context can be lost at any time, handle that.
+ // See http://www.khronos.org/webgl/wiki/HandlingContextLost
+ gGLMapCanvas.addEventListener("webglcontextlost",
+ gMap.handleContextLost, false);
+ gGLMapCanvas.addEventListener("webglcontextrestored",
+ gMap.handleContextRestored, false);
+ }