class ArrowLineLayer extends KujakuLayer {

    private FeatureCollection generateArrowHeadFeatureCollection(@NonNull LineString lineString) {
        ArrayList<Feature> featureList = new ArrayList<>();

        List<Point> lineStringPoints = lineString.coordinates();
        for (int i = 0; i < lineStringPoints.size() - 1; i++) {
            Point startPoint = lineStringPoints.get(i);
            Point endPoint = lineStringPoints.get(i + 1);

            Feature arrowHeadFeature = Feature.fromGeometry(TurfMeasurement.midpoint(startPoint, endPoint));
            arrowHeadFeature.addNumberProperty(ARROW_HEAD_BEARING, TurfMeasurement.bearing(startPoint, endPoint));

            featureList.add(arrowHeadFeature);
        }

        return FeatureCollection.fromFeatures(featureList);
    }

    private  ArrowLineLayer(@NonNull Builder builder);

}