This project is read-only.

Creating new Project and adding DE libraries

Jan 30, 2009 at 10:47 AM
Edited Jan 30, 2009 at 11:55 AM
Hi, maybe this may seem to be a dumb question but I need help with creating a new project and adding Deep Earth components to it. I created a new project and added DeepEarth, DeepEarth.Provider, DeepEarth.VirtualEarth and DeepEarth.Services projects. While creating project I added a new web page project to be able to test it in browser. I referenced projects in my Silverlight app. Next, I placed VE Map, CordControl and other controls to  my Silverlight page but nothing happens when i tryout my page. How can I do this wright?
Jan 30, 2009 at 12:21 PM

you need to have a dev account for the VE webservices and make sure you have the ID and Password set in the webconfig for the Website, look in the prototype project web.config to see how it is setup or copy the web.config from the prototype web project to your new website 

you can see how to set up an account here if you have not already dome this


in the prototype silverlight project you will see a file called "ServiceReferences.ClientConfig"

in this file you will see a bunch of "EndPoint" configurations
the first one is to point to your new website project

<endpoint address="http://localhost:52638/DeepEarthPrototypeWeb/Services/VETokenService.svc"

          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITokenService"

          contract="TokenService.ITokenService" name="BasicHttpBinding_ITokenService" />

you will need to update the "address" value to match the parth/url and port number for your new website project...

in the prototype web project the port number is set to always be the same number, you might want to also do this in yout new website project, else you would have to update this port number in this line from time to time.

Jan 30, 2009 at 12:46 PM
Edited Jan 30, 2009 at 12:47 PM
Also you need to set the Tile Provider for the map.BaseLayer.Source... 
you can see this in the page.cs file of the prototype siverlight project 

   13 using DeepEarth.Provider.OpenStreetMaps;

   14 using DeepEarth.Provider.OpenAerialMaps;

   15 using DeepEarth.Provider.VirtualEarth;

   36             //Choose your startup provider

   37             map.BaseLayer.Source = new VeTileSource(VeMapModes.VeHybrid);

   38             //map.BaseLayer.Source = new OsmTileSource(OsmMapModes.Mapnik);

   39             //map.BaseLayer.Source = new OamTileSource(OamMapModes.OAM);

Jan 30, 2009 at 12:48 PM
sorry correction...

you can see this in the page.cs file of the prototype Silverlight project 
Jan 31, 2009 at 7:38 PM
Edited Jan 31, 2009 at 7:44 PM
I did everything you said and also added Services/VETokenService.cs file to my Silverlight.Web project. When i compile Web app, page loads and all controls are working but the background is dark blue with no map loaded. Then, couple secondes after app crashes showing this error ->
Feb 1, 2009 at 2:45 AM
the way I can recreate your error is to change the address value in the below line to one that does not match the location of my "VETokenService.svc"

<endpoint address="http://localhost:52638/DeepEarthPrototypeWeb/Services/VETokenService.svc"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITokenService"
          contract="TokenService.ITokenService" name="BasicHttpBinding_ITokenService" />

in the DeepEarthPrototypeWeb project you will see a folder called "Services"
you need to have this service in your new website and the address value needs to point to that service
this service is what will get you the "Token" needed for the VE webservices to get the tile images

Feb 1, 2009 at 9:52 AM
The problem was I did not add reference in my web project (Right click on Bin | Add Reference) to DeepEarth.Provider.VirtualEarth.Services. Now everything works just fine.

Thanks dotnetnoobie! You helped me a lot!