Skip to content

fix(example): round camera values shown in examples to stop screenshot jitter - #4428

Merged
mfazekas merged 1 commit into
mainfrom
fix/stable-example-numbers
Oct 29, 2026
Merged

mfazekas merged 1 commit into
mainfrom
fix/stable-example-numbers

Conversation

@mfazekas

Copy link
Copy Markdown
Contributor

Description

ShowRegionDidChange and GetCenter show raw floats, which differ in the last digits from run to run (e.g. 38.91023300000003 vs 38.91023300000005), so Percy reports a diff every nightly. These examples now round lat/lon to 6 decimals and zoom, heading and pitch to 2. GetZoom gets the same zoom rounding.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

Doc screenshots from two consecutive nightlies (runs 40619903692 and 40805332916) differ only in this text for ShowRegionDidChange (Latitude: 38.910233000000005 / Longitude: -77.03608599999998 vs 38.91023300000003 / -77.03608600000001). GetCenter currently shows Lng: -73.97089500000001, Lat: 40.723279000000026.

Component to reproduce the issue you're fixing

@mfazekas
mfazekas marked this pull request as ready for review October 29, 2026 16:24
@mfazekas
mfazekas merged commit 7dae91b into main Oct 29, 2026
10 checks passed
@mfazekas
mfazekas deleted the fix/stable-example-numbers branch October 29, 2026 16:24

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant