You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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.
Any chance to specify an NSExpression for determining line gradient algorithm based on a provided feature attribute? Simple application: color line based on elevation?
@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.
Activity
1ec5 commentedon Oct 2, 2018
Additionally, the documentation contains this line:
It should say
lineDashPatterninstead oflineDasharray. I’m not sure which part of the codegen script is failing to alias the property here./ref #12575 (comment)
jumbopilot commentedon Oct 4, 2018
Any chance to specify an NSExpression for determining line gradient algorithm based on a provided feature attribute? Simple application: color line based on elevation?
1ec5 commentedon Oct 24, 2018
@jumbopilot, style layer properties are currently determined by properties on the feature itself or, alternatively, from a computed variable such as
$zoomLevelor$lineProgress. geojson-vt is responsible for varying$lineProgressalong 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.