-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Pattern colors as polygon fill-pattern/line-pattern images #5033
Comments
Cool idea. The image pattern effect is controlled by the |
We’d need to get a |
Now that the runtime styling API has been implemented, when |
In the meantime, you can call |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
@knov @chloekraw Wanted to put this back on your radar. Would the best next step be moving it to https://github.com/mapbox/mapbox-gl-native-ios/issuess? |
Yes, I think it makes sense to track this issue in mapbox-gl-native-ios. Pattern colors are an iOS/macOS concept and I think the translation to a pattern image would have to happen in platform-specific code. The workaround in #5033 (comment) remains relevant. If we were to implement support for pattern colors as a convenience, it would look something like this:
You’d then be able to set the fill color to a pattern color, like this: UIImage *crosshatchImage = [UIImage imageNamed:@"crosshatch"];
UIColor *crosshatchPattern = [UIColor colorWithPatternImage:crosshatchImage];
fillLayer.fillColor = [NSExpression expressionWithFormat:@"MGL_MATCH(saturation, 0, %@, 1, %@, %@)", UIColor.blackColor, UIColor.whiteColor, crosshatchPattern]; |
Hello, I am working on a project where I have to paint polygons with custom image patterns and I can't figure out how to do it with GL version (3.2.2). It could be nice to be able to use the UIColor class
The text was updated successfully, but these errors were encountered: