heremaps/harp.gl

ExtrudedLineTechnique

Closed this issue · 2 comments

I have try to make polygon's borderline clearly by lineWidth , but it didn't work by extruded-line .
fill or extruded-polygon is ok, however their lineWidth is limited to the [0, 1] range.
Can you give a simple example about ExtrudedLineTechniqueParams ?

I tried lineWidth, but it seems to be broken, at least it was only showing a single pixel outline, i.e. with the following style:

when: ["==", ["geometry-type"], "Polygon"],
technique: "fill",
renderOrder: 100000,
attr: {
        color: ["get", "color"],
        lineColor: "#f00",
        lineWidth: 15
}

I get the following image (it looks thicker than 1px, but on my screen, it is 1px).
Screenshot 2021-05-25 at 11 42 39

If you want a polygon outline, you can just define two steps:

{
    when: ["==", ["geometry-type"], "Polygon"],
    technique: "fill",
    renderOrder: 100000,
    attr: {
         color: ["get", "color"]
    }
},
{
    when: ["==", ["geometry-type"], "Polygon"],
    technique: "solid-line",
    renderOrder: 100100,
    attr: {
        color: "#000",
        lineWidth: "2px"
    }
}

And that gives:
Screenshot 2021-05-25 at 11 42 45

Would that suit for now @aoyaZY ?

@nzjony thank you ,that's helpful.