Closed rostikrode closed 3 years ago
Sounds like you want to display with a fixed zoom level. The Control Options example shows how you can use options to disable zoom and/or dragging. The setZoom method can be used to set a specific zoom level.
thanks for your reply, thats the workaround i have in place right now. ideally, what i am trying to do is, have the ability to have the image fill up the space, and if the width or height is taller than the parent, be able to drag to that max width and / or height. similar as how it acts now when you zoom in on the image. with current code it seems the map area always has to load at the same height and width as the image.
There is an undocumented widget option "constraint" which can set to either "width" or "height". It was meant for situations where the aspect of the image and the html view are different and determines whether a zoom level of 1 makes the full width or height visible. Its use is described in this issue
thank you! i will give it a try
is there a way for a tall image to only display a specific height, and the rest be draggable ?