I always had issues using the default implementations for billboards and such, but I was able to work around that by computing the billboard rotation and such manually in world space. My assumption is that, while the camera has a proper projection set up with the help of MapLibre, the vertex shaders are missing some attributes to work correctly.
Now I am looking into using GreasedLines to add lines to the scenes, and I have no idea how to use the fantastic options of GreasedLines with MapLibre. I am wondering if somebody has some information on how to approach it.
Thanks a bunch!
Stefan
The image show how the greased line is not oriented to the camera.
Hi Roland! Yes, the context and scene maintained by MapLibre is passed into the render function.
This code from the sample shows all that is currently being done to render the scene:
You view matrix is incorrect, it is not updated. I use Google Maps WebGLOverlay to draw my stuff over Google maps and I had the same issue. Do you have access to the center, tilt and rotation of the map? If so, you can position your camera correctly thus getting a correct view matrix which is needed to render GreasedLines correctly.