Interactive polyline utility

With this utility, you can generate polyline encodings interactively. You can also decode polylines into coordinates from either an encoded string or a GeoJSON linestring.

Create a polyline interactively on the map

  1. Enter an address, zip code, location, or landmark. Make a selection from the list of suggestions. The map centers on the location you selected.
  2. Click the map to add markers to define your polyline. The coordinates of your markers show in the Locations list.
    • The Locations list shows the coordinates of the markers.
    • The Encoded Polyline box shows the polyline encoding.
    • The GeoJSON Linestring box shows the GeoJSON representation of the polyline.

Editing coordinates

  • To edit a location, drag the marker on the map.
  • To delete a location, click the "x" next to it in the Locations list.
  • To delete all locations and start over, click Clear All.

Create a polyline by entering coordinates

  • If you have an existing list of coordinates, instead of placing markers, you can manually enter the latitudes and longitudes in the GeoJSON Linestring coordinates box, using GeoJSON format.

Decode a polyline into coordinates

  1. Paste your polyline into either the Encoded Polyline or GeoJSON Linestring box.
  2. If your polyline contains escaped characters, click the Unescape special characters checkbox to unescape them.
  3. Click Decode Polyline or Decode GeoJSON. The coordinates show in the Locations list, and the polyline is drawn on the map.