Fix example error.
Add option maxSegments and set default to 1.

* To avoid soiling the track is desirable to reduce the
  number of visible segments.
Adapting dev example and add js comments.
Update docs