Skip to content
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

add preferredFramesPerSecond support #3627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

knowbody
Copy link

Description

Added support for preferredFramesPerSecond property in both iOS and Android, which allows developers to set the preferred frame rate for rendering the MapView. This feature is especially useful for optimizing performance and battery usage by adjusting the frame rate dynamically.

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

N/A

Component to reproduce the issue you're fixing

<MapView
  preferredFramesPerSecond={30}
  style={{ flex: 1 }}
/>

Copy link
Contributor

@mfazekas mfazekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knowbody thanks looks nice, I think we need to add them to MapViewSpec so it works with new arch as well

@knowbody
Copy link
Author

would you be able to help me or point me in the right direction on how/where to do it?

@mfazekas
Copy link
Contributor

mfazekas commented Sep 19, 2024

would you be able to help me or point me in the right direction on how/where to do it?

Sure. First you have to add to:

export interface NativeProps extends ViewProps {
attributionEnabled?: OptionalProp<boolean>;
attributionPosition?: UnsafeMixed<any>;

Then run yarn generate to update java interfaces for old arch.
Then you need to add to a few places. Search for an existing property like:

compassFadeWhenNorth:

compassFadeWhenNorth?: OptionalProp<boolean>;

And add where it is.

@mfazekas
Copy link
Contributor

mfazekas commented Oct 6, 2024

@knowbody what's the status on this? Do you need help to move it forward?

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.

2 participants