Show all markers at once in display-coordinates component

I use display-coordinates component to show markers on the map with marker-query. I would like to show all the markers on the map at once (without dragging or zooming) with the correct zoom by default. There is a method to set up a map center (coordinates + zoom), but I can’t find anything about bounds.
Does JA have something to work/calculate/set up bounds? Or is there any convenient way to do it with JA?
Thanks in advance!

1 Like

@khilda Unfortunately there is nothing out of the box. You will have to calculate the zoom level yourself based on the spacing of the coordinates and the size of the screen (using view.getSize() | Promise | returns {“width”: number,“height”:number,“left”:number,“top”:number})

I can highly recommend the Turf NPM package for coordinate based calculations.

Please share your custom solution once you have one. I am sure it would be very valuable to other members of the community

1 Like