Problem 569. Encoding Google Maps Polylines

This problem is based on the Google Polyline Encoder algorithm. This is how Google Maps encodes a line for display on a map. You will be given a single latitude-longitude pair for which you must generate the encoded string used by the Google Maps API.



 lat = 42.3 
 lon = -71.35


 str = '_vdaGnpnrL'

Here is the complete algorithm description. You can use this interactive tool to play around with it (I used it to generate the test points).

Solution Stats

63.16% Correct | 36.84% Incorrect
Last solution submitted on Nov 25, 2014

Problem Comments


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more