5 Answers, 1 is accepted
Hi Patrick,
The user mode string is passed to the built in minimap. There are 3 ways to show the mini map:
- use the built in mini map
- use the MiniMap outside map with UseParentMapProvider False and providing own provider
- use MiniMap outside map with UseParentMapProvider True
<telerik:RadMap x:Name="radMap" Margin="0 0 256 0"/>
<telerik:MiniMap x:Name="MiniMap1" HorizontalAlignment="Right"
UseParentMapProvider="False"
MapControl="{Binding ElementName=radMap}"
UseSpringAnimations="True"
IsViewportAreaVisible="True"
ViewportAreaZoomReduction="1"
Width="256" Height="200">
<telerik:RadMap.Provider>
<telerik:OpenStreetMapProvider StandardModeUserAgent="mini map user agent"/>
</telerik:RadMap.Provider>
</telerik:MiniMap>
<telerik:MiniMap x:Name="MiniMap2" HorizontalAlignment="Right" VerticalAlignment="Bottom"
UseParentMapProvider="True"
MapControl="{Binding ElementName=radMap}"
UseSpringAnimations="True"
IsViewportAreaVisible="True"
ViewportAreaZoomReduction="1"
Width="256" Height="200">
</telerik:MiniMap>
I am attaching the result of these 3 usages in a snapshot and also I am sending you my test application (I tested against R1 2020 release). Please let me know if I am missing something.
Regards,
Petar Mladenov
Progress Telerik
Hi Petar,
In your example code, you define explicitely the mini map.
If you define just the map control in XAML and the mini map is displayed, it is empty.
<os:osRadMap Name="Map">
<tk:RadMap.Provider>
<tk:OpenStreetMapProvider APIKey="xxx"/>
</tk:RadMap.Provider>
</os:osRadMap>
Sorry for the formatting, but the formatting options toolbar doesn't work.
Hello Patrick,
The first Map from the given 3 in XAML uses the built in MiniMap. The user mode agent is provided in code behind:
OpenStreetMapProvider openStreetMap = new OpenStreetMapProvider()
{
// This user agent should be set per application.
// Please specify different string in your application.
StandardModeUserAgent = "Telerik UI for WPF SDK samples"
};
this.radMap.Provider = openStreetMap;
Where do you set your user agent string ?
Regards,
Petar Mladenov
Progress Telerik
Hi Petar,
Attached is a version of your application that doesn't work! (sorry, but I can't attach a zip file here...)
The differences are:
- This is a .NET Core application.
- I'm using the NoXaml libraries.
- I'm using the Office2016 theme.
I think that the main problem is the use of .NET Core.
Hello Patrick,
Thank you for the additional details. We managed to reproduce the issue and indeed, the user agent string is not passed to the MIniMap. So please accept my apologies for misleading you previously. We will provide a fix for the upcoming Service Pack next week.
On side note, the strange part of this case is that both our RadMap and the MiniMap somehow manage to work with no user agent string in Net Framework project. I tested application with user agent string, then removed it and the maps were still working. This was not true in Net Core project. Once I remove the string, map is not shown. This make me think there is some net core difference in the open street map servers.
Regards,
Petar Mladenov
Progress Telerik