TarekNoaman
Posts: 11
Joined: Tue May 24, 2022 9:42 am

Map chart: zooming in specific country not working

I am trying to zoom in to a specific country, it works with almost all countries except the united kingdom
here is a Fiddle https://jsfiddle.net/tarek_noaman/ahe37c2w/10/
thanks in advance
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Map chart: zooming in specific country not working

Hello TarekNoaman!
Thank you for contacting us with your issue.

This is the correct behaviour of zooming to Great Britain because the shape of the GB point is very big and takes into account also a British colonies. You can check, that if you are zooming to e.g. US map is also showing Alaska and Hawai. If you want to zoom to an island with the capital of Great Britain you have to use a setView method and pass proper coordinates and zoom to it, like in the demo below.

Demo: https://jsfiddle.net/BlackLabel/eqydbjkx/
API Reference: https://api.highcharts.com/class-refere ... ew#setView

Let me know if you have any further questions!
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Maps”