Separate internal and API methods for the view

This commit is contained in:
Tim Schaub
2019-08-11 17:28:28 -06:00
parent f73d0b16ec
commit c03c359a20
17 changed files with 214 additions and 69 deletions

View File

@@ -418,14 +418,14 @@ class Overlay extends BaseObject {
}
if (delta[0] !== 0 || delta[1] !== 0) {
const center = /** @type {import("./coordinate.js").Coordinate} */ (map.getView().getCenter());
const center = /** @type {import("./coordinate.js").Coordinate} */ (map.getView().getCenterInternal());
const centerPx = map.getPixelFromCoordinate(center);
const newCenterPx = [
centerPx[0] + delta[0],
centerPx[1] + delta[1]
];
map.getView().animate({
map.getView().animateInternal({
center: map.getCoordinateFromPixel(newCenterPx),
duration: this.autoPanAnimation.duration,
easing: this.autoPanAnimation.easing