# LineLayer

The `LineLayer` renders flat lines joining pairs of source and target points, specified as latitude/longitude coordinates.

    data("bart_segments")

    properties <- list(
      pickable = TRUE,
      getWidth = 12,
      getSourcePosition = ~from_lng + from_lat,
      getTargetPosition = ~to_lng + to_lat,
      getColor = JS("d => [Math.sqrt(d.inbound + d.outbound), 140, 0]"),
      getTooltip = JS("object => `${object.from_name} to ${object.to_name}`")
    )

    deck <- deckgl(zoom = 10, pitch = 20) %>%
      add_line_layer(data = bart_segments, properties = properties) %>%
      add_mapbox_basemap()

    if (interactive()) deck

See also deckgl-api-reference-line-layer