Seperate internal and API methods for the map

This commit is contained in:
Tobias Kohr
2019-09-23 17:23:32 +02:00
parent 66746a61bb
commit d4c1589a01
16 changed files with 86 additions and 53 deletions

View File

@@ -419,14 +419,14 @@ class Overlay extends BaseObject {
if (delta[0] !== 0 || delta[1] !== 0) {
const center = /** @type {import("./coordinate.js").Coordinate} */ (map.getView().getCenterInternal());
const centerPx = map.getPixelFromCoordinate(center);
const centerPx = map.getPixelFromCoordinateInternal(center);
const newCenterPx = [
centerPx[0] + delta[0],
centerPx[1] + delta[1]
];
map.getView().animateInternal({
center: map.getCoordinateFromPixel(newCenterPx),
center: map.getCoordinateFromPixelInternal(newCenterPx),
duration: this.autoPanAnimation.duration,
easing: this.autoPanAnimation.easing
});
@@ -488,7 +488,7 @@ class Overlay extends BaseObject {
return;
}
const pixel = map.getPixelFromCoordinate(position);
const pixel = map.getPixelFromCoordinateInternal(position);
const mapSize = map.getSize();
this.updateRenderedPosition(pixel, mapSize);
}