Polyline.encoded.js
function (num) {
            var value, encoded = '';
            while (num >= 0x20) {
                value = (0x20 | (num & 0x1f)) + 63;
                encoded += (String.fromCharCode(value));
                num >>= 5;
            }
            value = num + 63;
            encoded += (String.fromCharCode(value));

            return encoded;
        }
function (num) {
            var value, encoded = '';
            while (num >= 0x20) {
                value = (0x20 | (num & 0x1f)) + 63;
                encoded += (String.fromCharCode(value));
                num >>= 5;
            }
            value = num + 63;
            encoded += (String.fromCharCode(value));

            return encoded;
        }
function ( num ) { var value , encoded = '' ; while ( num >= 0x20 ) { value = ( 0x20 | ( num & 0x1f ) ) + 63 ; encoded += ( String . fromCharCode ( value ) ) ; num >>= 5 ; } value = num + 63 ; encoded += ( String . fromCharCode ( value ) ) ; return encoded ; }
This function is very similar to Google's, but I added some stuff to deal with the double slash issue.
This function is very similar to Google s but I added some stuff to deal with the double slash issue .