Displaying Only Vertices Of A Polyline

I need to allow a user in real time to be able to manipulate the display
of a polyline to either show line segments or to only show the vertices
of the polyline. Is it possible to only show the vertices of a polyline? If not possible with a polyline, is there a recommended way for implementing this functionality?

What exactly is the use case? When you say “show the vertices”, what are you expecting to see?

That said, you could try drawing both the actual polyline and a set of Point geometries or something based off the same position data. Update both, and toggle visibility on and off appropriately.