View Source SqueezeWeb.MapboxStaticMap (OpenPace v0.0.1)

Utility library to create a map url for mapbox which has a gradient line.

Converted from JS here: https://blog.mapbox.com/generate-gradient-lines-with-the-static-image-api-368eb28068a3

Link to this section Summary

Functions

Get a mapbox static url for a polyline

Link to this section Functions

Link to this function

map_url(polyline, opts \\ [])

View Source

Get a mapbox static url for a polyline

options

Options

  • height (integer): height of the image
  • width (integer): width of the image
  • show_pins (boolean): show or hide the start and end markers
  • start_color (string): start of the gradient color in hex (example "#FF512F")
  • end_color (string): end of the gradient color in hex (example "#FF512F")
  • stroke_width (integer): width of the path
  • style (string): mapbox style of map (default "dark-v10")
  • outline_color (color): outline the path with this color if present