question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[discussion] Camera + defaultSettings alternative

See original GitHub issue

I was wondering if we could re-think the use of defaultSettings added with https://github.com/react-native-mapbox-gl/maps/pull/132:

In a lot of cases we’d just want to define where the map camera should be initially and later we’d follow user’s location, or just let the user change camera, by pinch-zoom etc.

What if we track only the changes made on the <Camera /> positioning props (bounds, heading, pitch centerCoordinate , zoomLevel, padding etc) and only apply them initially + when the values change. That could still allow us to set the initial camera and enable followUserLocation. Any future interacted / imperative change to the camera are kept (and disables follow mode). Until the positioning props are updated, only then we modify the camera.

Maybe I don’t fully get the implications yet but I feel that the Camera API is currently somewhat confusing in this aspect.

Note: I’m not sure if this is the best way to start this discussion. I also considered commenting in the closed PR itself. Let me know if I should do it differently.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
alburdette619commented, Jul 8, 2019

If I could add, this is completely unclear as to how to use. I set the properties as they were with centerCoordinate and zoomLevel on the Camera and every load was zooming from Africa. Then I saw this and problem solved. I see what you’re going for here though, but why not just use the settings set initially on the component as the defaults?

0reactions
stale[bot]commented, Sep 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[discussion] Camera + defaultSettings alternative · Issue #200
I was wondering if we could re-think the use of defaultSettings added with #132: In a lot of cases we'd just want to...
Read more >
7 Key In-Camera SETTINGS You Should CHANGE Now ...
If you've never bothered to change the default settings on your ... and offers alternative choices for different styles of photography.
Read more >
Camera Default Settings Option - OnePlus Community
Currently, I don't know of any options for default settings on launch of the app. ... The modded Google Camera app is actually...
Read more >
Webcam alternatives for online test proctoring
Webcams for proctored tests may not always be readily available. Learn about some alternate methods for meeting the webcam requirement for proctored tests....
Read more >
How to change default camera app on an Android ... - Quora
Simply download a camera app from the play store. And just go to settings then about that application option. Click on it. Then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found