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

[map] Expose presentsWithTransaction inside RenderOptions #94

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

nishant-karajgikar
Copy link
Contributor

@nishant-karajgikar nishant-karajgikar commented Feb 10, 2021

PRs must be submitted under the terms of our Contributor License Agreement CLA.

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Document any changes to public APIs.
  • Apply changelog label ('breaking change', 'bug πŸͺ²', 'build', 'docs', 'feature 🍏', 'performance ⚑', 'testing πŸ’―') or use the label 'skip changelog'
  • Add an entry inside this element for inclusion in the mapbox-maps-ios changelog: <changelog>Expose presentsWithTransactionproperty to better synchronize UIKit elements with theMapView.</changelog>.

Summary of changes

This PR exposes the presentsWithTransaction property of the underlying metalView that is being used to render the map.

Additionally, it moves all rendering-related options into a new RenderOptions struct which follows the same semantics as the other configuration options.

User impact (optional)

Use the mapView.update method to update the render options like so:

mapView.update{ mapOptions in
    mapOptions.render.presentsWithTransaction = true
}

@nishant-karajgikar nishant-karajgikar self-assigned this Feb 10, 2021
@nishant-karajgikar nishant-karajgikar added the feature 🍏 When working on a new feature or feature enhancement label Feb 10, 2021
Copy link
Contributor

@julianrex julianrex left a comment

Choose a reason for hiding this comment

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

πŸ‘πŸ»


// Set prefetch zoom delta
let defaultPrefetchZoomDelta: UInt8 = 4
try! self.__map.setPrefetchZoomDeltaForDelta(self.mapOptions.prefetchesTiles ? defaultPrefetchZoomDelta : 0)
try! self.__map.setPrefetchZoomDeltaForDelta(renderOptions.prefetchesTiles ? defaultPrefetchZoomDelta : 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder to self: we should just support an arbitrary zoom delta here.

@nishant-karajgikar nishant-karajgikar merged commit 25a55fc into main Feb 11, 2021
@nishant-karajgikar nishant-karajgikar deleted the nishantk/presents-with-transaction branch February 11, 2021 21:16
persidskiy pushed a commit that referenced this pull request Feb 24, 2023
* Make default modelScaleMode of Puck3D to ModelScaleMode.viewport.
- Remove implemetation of applying default modelScale expression.
* Apply default modelScale to [10, 10, 10]

Co-authored-by: Mai Mai <mai.mai@mapbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🍏 When working on a new feature or feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants