-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
2.0.0 - text rendered in wrong place when using text-variable-anchor #341
Comments
Looks like it may be this change in uniform_binding.ts: - const emptyMat4 = new Float32Array(16);
- class UniformMatrix4f extends Uniform<Float32Array> {
+ const emptyMat4 = mat4.create();
+ class UniformMatrix4f extends Uniform<mat4> { Previously, emptyMat4 was filled with 0s; now it's an identity matrix. I haven't tracked down the code that's reading this value, but reverting this line seems to fix the issue. |
9 tasks
This is something that caught my eye too while reviewing, but I don't remember why I did resolve the conversation. |
HarelM
pushed a commit
that referenced
this issue
Sep 15, 2021
* Fix for uninitialized UniformMatrix4f UniformMatrix4f expects to be initialized with an all-zeros array, while mat4.create() creates an identity matrix. Subsequent calls to UniformMatrix4f.set with an identity matrix will become no-op as gl.uniformMatrix4fv won't be called. * Unit test for UniformMatrix4f Fixes #341
neodescis
pushed a commit
to neodescis/maplibre-gl-js
that referenced
this issue
Jan 12, 2025
* Alternative option * Improve agronomics, add test * Remove unwanted change
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
maplibre-gl-js version: 2.0.0+
browser: Chrome
Steps to Trigger Behavior
Using the debug page, start with the map zoomed to a point where no labels are showing. Add a symbol layer using text-variable-anchor.
This was working in 1.15.2
Link to Demonstration
Expected Behavior
Text should be shown below the icon, as the rendered collision box indicates.
Actual Behavior
No text below the icon.
It's actually drawn in the upper left corner of the map view.
Note that zooming out until another label is visible somehow kicks the control into working correctly. Can also call map.setLayoutProperty to remove and re-add the text-variable-anchor property to get it going. So it's just the initial load that's broken - failure to initialize some position information somewhere?
The text was updated successfully, but these errors were encountered: