I'm evaluating the XamMap class and need to be able to rotate the map view depending on a user-selectable orientation. However, I fail to find any property like e.g. 'Heading' in the XamMap- and associated classes. How do I set the rotation in XamMap ?
Regards,Leif
Hi Leif,
I'm still looking into this question. I've contacted some of our developers for their suggestions and expect to be back to you tomorrow.
Hi,
using a RotateTransform will rotate the map, but it will not fill up the view with data. I still want my view to be filled with map data at the same zoom level after rotation.
The attached zip-file contains several images explaining what I mean; The image 'ShapeRotated.jpg' shows the shape from your provided sample with a 10 degree rotation. Leaving the view with empty areas in the corners (and at a different scale) is not what I want.
The two other images in the attached zip-file show the XamMap in a side-by side comparison with the Open Source (but less featureful) Open Street Map control 'XAML Map Control' (http://xamlmapcontrol.codeplex.com/). This control has a 'Heading' property that sets how the map data is rotated/aligned in the View.
The 'BothApisUnrotated.jpg' image show both APIs with unrotated data for basically the same area. The 'BothApisRotated.jpg' show the same areas with a 10 degree rotation, using a RotateTransfom for the XamMap (left) and using the Heading property for the XamlMapControl (right). The XamlMapControl displays the data as expected, filling in missing areas at the corners with new downloaded tiles. The XamMap, however, just takes the data visible in the unrotated view and rotates this data. No tiles are downloaded to fill the areas in the corners.
I hope these images explains what I need to achieve with the XamMap control.
EDIT: Just to emphasize what we want to achieve: We have a compass rose in the upper right corner of the view that contains the XamMap. The compass rose is used to align the view so that the view's vertical axis corresponds to an arbitrary 'north' direction. The XamMap will be used as a background layer and its viewport will be controlled by the master view and not direct XamMap intercation.
I'm sorry that I didn't get back to you sooner. Here is my sample using world shape files and RotateTransform to rotate the map 90 degrees with each click on the button.
Hope this helps. Please let me know if you have any questions.
No response ? I guess that means that the XamMap does not support rotation in an easy way ? That will make the whole control useless for our purpose since I need to make the map orientation fit the way users want to display the overlay data on screen. I'm surprised if such an advanced control doesn't support such a scenario.