Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Clustered MGLSymbolStyleLayer is not showing when offline #654

Description

@anilios

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

  1. Use map box offline
  2. 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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions