This is a migrated thread and some comments may be shown as answers.

Mini-map not displayed with OpenStreet map provider

5 Answers 324 Views
Map
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 11 Feb 2020, 06:35 AM

Hello,

With this provider, the mini map is no more displayed.

That's certainly because you have introduced the StandardModeUserAgent property and this property is not copied to the mini map...

5 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Feb 2020, 07:43 AM

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 11 Feb 2020, 07:48 AM

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.

0
Petar Mladenov
Telerik team
answered on 11 Feb 2020, 08:05 AM

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 11 Feb 2020, 08:32 AM

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.

0
Petar Mladenov
Telerik team
answered on 11 Feb 2020, 09:52 AM

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Map
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Petar Mladenov
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or