Customize Map Zoom Level

Hello Helical Team,

I am using Helical Insight 4.0. In the map, I want to automatically open the map with zoom at a specific location of latitude and longitude. I am trying to use the following script:
var map =‘map’).setView([51.505, -0.09], 13);

However, the above is not working when put in the JS Editor. Can you give a script to implement above?

Thank You,

Hello Netta,

. In order to work with external JS scripts, you need to implement using any of the chart lifecycle methods like preExecution, postExecution, preFetch or postFetch scripts.

Below script is an example of how you can adjust the zoom factor and setView to a specific lat and longitude for the openstreemaps which are integrated.

var viz_Options = c.get("viz_Options");
viz_Options.chartOptions["setViewLat"] = 26.746282;
viz_Options.chartOptions["setViewLong"] = 82.70905;
viz_Options.chartOptions["mapZoomLevel"] = 5;


Thank You,
Helical Insight.