title: How to change the color of a MGLPolyline?
body: <p>How can I change the color of an MGLPolyline? I had looked <a href="https://stackoverflow.com/questions/32024464/customize-mglpolyline-using-mapbox">here</a> but the answer did not work. I also tried some other code but it was too dependant on apple maps. So how can I change the color of the line and preferably be able to edit other aspects of the line as well? Bellow is where I believe in the code I should be doing these edits but I am not 100%. </p>
  
  <pre><code>        @objc func useButtonTap(_ sender: UIGestureRecognizer) {
          print("use tap button pressed")
          startButton.backgroundColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 0.9)
          useTrackButton.backgroundColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 0.9)
  
          locationManager?.stopUpdatingLocation()
  
          print(locationList, "&lt;-- location manager array in use button")
          if locationList == [] {
              print("nothing was tracked")
          } else {
  
              var mapCoordinates: [CLLocationCoordinate2D] = []
  
              for locationT in locationList {
                  print(locationT, "&lt;-- locationT")
                  print(locationT.coordinate.latitude, "&lt;-- latitude")
                  print(locationT.coordinate.longitude, "&lt;-- longitude")
  
                  let locationLatitude = locationT.coordinate.latitude
                  let locationLongitude = locationT.coordinate.longitude
  
                  print(locationLatitude, "lat")
                  print(locationLongitude, " long")
                  let newCoord = CLLocationCoordinate2D(latitude: locationLatitude, longitude: locationLongitude) // - (0.0001/2)
                  print(newCoord, "&lt;-- new coord")
                  mapCoordinates.append(newCoord)//+ 0.0001
  
              }
  
              polyline = MGLPolyline(coordinates: mapCoordinates, count: UInt(mapCoordinates.count))
  //            toCome = polyline
  //            mapView.add(polyline)
  
              mapView.addAnnotation(polyline) //used to be jsut .add, changed in order to try anwser for color chaning of polyline
  
          }
      }
  </code></pre>