Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Reimplement MGLAnnotation atop MGLSource and MGLStyleLayer #6181

@1ec5

Description

@1ec5

The runtime styling API is in many ways more powerful than the MapKit-inspired annotation API, which consists of MGLAnnotation subclasses and styling methods on MGLMapViewDelegate. However, at least at the SDK level, the annotation API needs to stick around in some form to service annotation views, and having a MapKit-like, highly object-oriented API is desirable where feasible, because it’s more direct, focused, and discoverable than the runtime styling API. But over time, we should allow the runtime styling API to subsume the annotation API. Developers should be able to think of the annotation API as nothing more than a shortcut for runtime styling functionality, rather than an entirely separate code path.

As an alternative to or as part of #1734, we could migrate the SDK’s annotation API to MGLSource and MGLStyleLayer. MGLSource is basically a level of indirection around MGLAnnotation and subclasses. MGLStyleLayer serves essentially the same purpose as MKOverlayRenderer.

Per #5626 (comment) et seq., this work is blocked by:

This work would be complicated by:

/cc @incanus @jfirebaugh @frederoni @boundsj

Metadata

Metadata

Assignees

No one assigned

    Labels

    annotationsAnnotations on iOS and macOS or markers on AndroidarchivedArchived because of inactivitygl-iosiOSMapbox Maps SDK for iOSmacOSMapbox Maps SDK for macOSrefactorruntime styling

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions