Auto zoom function?

2 posts, 0 answers
  1. Nikola
    Nikola avatar
    1 posts
    Member since:
    Oct 2014

    Posted 10 Oct 2014 Link to this post

    Hello,

    I was just wondering if there is a way to make the map always show the same extent, regardless
    of the size of the <div> element containing it?

    Something like an auto zoom function so the map always shows the same area?

    Best regards 
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 14 Oct 2014 Link to this post

    Hi,

    The Map extent method can be used as a setter in order to ensure that the given region is visible.
    It must be called after the map is initialized, as the initial configuration covers only center and zoom.

    For example, check out this snippet:
    var aus = new kendo.dataviz.map.Extent(
      [-10.683333, 113.155],   // North West location
      [-39.138889, 153.638889] // South East location
    );

    $("#map").getKendoMap().extent(aus);



    I hope this helps.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top