No map-tiles after call to SetView

10 posts, 0 answers
  1. Magnus
    Magnus avatar
    11 posts
    Member since:
    May 2015

    Posted 24 Oct 2018 Link to this post

    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

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3145 posts

    Posted 29 Oct 2018 Link to this post

    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.
  3. Magnus
    Magnus avatar
    30 posts
    Member since:
    Dec 2011

    Posted 29 Oct 2018 Link to this post

    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));
  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3145 posts

    Posted 01 Nov 2018 Link to this post

    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.
  5. Magnus
    Magnus avatar
    30 posts
    Member since:
    Dec 2011

    Posted 05 Nov 2018 Link to this post

    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

  6. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2421 posts

    Posted 08 Nov 2018 Link to this post

    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.
  7. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2421 posts

    Posted 09 Nov 2018 Link to this post

    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.
  8. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2421 posts

    Posted 14 Nov 2018 Link to this post

    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.
  9. Magnus
    Magnus avatar
    30 posts
    Member since:
    Dec 2011

    Posted 15 Nov 2018 in reply to Martin Ivanov Link to this post

    Hey,

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

  10. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3145 posts

    Posted 19 Nov 2018 Link to this post

    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.
Back to Top