callbackWrapper = function(result) {
            if (syncEnabled) {
                callback(result);
            } else {
                setTimeout(function() {
                    callback(result);
                });
            }
        }
Find a path.

@param {Number} startX The X position of the starting point.
@param {Number} startY The Y position of the starting point.
@param {Number} endX The X position of the ending point.
@param {Number} endY The Y position of the ending point.
@param {Function} callback A function that is called when your path
is found, or no path is found.
@return {Number} A numeric, non-zero value which identifies the created instance. This value can be passed to cancelPath to cancel the path calculation.