Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试通过另一个地图的位置来更改一个地图的位置,因此我需要设置一个绑定到诸如“locationChanges()”之类的回调函数。通过这种方式,我可以设置一个尊重另一个的位置。我怎么能在 Open Layers API 中做到这一点。
不知道你需要什么,是这样的吗?
map.events.on({ 'moveend': function(){ another_map.zoomToExtent(map.getExtent()); } });