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.

Refine MGLLineStyleLayer.lineGradient documentation #13000

Closed

Description

@1ec5

The MGLLineStyleLayer.lineGradient documentation makes reference to “GeoJSON sources that specify "lineMetrics": true”. iOS/macOS map SDK documentation typically refers to runtime styling syntax whenever possible, so this property needs an override in platform/darwin/scripts/style-spec-overrides-v8.json that states:

Defines a gradient with which to color a line feature. This property only has an effect on lines defined by an MGLShapeSource whose MGLShapeSource.calculatesLineDistanceMetrics property is set to YES.

/ref #12575 (comment)
/cc @pozdnyakov @fabian-guerra

Activity

  1. added
    iOS
    macOS
    on Oct 2, 2018
  2. added this to the ios-v4.5.0 milestone on Oct 2, 2018
  3. 1ec5 commented on Oct 2, 2018

    @1ec5
    ContributorAuthor

    Additionally, the documentation contains this line:

    This property is only applied to the style if lineDasharray is set to nil,

    It should say lineDashPattern instead of lineDasharray. I’m not sure which part of the codegen script is failing to alias the property here.

    /ref #12575 (comment)

  4. jumbopilot commented on Oct 4, 2018

    @jumbopilot

    Any chance to specify an NSExpression for determining line gradient algorithm based on a provided feature attribute? Simple application: color line based on elevation?

  5. removed this from the ios-v4.5.0-gazpacho milestone on Oct 9, 2018
  6. 1ec5 commented on Oct 24, 2018

    @1ec5
    ContributorAuthor

    @jumbopilot, style layer properties are currently determined by properties on the feature itself or, alternatively, from a computed variable such as $zoomLevel or $lineProgress. geojson-vt is responsible for varying $lineProgress along the path of the line feature. Beyond that one variable, there isn’t a general mechanism for integrating external data that varies along the path of the line. This is somewhat out of scope for the iOS/macOS map SDK, since it would have to be addressed in the style specification in the first place. mapbox/mapbox-gl-js#4095 is somewhat related to this request; please open a separate issue in that repository if it doesn’t fully cover your use case.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationiOSmacOSruntime styling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions