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

No map-tiles after call to SetView

9 Answers 41 Views
Map
This is a migrated thread and some comments may be shown as answers.
Magnus
Top achievements
Rank 1
Magnus asked on 24 Oct 2018, 09:31 AM

I've got a map that's initialized to a certain area by a call to SetView, and the zoom-level ends up at 4. I've also got a bunch of predefined areas to jump to, and we do this by calling SetView with a LocationRect. I've noticed that when the SetView-call ends up zooming in to level 19, 20 or 21, no map tiles are loaded and the view is empty. I have to zoom out to level 18 until they are loaded. The MiniMap looks right though. Any idea what could cause this behaviour? Once i have zoomed out to level 18 I can jump to level 19-21 with map-tiles showing.

I'm using the suggested HttpsOpenStreetProvider from this thread: https://www.telerik.com/forums/openstreetmapprovider-through-https

9 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 29 Oct 2018, 09:11 AM
Hello Magnus,

This looks like an issue on our side, however to confirm it we need to reproduce it locally. Can you send us some concrete locations (or location rects) that we can test and eventually reproduce this ? We will then soon confirm if this is a bug and if there is a possible workaround.

Thank you in advance for your cooperation.

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
Magnus
Top achievements
Rank 1
answered on 29 Oct 2018, 10:09 AM
Hi,

Any fully zoomed in locations will do, but try these:

var startLocation = new LocationRect(new Location(70, 4), new Location(54, 25));
var errorLocation1 = new LocationRect(new Location(42.6507086628233, -336.620825904608), new Location(42.6509666991224, -336.620103639365));
var errorLocation2 = new LocationRect(new Location(51.5155663888661, -0.0861173897981645), new Location(51.5157847123794, -0.0853951245546342));
0
Petar Mladenov
Telerik team
answered on 01 Nov 2018, 06:52 AM
Hi Magnus,

Here is a summary of the test we have done with the given 3 LocationRect you provided. On Loaded event, we set startLocation and we end up in ZoomLevel 4 above Sweden and Norway. On a button clicks, errorLocation1 goes to the end of the Map which is somehow expected since the longitude exceeds its boundaries [-180;180]. The next location goes to zoom level 20 somewhere in London. Could you please comment on whether you reproduce the same behavior on your side and if not , what are the differences ? Let us know if we have missed something in the setup. Thank you in advance.

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
Magnus
Top achievements
Rank 1
answered on 05 Nov 2018, 08:24 AM

Hi!

I've put a simple app which can be used to reproduce the issue on my Google Drive. The four buttons jumps to the same location, but zoomed out at different levels. Red button = error, green button = ok.

When putting this application together I actually found a way around the bug, and probably why you couldn't reproduce it. If I set WrapAround=false, then it works as expected! And false is the default behaviour, right? I guess that's an important clue.

https://drive.google.com/open?id=1Z1AUxqrAd5IKocCDRD6eOHy_5uiBk4qP

0
Martin Ivanov
Telerik team
answered on 08 Nov 2018, 08:13 AM
Hi Magnus,

I will check your project later today and let you know about my thoughts on this.

Regards,
Martin Ivanov
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
Martin Ivanov
Telerik team
answered on 09 Nov 2018, 01:30 PM
Hello Magnus,

I am checking what happens but it seems the issue is a bit more time consuming than expected. I will investigate this further and let you know about my findings at the beginning of the next week.

Regards,
Martin Ivanov
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
Martin Ivanov
Telerik team
answered on 14 Nov 2018, 03:14 PM
Hey Magnus,

Sorry for the late reply. I am afraid that I will need more time to get back on this. I can get back to you at Monday. In the meantime, you can disable the wraparound feature. Or you can try play with the MinZoom and MaxZoom properties of the map.

Regards,
Martin Ivanov
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
Magnus
Top achievements
Rank 1
answered on 15 Nov 2018, 10:27 AM

Hey,

Yes, we have solved it temporarily by disabling wrapping. Thanks for getting back!

0
Petar Mladenov
Telerik team
answered on 19 Nov 2018, 04:16 PM
Hi Magnus,

We managed to investigate the behavior with empty tiles with Wraparound turned On. We can now confirm it is an issue in the RadMap control and we logged it in our feedback portal where you can track its status.

Map: Tiles are not loaded when wraparound is true and zoom level is above the provider's mapsource's MaxZoomLevel.

We also updated your telerik account points as a thanks for your cooperation.

The bug is related with the maximum zoom level that a specific provider supports and difference in the mechanism of loading tiles when wraparound feature is on/off. With that in mind , you can try a workaround without turning off the wraparound. After calling SetView, coerce the zoom level of RadMap the following way:

private void ButtonBase_OnClick_1(object sender, RoutedEventArgs e)
       {
           var errorLocation1 = new LocationRect(new Location(56.3784606590572, 13.9710678130389), new Location(56.3782664007384, 13.9717900782824));
           RadMap.SetView(errorLocation1);
 
           if (RadMap.ZoomLevel > 18)
           {
               RadMap.ZoomLevel = 18;
           }
       }

18 is actually the constant specified by the OsmTileMapSource's DefaultMaxZoomLevel property. Unfortunately, there is no elegant way to get it in code. You can add public property in your custom class to access MaxZoomLevel property of the OsmTileMapSource class.

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
Magnus
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Magnus
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or