public static function encode($path) {
        
        $lastLat = 0;
        $lastLng = 0;

        $result = '';

        foreach( $path as $point ) {
            $lat = round( $point['lat'] * 1e5);
            $lng = round( $point['lng'] * 1e5);
            
            $dLat = $lat - $lastLat;
            $dLng = $lng - $lastLng;

            self::enc($dLat);
            self::enc($dLng);

            $lastLat = $lat;
            $lastLng = $lng;
        }
        return self::$result;
    }