Eren Golge
Eren Golge

Reputation: 790

Change the map location by the location change of other in OpenLayers

I try to change one map's location by the another's location so I need to set a callback function bonded to something like "locationChanges()". In that way I can set the location of the one respected to other. How could I do it in Open Layers API.

Upvotes: 0

Views: 107

Answers (1)

tonio
tonio

Reputation: 2376

Not sure about what you need, is it something like that?

map.events.on({
    'moveend': function(){
        another_map.zoomToExtent(map.getExtent());
    }
});

Upvotes: 1

Related Questions