New: Screen RecorderScreen + webcam, trim, save as MP4Try it now →

Add tools here by clicking the star icon.
Back to tools

GeoJSON LineString Example & Generator

A LineString is a path made of two or more positions — routes, trails, pipes, flight paths. Draw one on the map and get valid GeoJSON with its length measured as you go.

Loading map editor…

What is a GeoJSON LineString?

A LineString connects two or more positions in order. Each position is [longitude, latitude].

{
  "type": "Feature",
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [-73.999, 40.709],
      [-73.9957, 40.706],
      [-73.9923, 40.7031]
    ]
  },
  "properties": { "name": "Sample route" }
}

A MultiLineString holds several separate lines in one feature (for example a route with a gap). The editor can show, edit and export both, and can split a MultiLineString into individual lines.

Measuring length

Lengths are measured along the curved surface of the Earth (geodesic distance), not on the flat map, so they stay accurate over long distances. Switch between metric and imperial units at the bottom of the panel.

How to use it

  1. The Line tool is active: click to add points; press Finish or Enter to end the line.
  2. While drawing, the running length is shown at the bottom of the map; “Undo point” removes the last point.
  3. Select a line to reshape it: drag vertices, drag the midpoints to add new ones, right-click or long-press a vertex to delete it.
  4. Copy the GeoJSON from the GeoJSON tab, or export KML, Shapefile or WKT.

Common Use Cases

  • Delivery and sales routes
  • Hiking and cycling trails
  • Utility lines and pipes
  • Test geometry for routing APIs

Frequently Asked Questions

How do I finish a line?
Press Finish in the bar at the bottom of the map, press Enter, or click the last point again.
Can I edit the line afterwards?
Yes. Click it to select it, then drag any vertex, drag a midpoint to insert a vertex, or right-click / long-press a vertex to delete it. Drag the line itself to move it.
Can I import a GPS track?
Yes — open a GPX, KML or GeoJSON file with Import and the track appears as a line you can edit and measure.

Why use this tool?

  • Live length while you draw
  • Real vertex editing and undo/redo
  • Exports to GeoJSON, KML, Shapefile, WKT
  • Works on phones and tablets

Privacy

Your shapes and files stay in your browser — nothing is uploaded. Map tiles come from OpenStreetMap or Esri, and place searches go to OpenStreetMap Nominatim.

How was this tool?

Your feedback helps us make it better.

Have further opinions? Email me at hello@everythingbagel.app