Commit b01af235 authored by Caillat Michel's avatar Caillat Michel
Browse files

Added the couple method

parent 5dc84203
......@@ -175,4 +175,19 @@ class Viewer {
isThreeD(){
return this.is3D;
}
couple(viewer) {
var updateView = function (event, viewRef) {
let newValue = event.target.get(event.key);
viewRef.set(event.key, newValue);
};
this.map.getView().on('change:resolution', function (event) {
updateView(event, viewer.getMap().getView());
});
this.map.getView().on('change:center', function (event) {
updateView(event, viewer.getMap().getView());
});
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment