I have drawn line ends by creating a vector feature and placing on top of the end of the line. Any shape you want. It's a little more time-consuming, but you can rotate the arrowhead after calculating the slope of the last segment of the line.

Here is a snippet of code used to add a graphic to the end of the line, in this case a predefined circle

    var myGraf;
myGraf = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point (coursePath.geometry.getVertices (true)[1].x,coursePath.geometry.getVertices(true)[1].y),{
        graphicName: "circle"
    });
    posLayer.addFeatures([myGraf]);

I use getVertices to find the endpoint of the line. If you have better access to that datum, it would save a few cycles.

Michael
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to