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

[ios] Add platform annotation views #4801

Merged
merged 3 commits into from
May 13, 2016
Merged

Commits on May 13, 2016

  1. [ios] Introduce MGLAnnotationView and support for view annotations

    Add an UIView subclass that can be used as the base class for all
    client provided UIViews for annotations.
    
    Teach MGLMapView to be able to display annotation views over the map if provided by the client delegate. For now, if the delegate provides a UIView then it will be used. If not, the map view will fall back to the old strategy of using GL annotations with an image provided by the delegate or a default image if not.
    The map keeps a reuse queue and will store annotation views that are panned
    offscreen in the queue if the application developer supplied a reuse queue identifer. The views in the queue are reused when more annotation
    views are required. This view reuse provides a performance gain when many
    annotations are shown and most of them are offscreen.
    
    iosapp now implements the new delegate method to supply
    a native view.
    
    Add a playground to the workspace to facilitate experimentation
    with new features. A playground is capable of importing frameworks if it
    exists in the same workspace that builds the imported framework. The
    initial playground demonstrates annotation views.
    
    This also fixes a crash due to nullptr in annotations array If the `annotations` method is called while the user dot's callout view was showing, the userdot annotation is represented as null in the annotation context map. This
    caused a crash when the null pointer was attempted to be converted
    into an NSArray via C array. This protects against this bug by filtering out such a null annotation.
    boundsj committed May 13, 2016
    Configuration menu
    Copy the full SHA
    3966924 View commit details
    Browse the repository at this point in the history
  2. [ios] Refactor of annotation view updates

    This change eliminates the call to the problematic
    `annotationTagsInRect:` by using the annotation views themselves
    and the map view to check if a view is visible or not.
    boundsj committed May 13, 2016
    Configuration menu
    Copy the full SHA
    fb759e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ee1491 View commit details
    Browse the repository at this point in the history