Bing maps blocked under https on chrome and FF

4 posts, 0 answers
  1. Nick
    Nick avatar
    15 posts
    Member since:
    Nov 2007

    Posted 08 Aug 2014 Link to this post

    Hello guys, I have been working on an application using kendo maps, and everything went smooth till I tried to publish it into an https website. My map have two layers, the first one works perfectly but the one with Bing Maps never download the tiles.

    This is my code:

     @(Html.Kendo().Map()
                .Name("mapwrapper")
                .Center(0, 0)
                .Zoom(2)
                .MaxZoom(16)
                .MinZoom(6)
                .Controls(controls=> controls.Navigator(false).Zoom(zoom=>zoom.Position(MapControlPosition.TopLeft)))
                .Layers(layers =>
                {
                    layers.Add()
                        .Type(MapLayerType.Tile)
                        .UrlTemplateId(Url.Action(null, "Tiles") + "?z=#= zoom #&x=#= x #&y=#= y #")
                        .Subdomains("a", "b", "c");

                    layers.Add()
                       .Type(MapLayerType.Bing)
                       .ImagerySet(MapLayersImagerySet.AerialWithLabels)
                       .Key("ApeI4THhSxCEqiGhrt4bEat9QIC_gCz8XXXXXXXXXXXXXXXX").Opacity(0);

                })
                    .Events(events => events
                        .PanEnd("panEnd")
                        .ZoomStart("clearCanvas")
                        .ZoomEnd("zoomEnd")
                        .Click("onMapClick")
                        .ShapeCreated("onShapeCreated")
                )

    I have been inspecting the Javascript console on Chrome and shows this error:

    The application was loaded over HTTPS, but ran insecure content from 'http://dev.virtualearth.net/REST/v1/Imagery/Metadata/aerialwithlabels?outpu…z8ZHbGFu2qwIDypA4lEwRnAi8a_k7MvxwD&callback=bingTileParams&_=1407503550662': this content should also be loaded over HTTPS.

    It works on Internet Explorer but not on Chrome and Firefox, last versions.

    Do you know how could I fix this problem?

    Thanks.

    Best Regards.

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2771 posts

    Posted 08 Aug 2014 Link to this post

    Hi,

    Thank you for reporting this problem. We'll get it fixed for the internal builds, but for the moment you can use the following workaround:
    <script>
          kendo.dataviz.map.layers.BingLayer.fn.options.settingsUrl =
           "//dev.virtualearth.net/REST/v1/Imagery/Metadata/#= imagerySet #?output=json&jsonp=bingTileParams&include=ImageryProviders&key=#= key #";
    </script>

    Place it after the Kendo scripts are included on the page, but before the Map widget.

    As a token of gratitude for your involvement your Telerik points have been updated.

    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
  4. Nick
    Nick avatar
    15 posts
    Member since:
    Nov 2007

    Posted 08 Aug 2014 in reply to T. Tsonev Link to this post

    Thanks, I appreciate, you will take this into account for future versions.

    Your solution actually fixed the problem on Chrome, but is still not working on Firefox, anyway for me is enough with Chrome.

    Thanks a lot for your quick answer.
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2771 posts

    Posted 11 Aug 2014 Link to this post

    Hi,

    Thanks for the heads-up. I've identified and fixed a couple of additional issues.
    This should take care of Firefox and any mixed-content warnings.

    We'll upload an internal build today with all fixes included.
    Apologies for the caused inconvenience.

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