control map visualization positioning via API

Has anyone had success using the API to control the viewport and exact position of map visualizations?

I can’t tell if it’s the difference in my screen resolutions, or I’m accidentally moving the map elements themselves, but I frequently have to adjust the maps back into position. I’m not sure why.

It would be incredible If I could get the coordinates and set them on the Loading event. I’m wondering if anyone has done this / if it’s possible.

Hi Tom,

You can certainly control the map viewport position via script as properties exist.

image

My perferred method is to set the zoom and position manually and then lock the position so that the user can’t change them. Obviously you can’t do this if you are providing interactivity but i’ve found that most maps people create don’t actually require interactivity and a fix position is good enough for a many.

Here is an example where we have locked the map position.
https://samples.dundas.com/Dashboard/9a59b5cc-8999-4896-acf1-3f1f594f8d6c?e=false&vo=viewonly