Skip to content


CustomRenderMethod: (gl: WebGLRenderingContext | WebGL2RenderingContext, matrix: mat4) => void


Parameter Type Description
gl WebGLRenderingContext | WebGL2RenderingContext The map's gl context.
matrix mat4 The map's camera matrix. It projects spherical mercator coordinates to gl clip space coordinates. The spherical mercator coordinate [0, 0] represents the top left corner of the mercator world and [1, 1] represents the bottom right corner. When the renderingMode is "3d", the z coordinate is conformal. A box with identical x, y, and z lengths in mercator units would be rendered as a cube. MercatorCoordinate.fromLngLat can be used to project a LngLat to a mercator coordinate.



Defined in