-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix density/pixelratio #3
Comments
When debugging I'm noticing a difference between width/height with flutter vs gl-native
If those values are used for h/w on flutter, the map is renders but the gestures do no correspond correctly |
Was this comment before or after your mapbox/mapbox-gl-native#11772 change? Currently code will not compile as it is dependent on that change being implemented upstream. FYI for anyone testing until that upstream change gets released just change:
|
do you think mapbox/mapbox-gl-native#11772 can be included into 6.1.0-snapshot? |
You need to get a fresh copy of the SNAPSHOT dependency, you can do a gradle command as
once a PR is merged to a release branch, we automatically build a new snapshot. |
No worries. Ill quickly fix my PR |
Finally got to the bottom of this: Flutter exposes 2 coordinate systems called local and global. You can convert between the two using box.globalToLocal and box.localToGlobal. These coordinate systems do not match what we expect on the map side (same input as on android), to support this we need to convert local to the expected pixel output using the device pixel ratio. This is needed when the map is created and when we receive inputs from the flutter framework (eg. gesture input). Due to limited flutter knowledge I'm going to punt on this for now, map renders at correct resolution and gestures work as expected. |
When running the project, it's noticable that labels are oversized:
The text was updated successfully, but these errors were encountered: