I built a simple editor using Mapbox GL JS in order to play and retrieve coordinates. In this example, the map is 1024x1024 pixels wide.
My goal was to have a matrix of 2x2 images as you can see in this following image
Here you can find the code used to generate the 4 images