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

Make source ownership consistent and make MGLGeoJSONSource's content properties mutable #6793

Merged
merged 15 commits into from
Oct 27, 2016

Commits on Oct 26, 2016

  1. [wip] Make source not lazy for geojson source

    Use common initialization logic to create an unique pointer to an mbgl
    source object, up front, when a MGL source is created. Keep a raw
    pointer to the unique pointer that is pointed at the mbgl source
    instance when a MGL source is created or when a MGL source is
    obtained by identifier from MGLStyle.
    
    Once the transfer of ownership of the mbgl source takes place, the
    unique ptr is null. The raw pointer can be used, internally, for
    future work that involves mutating the source.
    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    1b34cf7 View commit details
    Browse the repository at this point in the history
  2. [ios] Fix broken tests

    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    37c8b9f View commit details
    Browse the repository at this point in the history
  3. [ios, macos] Make GeoJSON source data and url mutable

    URL example does not work as of this commit since a change in
    core still needs to happen to trigger an update.
    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    517524c View commit details
    Browse the repository at this point in the history
  4. Use rawSource pointer

    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    d460b78 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4ec9d6a View commit details
    Browse the repository at this point in the history
  6. Fix getter typo

    This fixes a bad name for the raw source getter.
    Also changes the "set features" example to illustrate how an MGLSource
    can proxy to the mbgl source even after it has been added (using raw
    source)
    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    1dc68b5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f447a4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3376545 View commit details
    Browse the repository at this point in the history
  9. [ios, macos] Refactor GeoJSON source point to raw source in category

    Refactor to use covariant for raw source pointer.
    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    ab8075a View commit details
    Browse the repository at this point in the history
  10. [ios, macos] Nil raw source when removing source

    This explicitly sets the rawSource of an MGL source object to NULL
    if the source is removed. Later on, if the MGL source is modified,
    the main / pending source is recreated and the changes are captured.
    If the source is later added back to the map it works just as if it
    were a newly initialized source.
    
    This avoids having to do add checks to validate that the source object
    is in the correct state before a mutation attempt takes place.
    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    65f7915 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d384f44 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4c27bb8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3c7a900 View commit details
    Browse the repository at this point in the history
  14. [ios, macos] Nil out features if GeoJSON source is set with a URL

    If a GeoJSON source is initially set with features or data and then
    later on reset with a URL, features must be set to nil. This avoids a
    situation where features from a previously loaded GeoJSON source
    that no longer represent the current URL's features are still pointed
    to.
    
    When a URL is used to load the source, the features are unknown until
    the data is loaded (possibly over the wire) and since there is no
    public observer or callback API at the mbgl level, it is impossible
    to know when the source data is available to be converted to MGL
    features.
    boundsj committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    530f0a9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    19dc2cb View commit details
    Browse the repository at this point in the history