Skip to content

implement rotateBy by specifying an angle in degree#4417

Open
Murmele wants to merge 2 commits into
maplibre:mainfrom
Murmele:rotate_by
Open

implement rotateBy by specifying an angle in degree#4417
Murmele wants to merge 2 commits into
maplibre:mainfrom
Murmele:rotate_by

Conversation

@Murmele

@Murmele Murmele commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

The idea is that you can rotate the map using the scroll wheel of the mouse.

@github-actions github-actions Bot added the core Changes that affect the C++ core of MapLibre Native label Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0% +5.61Ki  +0.0%   +1008    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-4417-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +54% +62.9Mi  +471% +28.1Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-4417-compared-to-legacy.txt

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results ⚡

Benchmark                                                          Time             CPU      Time Old      Time New       CPU Old       CPU New
-----------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                                 -0.0059         -0.0056             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-4417-compared-to-main.txt

@github-actions

Copy link
Copy Markdown
Contributor

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-4417-compared-to-main.txt

@louwers

louwers commented Jul 20, 2026

Copy link
Copy Markdown
Member

Please provide more context and what you expect this to do and why you need this.

Right now, positive values can sometimes rotate clockwise or counterclockwise. Is this what you intended?

@Murmele

Murmele commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Please provide more context and what you expect this to do and why you need this.

Right now, positive values can sometimes rotate clockwise or counterclockwise. Is this what you intended?

I added the reason to the description. It shall be able to rotate the map using the mouse wheel. What do you mean by "can sometimes rotate clockwise or counterclockwise"?

Comment thread src/mbgl/map/transform.cpp Outdated
@louwers

louwers commented Jul 21, 2026

Copy link
Copy Markdown
Member

@Murmele easeTo uses the shortest distance, so If you do rotateBy(270) it will rotate 90 degrees counterclockwise. Also rotateBy(360) will not rotate at all.

But yes, if you jump small amount with a scroll wheel, then it will do what you expect.

If you can add some tests we can merge this I think.

Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
@Murmele

Murmele commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. Yes I will add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes that affect the C++ core of MapLibre Native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants