The Wraparound feature provides infinite horizontal panning to the RadMap control which gives continuous experience as the user pans the viewport east or west.
The feature is not enabled by default. To turn it on you can set the Wraparound property of the RadMap to True.
Example 1: Setting the Wraparound property
<dataVisualization:RadMap x:Name="myRadMap" Wraparound="True"> <dataVisualization:RadMap.Providers> <telerikMap:BingRestMapProvider ApplicationId="Bing_Map_Key" Mode="Aerial" IsLabelVisible="True" /> </dataVisualization:RadMap.Providers> </dataVisualization:RadMap>
Figure 1: Wraparound functionality enabled
When the wraparound is enabled, the longitude of the map's viewport can exceed the valid geographical boundaries (from -180 to 180 degrees in the default Mercator projection) when you pan the viewport. The Location Conversion section of this article explains how to convert shifted locations to valid geographical boundaries (-180 to 180).
Services like Geocode, Search, Routing use Longitude within the valid geographical boundaries.
RadMap exposes two methods which you can use to convert map coordinates.
This method accepts a location in the standard longitude range of the Mercator projection ( from -180 to 180 degrees), and returns a shifted location based on the shift of the map's center when panned outside of the standard longitude range.
Example 2: GetShiftedLocation method
Location shiftedLocation = this.myRadMap.GetShiftedLocation(standardLocation);
This method accepts shifted coordinates and returns a Location object by converting shifted location's to standard location in the range from -180 to 180 degrees.
Example 3: GetCoercedLocation method
Location desiredLocation = this.myRadMap.GetCoercedLocation(shiftedLocation);
When the wraparound feature is enabled on the RadMap the built-in MiniMap also has this functionality turned on. But when you are using the MiniMap as a standalone control you have to explicitly set its Wraparound property to True in order to turn the feature on.
The Wraparound property of the RadMap control that is linked to the MiniMap has a higher priority than the Wraparound property of the MiniMap.
The wraparound feature is supported by the following providers.