iOS-MGLSymbolStyleLayer会在侧面显示polyLine

时间:2018-10-30 11:36:29

标签: mapbox

我想让SymbolLayer的线不在它的中心,我尝试了多种方法,但是没有一种方法可以改变符号的位置。

    symbolPlacement = NSExpression(forConstantValue: "line")
    text = NSExpression(forConstantValue: time)
    textFontSize = NSExpression(forConstantValue: 14)
    textFontNames = NSExpression(forConstantValue: ["Roboto Black", "Arial Unicode MS Bold"])
    iconTextFit = NSExpression(forConstantValue: "both")
    iconTextFitPadding = NSExpression(forConstantValue: UIEdgeInsets(top: 10, left: 10, bottom: 25, right: 10))

    iconImageName = NSExpression(forConstantValue: "ic_travel_time")

    symbolAvoidsEdges = NSExpression(forConstantValue: true)
    maximumTextAngle = NSExpression(forConstantValue: 0)

    keepsTextUpright = NSExpression(forConstantValue: true)
    keepsIconUpright = NSExpression(forConstantValue: true)
    iconAnchor = NSExpression(forConstantValue: "top-right")
    isVisible = true

Actual result

预计我的图标未居中对齐,应该在多义线上方

0 个答案:

没有答案