Google Maps API Polyline Decoder

Decodes google maps API polyline string into lat/lon positions.
Updated 3 Aug 2011

View License

Takes a single string array which follows the google maps API encoded polyline string and parses it into arrays of lat/lon pairs. Algorithm documentation from google can be found at

Cite As

chris hinkle (2024). Google Maps API Polyline Decoder (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Added option to cumsum the raw polyline output to have actual lat lon position instead of lat lon then offset.