Map with Bing provider not loaded

7 posts, 1 answers
  1. Vien Nguyen
    Vien Nguyen avatar
    8 posts
    Member since:
    Jul 2007

    Posted 25 Jan 2011 Link to this post

    For evaluation purpose, I created a RadMap and applied for a Bing key but for some reason the map is not loaded. I'm running the app from VS, does that matter? Does the name of the app and the domain matter since this is for evaluation only? Thanks.
  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 28 Jan 2011 Link to this post

    Hi Vien Nguyen,

    There is a known problem which occurs when a Silverlight project is assigned as startup instead of a Web project. In this case the tiles are displayed in design time and are not displayed at runtime, because the security policies do not allow downloading data from Web.

    You should create a Web project which will be used to run your Silverlight application (if Visual Studio didn’t do it for you) and set it as startup project. Usually Visual Studio asks you to create that project when you create Silverlight solution.

    If this is not the case, I am afraid we can't help you with this problem without seeing your code. Could you, please, create a sample solution which demonstrates things you are trying to implement and send it to us?

    Best wishes,
    Andrey Murzov
    the Telerik team

    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Jenya
    Jenya avatar
    3 posts
    Member since:
    Jun 2011

    Posted 16 Jun 2011 Link to this post

    Hello, 

    I'm running silverlight application withing WinForm's WebBrowser control. I'm using built-in BingMapProvider. Initialization looks like this:

     this.provider = new BingMapProvider(MapMode.Road, true, this.VEKey);
     this.radMap1.Provider = provider;

    If I run my silverlight app as "web project" or "out of the browser" project I have no problems accessing Bing Maps, but when I run my app withing WebBrowser control in WinForm, the map doesn't display. 
    Do you have a solution for this problem

    Sincerely,
    Jenya 
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 17 Jun 2011 Link to this post

    Hi Jenya,

    It seems you read html-page from your local file system or from resource. In this case the security policies of Silverlight do not allow downloading map tiles from Web.
    We have tried navigating to our Silverlight example from Web using the following code:
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
     
        private void Form1_Load(object sender, EventArgs e)
        {
            this.webBrowser1.Navigate(new Uri("http://demos.telerik.com/silverlight/#Map/DataBinding"));
        }
    }

    Bing Maps work as expected.

    Kind regards,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Jenya
    Jenya avatar
    3 posts
    Member since:
    Jun 2011

    Posted 17 Jun 2011 Link to this post

    Andrey,

    This is not exactly what I'm looking for. Your example shows navigation to Silverlight  from WebBrowser control.
    I'm having trouble within Silverlight itself.
    I'm using same Silverlight app for both web and desktop. I use WinForms only as a container to host my Silverlight application on desktop (such design is intended, I'm not looking to run Silverlight application as "out of browser"). My problem is when I host my Silverlight application within my web project, I have no problems accessing RadMap provider. When I host exactly same application (.xap file within WebBrowser control in WinForm) map provider doesn't load.

    Do you have any other ideas how this can be resolved?

    Sincerely,
    Jenya
  7. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 21 Jun 2011 Link to this post

    Hello Jenya,

    The RadMap can't show map tiles when XAP file is hosted in your Windows Forms application directly. This happens because Silverlight security blocks loading of the images from Internet into Image and MultiScaleImage controls when XAP file isn't loaded to the browser from the Internet or when Silverlight application is run in the OOB mode.

    Regards,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Jenya
    Jenya avatar
    3 posts
    Member since:
    Jun 2011

    Posted 21 Jun 2011 Link to this post

    Thanks
Back to Top
DevCraft banner