Skip to main content

Polylines

To add one or more polylines, use the polyline parameter one or multiple times in the URL query in the following format:

polyline=polylineStyle|polylineCoord1|polylineCoord2|...
  • polylineCoord:

    • Lat, Lon Coordinates: Coordinates in lat, lon format, separated by |. You need at least two coordinates.
    • Encoded Polylines: You can also use Google Encoded Polyline format.
  • polylineStyle: Customize the polyline with:

    ParameterDefaultDescription
    weight6Sets the stroke width of the polyline.
    color#0000ffDefines the stroke color of the polyline.
    fillSpecifies the fill color of the polyline.
    strokeDasharray(none)Pattern of dashes and gaps, e.g., 5,5 see stroke-dasharray.

Note: For each pair of coordinates in the input, a geodesic line is generated between them.

Regular Coordinates example with no zoom, weight:6, color:0000ff

Regular Coordinates Example

Multiple Encoded Polylines

Multiple Encoded Polylines Example