Open Street Map Example?

Jul 25, 2011 at 2:25 PM


Is there any OSM example for Deep Earth? I read about such one in older discussions, but I can't seem to find it in the recent source code.

Jul 26, 2011 at 10:39 AM
Edited Jul 26, 2011 at 12:34 PM

OK, I figured out how to use OSM as a TileSource by myself now.


I used your ExampleControl in the SL4-branch and changed the MyMap.BaseLayer.Source to the OsmTileSource class.


However, I had to remove the de_cordpanel:NavigationPanel in the XAML. Otherwise the app won't load. What's wrong with that control?



Something I noticed, when running the ExampleControlWeb is the following exception. Removing the NavigationPanel helps to clear the exception:

Unhandled Error in Silverlight Application Setting property 'System.Windows.FrameworkElement.Style' has caused an exception. [Line: 31 Position 39] at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)\n at Example.Control.MainPage.InitializeComponent()\n at ExampleControl.MainPage..ctor() at ExampleControl.App.Application_Startup(Object sender, StartupEventArgs e)\n at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args\n at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)");

I had to translate the errorMsg myself, due to VS' localization, so it's possible the message isn't 100 % accurately translated.

Jul 26, 2011 at 2:08 PM

I got another hint. I had a look into the NavigationPanel sources and I noticed my system is missing the Microsoft-Expression.Interactions- and the System.Windows.Interactivity-dlls. I removed the usages of those libraries in the generic.xaml and then the ExampleControlWeb worked without any problem.

Unfortunately my own solution still doesn't work with these changes. I already deleted and recompiled the NavigationPanel.dll and put a new reference to it in my project. But the Silverlight app still isn't finishing loading.

Jul 26, 2011 at 2:17 PM

Well, problem solved.

I installed the Expression Blend SDK, put in the code lines that required the missing dlls again and referenced the libs. Then I also put references to those libs in to my own project. And now everything works everywhere.