I want to get the current center(zoomed in the viewport) of a mapbox HTML element which I have created using mapbox js gl.
Below is the screenshot of how i have created the JS function to get map center inside the mapbox HTML element.
I am not getting any value out of this.
Can someone please help me decode this issue?
Also, the more context you provide with your questions (screenshots, link to an open app, etc.), the more likely you’ll get good help quickly