code: public LineString toLineString(List<LatLng> latLngs, boolean hasZ,
                                     boolean hasM) {
  
          LineString lineString = new LineString(hasZ, hasM);
  
          populateLineString(lineString, latLngs);
  
          return lineString;
      }
docs: Convert a list of {@link LatLng} to a {@link LineString}
  
  @param latLngs lat lngs
  @param hasZ    has z flag
  @param hasM    has m flag
  @return line string