This is a migrated thread and some comments may be shown as answers.

Problem with Map at runtime

7 Answers 224 Views
Map
This is a migrated thread and some comments may be shown as answers.
Fausto
Top achievements
Rank 1
Fausto asked on 14 Jan 2011, 11:09 AM
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







7 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 18 Jan 2011, 06:06 PM
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>>
0
Derek Strickland
Top achievements
Rank 1
answered on 31 Jan 2011, 12:55 AM
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
0
Derek Strickland
Top achievements
Rank 1
answered on 31 Jan 2011, 10:07 PM
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)     


0
Andrey
Telerik team
answered on 02 Feb 2011, 10:15 AM
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>>
0
Steve
Top achievements
Rank 1
answered on 09 Feb 2011, 04:52 PM

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

0
Andrey
Telerik team
answered on 14 Feb 2011, 09:18 AM
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>>
0
Steve
Top achievements
Rank 1
answered on 15 Feb 2011, 02:56 PM
Thank you
Tags
Map
Asked by
Fausto
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Derek Strickland
Top achievements
Rank 1
Steve
Top achievements
Rank 1
Share this question
or