I am working on a highmaps map of the world project and would like to zoom into a marker when the user clicks. I achieved this functionality by using the event in series in the below manner:
events: {
click: function () {
zoomInMarker();
}
},
In my click function I am calling a function that gets Europe's coordinates. the function is defined as below:
function zoomInMarker () {
var chart = $('#container').highcharts();
chart.xAxis[0].setExtremes(740, 1180, false);
chart.yAxis[0].setExtremes(-1730, -1470, false);
chart.redraw();
}
this works but which ever marker on the map I click, obviously always zooms in the same place that is Europe. How do i alter the zoomInMarker function to get the coordinates of the marker that was clicked. like for example using point.position instead of actual values like (740, 1180).