src/map/Map.Pan.js
function (offset, options = {}, step) {
        if (!offset) {
            return this;
        }
        if (isFunction(options)) {
            step = options;
            options = {};
        }
        offset = new Point(offset);
        this.onMoveStart();
        if (typeof (options['animation']) === 'undefined' || options['animation']) {
            offset = offset.multi(-1);
            const target = this.locateByPoint(this.getCenter(), offset.x, offset.y);
            this._panAnimation(target, options['duration'], step);
        } else {
            this._offsetCenterByPixel(offset);
            this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));
        }
        return this;
    }
function (offset, options = {}, step) {
        if (!offset) {
            return this;
        }
        if (isFunction(options)) {
            step = options;
            options = {};
        }
        offset = new Point(offset);
        this.onMoveStart();
        if (typeof (options['animation']) === 'undefined' || options['animation']) {
            offset = offset.multi(-1);
            const target = this.locateByPoint(this.getCenter(), offset.x, offset.y);
            this._panAnimation(target, options['duration'], step);
        } else {
            this._offsetCenterByPixel(offset);
            this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));
        }
        return this;
    }
function ( offset , options = { } , step ) { if ( ! offset ) { return this ; } if ( isFunction ( options ) ) { step = options ; options = { } ; } offset = new Point ( offset ) ; this . onMoveStart ( ) ; if ( typeof ( options [ 'animation' ] ) === 'undefined' || options [ 'animation' ] ) { offset = offset . multi ( - 1 ) ; const target = this . locateByPoint ( this . getCenter ( ) , offset . x , offset . y ) ; this . _panAnimation ( target , options [ 'duration' ] , step ) ; } else { this . _offsetCenterByPixel ( offset ) ; this . onMoveEnd ( this . _parseEventFromCoord ( this . getCenter ( ) ) ) ; } return this ; }
Pan the map by the give point
@param  {Point} point - distance to pan, in pixel
@param {Object} [options=null] - pan options
@param {Boolean} [options.animation=null] - whether pan with animation
@param {Boolean} [options.duration=600] - pan animation duration
@return {Map} this
Pan the map by the give point