Conversation
| - (void)mapView:(MGLMapView *)mapView didFinishLoadingStyle:(MGLStyle *)style { | ||
|
|
||
| NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"line-gradient" ofType:@"geojson"]]; | ||
| MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"line-source" URL:url options:nil]; |
There was a problem hiding this comment.
Note that the clarification that will happen in mapbox/mapbox-gl-native#13000 should allow you to switch back to using an MGLPolyline like you did in 100c88d.
| @1: UIColor.redColor | ||
| }; | ||
|
|
||
| NSExpression *gradientExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($lineProgress, 'linear', nil, %@)", stops]; |
There was a problem hiding this comment.
Noting that we might be seeing this crash in its current state because of mapbox/mapbox-gl-native#12917.
There was a problem hiding this comment.
We can try using MGL_FUNCTION("line-progress") until mapbox/mapbox-gl-native#12917 is resolved.
There was a problem hiding this comment.
I'm getting the following error when trying to implement that workaround @captainbarbosa:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse function name 'MGL_Function:' into supported selector (MGL_Function:) '
Am I doing something wrong here:
NSExpression *gradientExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:(MGL_Function('line-progress'), 'linear', nil, %@)", stops];
|
Now that mapbox/mapbox-gl-native#13192 has landed, I believe this example can be picked back up. |
|
Closing in favor of #368 |
Closes #203