labaffa
Posts: 2
Joined: Thu May 11, 2023 2:32 pm

Zoom out when using fitToGeometry

Hello,

If I use the fitToGeometry property of mapView, I don't manage to zoom out from the initial view, i.e. it's like the fitToGeometry set a min zoom on the map.
I started from this [example][https://jsfiddle.net/gh/get/library/pur ... togeometry], and here is a simplified version to highlight my problem: [][https://jsfiddle.net/labaffa/7sbzd954/8/]

Is there a solution while still making use of fitToGeometry?
Thanks
User avatar
dawid.d
Posts: 755
Joined: Thu Oct 06, 2022 11:31 am

Re: Zoom out when using fitToGeometry

Hi,

Welcome to our forum and thanks for contacting us with your question!

Unfortunately, using fitToGeometry blocks the ability to zoom out further. If you want to be able to do that, it's better to use the zoom option and center to a given position like in the demo below.

Demo: https://jsfiddle.net/BlackLabel/jq10a3xf/

I hope you will find it useful
Best regards
Dawid Draguła
Highcharts Developer
labaffa
Posts: 2
Joined: Thu May 11, 2023 2:32 pm

Re: Zoom out when using fitToGeometry

Hi dawid,

I see. Thanks for your reply and example.
User avatar
dawid.d
Posts: 755
Joined: Thu Oct 06, 2022 11:31 am

Re: Zoom out when using fitToGeometry

You're welcome!
In case of any further questions, feel free to contact us again.
Dawid Draguła
Highcharts Developer

Return to “Highcharts Maps”