Hi,
when resizing its parent container it seems to me that the default behavior of the XamMap control is to rescale itself to try to keep the original viewport within the new container bounds. This means that the XamMap content usually changes its zoom level.
I would rather like to keep the original zoom level when resizing the parent container, keeping the map data at the top-left corner fixed and just extending/truncating the map data in the horizontal- and vertical direction. What is the easiest way to achieve this ? Is there maybe a property that affects XamMap resizing behavior ?
Regards,Leif
Hello Leif,
Thank you for your post. I have been looking into your issue and have created a small sample for you. In the sample when you resize the parent window the map is fixed in the upper left corner of the window. You can change the zoom level using the MapNavigationPane(down left corner) to navigate left or right.
Please find the attached sample and feel free to let me know if you have any further questions on the matter or I have misunderstood your requirements.
the XamMap in the sample does not fill the window as the window is grown beyond the XamMap's original size. It just stays at a constant width and height. I need the XamMap to always fill the window (if the data allows it at the current zoom level) while keeping the zoom level. My main usage will be with an OpenStreetMap tiled data source.
See the attached zip-file for sample views using a different map control. The 'before_resize.jpg' image shows the view before it is resized, while the 'after_resize.jpg' image shows the view after it has been resized. The view stays at the same zoom level after the resize, but data is extended to the view's edges.