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

Split out style from LocationSupportableMapView #352

Merged
merged 6 commits into from
May 17, 2021

Conversation

julianrex
Copy link
Contributor

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

Fixes: < Link to related issues that will be fixed by this pull request, if they exist >

Pull request checklist:

  • Briefly describe the changes in this PR.
  • 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>Removed style from LocationSupportableMapView</changelog>.
  • Update the migration guide, API Docs, Markdown files - Readme, Developing, etc

Summary of changes

This removes LocationSupportableMapView.style, moving it to a new LocationStyleDelegate (naming mirroring AnnotationStyleDelegate.

This is a prelude to being able to move Style from MapView to MapboxMap.

@julianrex julianrex added the breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published label May 13, 2021
@julianrex julianrex enabled auto-merge (squash) May 13, 2021 22:05
@julianrex julianrex mentioned this pull request May 14, 2021
7 tasks
@julianrex julianrex disabled auto-merge May 14, 2021 17:13
@julianrex julianrex force-pushed the jrex/split-out-location-style branch from 7abf192 to a8f7973 Compare May 17, 2021 14:31
@julianrex julianrex changed the base branch from main to jrex/layerPosition May 17, 2021 14:32
@nishant-karajgikar
Copy link
Contributor

Hmm it feels like LocationSupportableMapView is basically obsolete?

This is what locationSupportableMapView currently has:

public protocol LocationSupportableMapView: UIView {

    /// Matching the style property in `MapView`
    var style: Style! { get }

    /// Returns the screen coordinate for a given location coordinate (lat-long)
    func screenCoordinate(for locationCoordinate: CLLocationCoordinate2D) -> ScreenCoordinate

    /// Allows the `LocationSupportableMapView` to subscribe to a delegate
    func subscribeRenderFrameHandler(_ handler: @escaping (MapboxCoreMaps.Event) -> Void)

    /// Allows the `LocationSupportableMapView` to subscrive to a delegate function and handle style change events
    func subscribeStyleChangeHandler(_ handler: @escaping (MapboxCoreMaps.Event) -> Void)

    /// Gets meters per point at latitude for calculating accuracy ring
    func metersPerPointAtLatitude(latitude: CLLocationDegrees) -> CLLocationDistance

}

All these properties will soon be available on mapboxMap (if not alread -- like the event api)..

@julianrex
Copy link
Contributor Author

@nishant-karajgikar Yes, I think it will soon disappear, or mutate.

Base automatically changed from jrex/layerPosition to main May 17, 2021 18:09
@julianrex julianrex force-pushed the jrex/split-out-location-style branch from a8f7973 to dce1e43 Compare May 17, 2021 18:14
@julianrex julianrex enabled auto-merge (squash) May 17, 2021 18:22
@julianrex julianrex merged commit 90e2dfb into main May 17, 2021
@julianrex julianrex deleted the jrex/split-out-location-style branch May 17, 2021 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants