Problem with Map at runtime

8 posts, 0 answers
  1. Fausto
    Fausto avatar
    1 posts
    Member since:
    Jul 2010

    Posted 14 Jan 2011 Link to this post

    Hi developers , i have realized the attached example of a Map with OpenStreetMapProvider (but with Bing provider it's the same).
    The problem is that at designtime it's all ok (i can see the map) , but when i go at runtime i don't see the map (only gray screen), but only the navigation buttons.

    My controls version is : 2010.3.1304.1040   (i have installed them because with RadControls_for_Silverlight_4_2010_3_1110_DEV.msi controls installed before it was not working equally !)....

    Have some suggestion ?

    (I have created one project in WPF with the same code and works ...)

    I you want , i can send my example

    Best regards







  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 18 Jan 2011 Link to this post

    Hi Fausto,

    There is a known problem which occurs when a Silverlight project is assigned as startup instead of 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 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.


    All the best,
    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. Derek Strickland
    Derek Strickland avatar
    5 posts
    Member since:
    May 2010

    Posted 30 Jan 2011 Link to this post

    Hi,

    I am having a similar issue.  I do have my web app set as startup however the map never displays and the ItemsRequest event never fires.  In my scenario I don't see any panning controls or anything I just get a blank grey box.  I am using Q3 SP1.  Does the fact that ItemsRequest never fires give you any indication of what I might be doing wrong?  

    Derek

    Screenshot attached
  5. Derek Strickland
    Derek Strickland avatar
    5 posts
    Member since:
    May 2010

    Posted 31 Jan 2011 Link to this post

    Another piece of data that might be useful is that if you click the surface of where the map should be you get the following error, presumably because nothing is drawn yet.   Don't know if this is useful or not but here it is.  I would be happy to zip up some code files for review if you let me know where to send them.  Or should I just attach here?

    Message: System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.Windows.Controls.Map.Location.PixelToLogical(RadMap mapControl, Point pixel, Boolean useTileLayer)
       at Telerik.Windows.Controls.Map.Location.GetCoordinates(RadMap mapControl, Point point, Boolean useTileLayer)
       at Telerik.Windows.Controls.Map.Location.GetCoordinates(RadMap mapControl, Point point)
       at Telerik.Windows.Controls.RadMap.OnMouseClick(Point point)
       at Telerik.Windows.Controls.Map.MouseControl.Timer_Tick(Object sender, EventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)     


  6. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 02 Feb 2011 Link to this post

    Hello Derek,

    This exception is the expected behavior for mouse click when the map provider is not assigned for the RadMap. In this case the geographical coordinates cannot be calculated from pixel coordinates by mouse events. Some map provider must be assigned for correct initializing of RadMap. The map control has built-in support of Bing Maps and Open Street Maps. These providers allow displaying the map tiles.
    For example you can assign the open street map provider from XAML code using the following way:
    <telerik:RadMap x:Name="RadMap1" ZoomLevel="7">
        <telerik:RadMap.Provider>
            <telerik:OpenStreetMapProvider />
        </telerik:RadMap.Provider>
    </telerik:RadMap>

    All the best,
    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>>
  7. Steve
    Steve avatar
    2 posts
    Member since:
    Dec 2010

    Posted 09 Feb 2011 Link to this post

    The following scenario (A) shows gray screen for BingMapProvider and works fine for OpenStreetMapProvider:

    Set as Startup Project: Silverlight project
    Silverlight project:
    Enable running out of browser: true
    Require elevated trust when running outside of browser: true
    Debug/Out-of-browser application: Silverlight project

    The following scenario (B) shows works for both BingMapProvider and for OpenStreetMapProvider:

    Set as Startup Project: Silverlight project
    Silverlight project:
    Enable running out of browser: true
    Require elevated trust when running outside of browser: true
    Debug/Out-of-browser application: Web project

    Except, if I install the OOB app locally, I get the following error when debugging:
    Illegal attempt to change an application's trust level in an update operation.

    ....

    I would like to be able to debug using scenario A to avoid the application error. Any help would be appreciated!

    Thank you
    Steve

  8. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 14 Feb 2011 Link to this post

    Hi Steve,

    Thank you for the feedback.
    We have reproduced the problem. We have created a PITS issue to fix it.
    You can track it using the following link:
    http://www.telerik.com/support/pits.aspx#/public/silverlight/4821

    Regards,
    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>>
  9. Steve
    Steve avatar
    2 posts
    Member since:
    Dec 2010

    Posted 15 Feb 2011 Link to this post

    Thank you
Back to Top
DevCraft banner