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 has been archived by the owner on Jun 21, 2023. It is now read-only.
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.
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
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:
The text was updated successfully, but these errors were encountered: