OpenLayers bindTo 不是函数

OpenLayers bindTo is not a function

当我尝试将第一个地图的视图绑定到第二个地图时收到此错误消息。所以,我有两张地图 - mapOne 和 mapTwo。当我不做任何绑定时,它们工作得很好。但是,当我稍微更改 mapTwo 的声明并添加绑定语句时,我收到了该错误消息。这是我的代码。

// Before. It works good.
var mapTwo = new ol.Map({
    target: obj,
    renderer: 'canvas',
    layers: layers,
    controls:[],
    view: view
});

//After. It does not work
var mapTwo = new ol.Map({
    target: obj,
    renderer: 'canvas',
    layers: layers,
    controls:[]
});

mapTwo.bindTo('view', mapOne);

那么,我做错了什么??

bindTo 在 v3.5.0 中被移除。见 release notes:

"If you want to get notification about ol.Object property changes, you can listen for the 'propertychange' event (e.g. object.on('propertychange', listener)). Two-way binding can be set up at the application level using property change listeners. See #3472 for details on the change."