Clustered MGLSymbolStyleLayer is not showing when offline
anilios opened this issue · 1 comments
When using mapbox offline, clustered MGLSymbolStyleLayer is not visible since fonts are being downloaded from style url. Is there a way to use local fonts in iOS app.
Following is the code for creating that layer
let numbersLayer = MGLSymbolStyleLayer(identifier: "clusteredPortsNumbers", source: source) numbersLayer.textColor = NSExpression(forConstantValue: UIColor.white) numbersLayer.textFontSize = NSExpression(forConstantValue: NSNumber(value: Double(icon.size.width) / 4)) //numbersLayer.textFontNames = NSExpression(forConstantValue: ["OpenSans-Medium"]) numbersLayer.iconAllowsOverlap = NSExpression(forConstantValue: true) numbersLayer.text = NSExpression(format: "CAST(point_count, 'NSString')") numbersLayer.predicate = NSPredicate(format: "cluster == YES") self.mapView.style?.addLayer(numbersLayer)
Steps to reproduce
- Use map box offline
- Clustered MGLSymbolStyleLayer is not visible due to fonts beind failed to download from style url.
Expected behavior
Allow using ios system fonts in offline case.
Actual behavior
Not able to use offline fonts, layers do not show up with clustering and having text on them.
Configuration
Mapbox SDK versions:
iOS/macOS versions:
Device/simulator models:
Xcode version:
I am still stuck with this problem.