Prevent map element from loading in New York

Hi Guys,

My app displays elements in Switzerland on a map element.

When my page loads the map show New York for 1 second or so before moving to Switzerland. How can I prevent my map element from setting to New York on page load ?

Thank you !

If you are using a list of markers, there seems to be a ‘Set Center and zoom of map manually checkbox’ that will let you do just that.

If you are using a single marker, for some reason this option is not available.

A solution which would work in both scenarios is to set the visibility of the map to invisible by default, and add a conditional which makes the map visible when the data is ready.
I imagine that you are runnning a search to fetch the geoaddresses?
The conditional should be something like ‘Do a search for X’s first item is not empty’
It would be good practice to put the search into a custom state and then reference it in the Data Source & the conditional.