This is close to what Im looking for for my issue. fitBounds centers my map with multiple markers in a weird way. It should center the map over the Atlantic but for some reason it sets it over the Pacific ocean. I guess it tries to find the best way to set the map based on the marker locations.
panToBounds seems to at least center the map in a better way. Thank you!
The fitBounds function still doesn’t seem to work and centers my map somewhere along the equator, so I believe it’s the same in your case?
I will probably find a way with a different map script, like Leaflet or Open Street Map, because Google Maps doesn’t seem to recognize this issue and cannot recreate it (I asked for support there too).
Let me know, if you find a different solution 😉
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users