How to set position to label in Oracle Maps HTML5 JavaScript API

48 views Asked by At

I have code like this

private _addLayer(layerName: string, featureGeometry: any, featureName: string, style: any, 
    featureLabel: string = '') {
    const labelStyle = new OM.style.Text({
        fontSize: 16,
        fill: '#FF0000'
    })
        
    let layer = new OM.layer.VectorLayer(layerName, {
        renderingStyle: style,
        def:
            {
                type: OM.layer.VectorLayer.TYPE_LOCAL,
                features: [new OM.Feature(featureName, featureGeometry, {label: featureLabel})]
            }
    })
    layer.setLabelsVisible(true);
    layer.setLabelingStyle(labelStyle)
    
    
    this._map.addLayer(layer);
}

Just adding line and label to map.

I want change default label position (for example basement to vertical align).
But I don't find in docs information about to set label position (OM.Style.Text).

So, How can I do this?

0

There are 0 answers