Cody

# Problem 569. Encoding Google Maps Polylines

Solution 1457532

Submitted on 6 Mar 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
lat = 42.3; lon = -71.35; str_correct = '_vdaGnpnrL'; str = polyline_encoder(lat,lon); assert(isequal(str,str_correct))

Undefined function 'polyline_encoder' for input arguments of type 'double'. Error in Test1 (line 4) str = polyline_encoder(lat,lon);

2   Fail
lat = 48.82; lon = 2.22; str_correct = '_d~hH_rpL'; str = polyline_encoder(lat,lon); assert(isequal(str,str_correct))

Undefined function 'polyline_encoder' for input arguments of type 'double'. Error in Test2 (line 4) str = polyline_encoder(lat,lon);

3   Fail
lat = 38.5; lon = -120.2; str_correct = '_p~iF~ps|U'; str = polyline_encoder(lat,lon); assert(isequal(str,str_correct))

Undefined function 'polyline_encoder' for input arguments of type 'double'. Error in Test3 (line 4) str = polyline_encoder(lat,lon);

4   Fail
lat = 40.7; lon = -120.95; str_correct = '_flwFn`faV'; str = polyline_encoder(lat,lon); assert(isequal(str,str_correct))

Undefined function 'polyline_encoder' for input arguments of type 'double'. Error in Test4 (line 4) str = polyline_encoder(lat,lon);

5   Fail
lat = 43.252; lon = -126.453; str_correct = '_t~fGfzxbW'; str = polyline_encoder(lat,lon); assert(isequal(str,str_correct))

Undefined function 'polyline_encoder' for input arguments of type 'double'. Error in Test5 (line 4) str = polyline_encoder(lat,lon);

### Community Treasure Hunt

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

Start Hunting!