DeepEarth + OSM + VB.NET

Apr 20, 2009 at 11:58 AM
Hi

I added a Silverlight/VB Project to DeepEarth.sln with the page.xaml the same like in the OSMDeepEarthExample. My Page.xaml.vb Code is:

Imports DeepEarth.Provider.OpenStreetMaps
Partial Public Class Page
    Public Sub New()
        InitializeComponent()
        Map.BaseLayer.Source = New OsmTileSource(OsmMapModes.Mapnik)
    End Sub
End Class

When I start the app I see the MapControl with the light blue OSM background, coordinates are shown when moving the mouse over the map and zoom level is shown, too. Map.Layers.Count is 1, Map.BaseLayer.IsVisible is true, Map.IsMapLoaded is true.

BUT I DO NOT SEE THE MAP!?!? (When I start the OSMDeepMapExample I do see the map.)

Does anyone has an advice on that problem? Thanks in advance!

Stefan.
Developer
Apr 20, 2009 at 1:01 PM
I would first try moving the

Map.BaseLayer.Source = New OsmTileSource(OsmMapModes.Mapnik)
 
to the loaded or load completed event
Apr 20, 2009 at 1:13 PM
Thanks for your reply. Unfortunalty it doesn't solve the problem, whether I put it to Page Loaded or Map Loaded Event or even to a Button Click Event (then the map control turns light blue, when I click the button). But no map can be seen.
Apr 20, 2009 at 1:17 PM
btw When I set

OSMMap.BaseLayer.Source = New YhooTileSource(1)

it is the same problem: darkblue Yahoo background only...
Apr 20, 2009 at 9:32 PM
I solved the problem:

When I create the Silverlight project using the option "Automatically generate a test page to host Silverlight at build time" the map appears as I described above. Using "Add a new ASP.NET Web project to the solution to host Silverlight" everything works fine!

Stefan.