Listening to zoom and move events on maps


#1

Hi I’m trying to listen to the events of zoom and pan in Vector Map but I can not find how to do this in the events documentation, there is a way to do this easily. Thank you.


#2

Hi @ryan I think that what you are looking for is on the map documentation page, in the Listening To Custom Map Events section, is something like this:

myChart.on('mapzoom', (x)=>{
    console.log("Current map zoom: ", x.data);
});

myChart.on('mapmove', (x)=>{
    console.log("Current map center: ", x.data);
});

Let me know if this is what you are looking for. Best regards.