Closed aprossi closed 5 years ago
Leaflet will automatically compute/adjust the aspect ratio to contain the requested bounding-box.
When the stop view is set -- i.e., when there is a bounding-box, [xmin, ymin, xmax, ymax], defined -- we use Leaflet's "fit bounds" methods to fit the given bounding-box into its view. During the "fit bounds" Leaflet computes the current viewport and adjust its resolution to contain the requested bounding-box; In other words, we don't really control the exact corners of Leaflet map, but we are sure to have what we requested ([{x,y}{min,max}]) inside the viewport.
ok, that seems to solve it, so we can close
currently stop view are sized with [xmin, ymin, xmax, ymax] as per v2 data model. since screens/viewports cna be different, perhaps we can either fix them with a certain aspect ration (now they are just rough and calculated over a screen) or set the initial aspect ratio form the GUI.