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.

MGLInterpolationMode docs should clarify relative differences #8192

Closed

Description

@friedbunny

v3.5.0 deprecates +[MGLStyleValue valueWithStops:], replacing it with +[MGLStyleValue valueWithInterpolationMode:cameraStops:options:].

Besides being a much more verbose initializer, this change adds ambiguity: what MGLInterpolationMode was being used in v3.4 and which of the four options should I use now?

We should clarify:

  • What the default interpolation mode is, if any can be said to be the default.
  • The relative advantages of each interpolation mode for typical use cases.

/cc @boundsj

Activity

  1. added this to the ios-v3.5.0 milestone on Feb 23, 2017
  2. boundsj commented on Feb 23, 2017

    @boundsj
    Contributor

    The iOS MGLInterpolationMode corresponds to the GL-JS notion of function type.

    The iOS SDK 3.4.x versions offer a single function type (MGLStyleFunction now known in the 3.5.0 beta 1 as MGLCameraStyleFunction) that uses exponential or interval interpolation depending on the property data type. Although we've talked about exponential (linear) interpolation in the 3.4.x API docs, I don't think we documented clearly that MGLStyleFunction's exponential stops would be treated as interval stops if the data type of the property it was applied to could not be interpolated (i.e. color vs an enumeration or boolean).

    The Mapbox iOS 3.5.0 beta 1 release introduces source and composite functions along with porting the legacy function to camera function. Not all interpolation modes apply to all function types (i.e. only exponential and interval make sense for camera) and interpolation modes can mean different things depending on the function type (i.e. source vs. composite functions).

    It would be great to add more information to the MGLInterpolationMode docs. Also, the API documentation for MGLSourceStyleFunction, MGLCameraStyleFunction, and MGLCompositeStyleFunction already hints at why you may want to use one function over the other and may be a good place to add more information. However, because these concepts may be hard to explain fully in any one part of the API documentation, I think a DDS specific guide may be really useful (ref #7924).

    cc @friedbunny @jmkiley @incanus

  3. self-assigned this
    on Feb 24, 2017
  4. friedbunny commented on Mar 17, 2017

    @friedbunny
    ContributorAuthor

    Fixed by #8425.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationiOSruntime styling

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions