Like S2PolylineLayer, but adds the polyline to a MutableS2ShapeIndex (if the polyline is non-empty).
A layer type that assembles edges (directed or undirected) into an S2Polyline. Returns an error if the edges cannot be assembled into a single unbroken polyline.