Compartilhar via


New Version of VE3D

You may have noticed that we have not blogged recently, and that’s because we’ve been hard at work on the next version of Virtual Earth 3D. The new version features some rendering improvements for the general user, but the most exciting part is for devs (well, that's what we think, but we ARE devs). We have enabled partial trust plug-ins, which means you can put your plug-in on the web, create a page that references it, and users can go see it without having to install anything more than the basic VE3D control.

 

Behind the scenes, we load your plug-in’s dll to the client and execute it with a limited set of permissions. For example, the plug-in cannot access the file system on its own, but you can still do custom rendering and control like you could before. We’ve updated all the samples you’ve seen so far to run like this, except for the x file loader and the shortcut key (which was an example of how to install one, and is still a valid scenario in some cases). We’ve also added a few new samples to show some new functionality and demonstrate some stuff that’s been there for awhile but we hadn’t gotten a chance to show yet.

 

Existing code built against VE3D will need to be recompiled, and in some cases we’ve moved a few properties around. The samples should cover most of these changes, but please comment or send us feedback on items that you have trouble with.

 

Get the new version!

 

Get the new samples!

Comments

  • Anonymous
    September 25, 2008
    PingBack from http://www.easycoded.com/new-version-of-ve3d/

  • Anonymous
    September 26, 2008
    Very nice! I really, really like the reduction in memory footprint.  Is this anywhere near what you are going to be at release?  Or is it going to bet better still? How does one enable traffic and weather on a Winform based app? I see some methods, but I dont see a sample using them. Also, when is the WPF version going to hit?  <grin> So many questions. <grin> Mark Merchant was going to get in touch with you about our interest in using this. Thanks Paul from THD.

  • Anonymous
    September 26, 2008
    Weather is easy (and trees too):            Guid[] gA = this.loader.LoadPlugIn(@"http://go.microsoft.com/fwlink/?LinkID=109495"); // trees            this.loader.ActivatePlugIn(gA[0], @"http://maps.live.com//Manifests/SM.xml");            gA = this.loader.LoadPlugIn(@"http://go.microsoft.com/fwlink/?LinkID=124120"); // clouds            this.loader.ActivatePlugIn(gA[0], @"http://maps.live.com//Manifests/WE.xml"); Traffic is a little trickier, because it's a complex data feed.  The short answer is:  use the Javascript API.  But you can get basic traffic flow imagery, without incident reports, by looking at the TerrainImages sample (it's the "TR" datasource).  Mark may be able to help you with the rest of the traffic data. It is possible for VE3D to play nice with WPF.  However we haven't ironed out all the kinks.  When we have the full story you'll probably see it here. We're always working on memory and perf.  :)

  • Anonymous
    September 28, 2008
    Nikolai, Thanks, Remember, I am playing with a WinForm app, using the VE3D control, so Javascript is right out. :) I tried to load the plugins (trees and weather ) you specified above, but I saw no visual changes.  Are they specific to a particular region?  I tried it in both my test app, and the SimpleForm in the Samples downloads. Thanks again. Paul

  • Anonymous
    September 29, 2008
    The comment has been removed

  • Anonymous
    September 29, 2008
    Great, thanks for the samples. I noticed that with a WinForms app using the GlobeControl, I no longer am able to display information in the lower right corner. With 6.1 I could use the globeControl.Host.WorldEngine.ShowXXX properties to control what is displayed. These properties still exist, but don't seem to control what is displayed. Is there a new interface I am missing? Thanks, Torrey

  • Anonymous
    September 29, 2008
    I have another question. I am trying display a set of tiles generated from MapCruncher. Looking at the TerrainImages example, the third method for adding images to the ground seems to fit my needs. I am trying to use the file system rather than IIS to store the tile images. In the connectionParameters for the DataSourceLayerData, I define the tilesource field as: tilesource"file://d:\LayersAlaska%4.png" When I add the DataSource I receive an exception stating that "A valid tile request format string was not supplied". Is it possible to have a tilesource like this that is on the local file system? If so, how do I format the "tilesource" field of the connectionParameters? Thanks, Torrey

  • Anonymous
    September 30, 2008
    So the clouds only appear when you are looking up?  I see them when I zoom down, and change my viewpoint to look sideways, but I dont see them if I am in the air looking down. Is there any talk about integrating near real time radar, or storm alerts?  If not, is the assumption that we would need to hook into a tile server to feed the data? Thanks, Neat stuff Paul

  • Anonymous
    September 30, 2008
    pmont: That cloud behavior is intentional, so as to minimize obstruction of the map.  The behavior is not user (or api)-controllable at the moment. Torrey: The tilesource string doesn't work with file system paths.  You will need to write your own DataSource.  Fortunately, reading tiles off the file system is pretty easy.  Start with the Mandelbrot sample.  In QueryPrimitivesInternal, you'll see some commented-out code that shows how to get a TileId from the query.  This can be changed into a RequestCode, which can be used as the %4 part to construct your file path.  Just read each file as a Bitmap, create a RasterPatch2, and return it. MapCruncher outputs tiles in Mercator, so also switch the RasterPatch2 to use MercatorCRS instead of Wgs84.

  • Anonymous
    December 29, 2008
    Hi, VE3D Team, I'm trying to bring up the Camera dll sample in a WebBrowser control under a partial trust environment. Have no problem loading and activating the dll from my local machine, but when I issue the Raise Event for the dll to 'jump' the globe to a random location, I get an HRESULT 0x80020101 error from the control. Any thoughts on what I might be doing wrong? Thanks, Clyde

  • Anonymous
    January 04, 2009
    Clyde, I'm sorry, I'm not very familiar with the WebBrowser control, having essentially just barely started using it with my most recent post.  I think that that error is a generic error from the WebBrowser.  I do not think that VE3D raises it. I just now tweaked the popup sample to open a Popup right away, instead of creating a GlobeControl on the form, and instead of calling Navigate with blank I passed the url to the public camera sample page (http://www.veteam.members.winisp.net/Spaceland/Samples/Camera/TestPage.htm).  I also get an error if I hit the jump button, though about a variable being null.  If I wait a bit, it starts working. I'm guessing that this is something with how I'm hosting the WebBrowser, and I think (unfortunately) I'm going to have to call this an "unsupported scenario".  Sorry.  Have you tried just hosting the globe control directly on your form, and using WebBrowser just for additional html content? You can still use partial trust on a WinForm by passing a GlobeControlInitializationOptions object to the GlobeControl ctor, using RestrictedAppDomain.GetAppDomain.  However, this involves AppDomain/marshalling fun and is not for the faint of heart.  I hope to post something on it sometime -- short story is that all your business logic should be in either a plug-in or an object that is CreateInstanceAndUnwrap'ed into the new AppDomain.

  • Anonymous
    January 08, 2009
    Nikolai, Happy New Year. Thanks for your reply. I have tracked down my problem more and also realized I could have been a bit clearer with my first message. Here's what I'm up against:

  1. Creating a WPF application that has to run in partial trust.
  2. Currently have VE hosted in a Web Browser control operating in 2D mode only.
  3. VE3D needs to be called based on events taking place in controls other than the control VE3D is hosted in.
  4. I can instantiate VE in 2D mode, then call against the VE Javascript API using the WebBrowser's InvokeScript method.
  5. If I try to instantiate VE in 3D mode from the WebBrowser's onload event the instantiation works fine but subsequent InvokeScript calls fail with an undetermined HRESULT error.
  6. If I try to instantiate VE in 3D by using an InvokeScript call from managed code into the WebBrowser the LoadMap function fails on an "unmanaged code" security permission exception.
  7. I was trying to use the undocumented plug-in load methods to get around this problem, but I can't seem to get past the unmanaged code security permission exception. I've tried lots of different options to give myself permission to call unmanaged code but nothing seems to work.
  8. I thought that by packaging the map control DLLs in my own assembly I could workaround the unmanaged code security restrictions. But I can't seem to find a way. Any suggestions appreciated. Clyde
  • Anonymous
    January 11, 2009
    Hello Clyde, I'm unclear from your description where the error is exactly.  Could you try checking VE3D's logs? Log files are generated at: (Vista) C:Users{username}AppDataLocalLowMicrosoftVirtual Earth 3D (XP) C:Documents and Settings{username}Local SettingsApplication DataMicrosoftVirtual Earth 3D If you don't see any logs, the user.config file is located at: (Vista) C:Users{username}AppDataLocalLowMicrosoftVirtual Earth 3D (XP) C:Documents and Settings{username}Application DataMicrosoftVirtual Earth 3D Add this to the config file:      <setting name="Logging" serializeAs="String">        <value>True</value>      </setting> If the errors are originating in VE3D I can probably help.  If it is WPF + WebBrowser then another forum might be better.  VE3D does use unmanaged code (DX), and is not intended to itself be in partial trust, but I can't immediately think of why your calls would fail but onload would be ok. You might also try seeing if you can catch the error in a debugger.  In VS try turning Just My Code off.

  • Anonymous
    January 16, 2009
    The comment has been removed

  • Anonymous
    January 16, 2009
    Nikolai, If I read the error log correctly it would appear that the VE3D control is accessed via the .NET Remoting Framework, and that between the time of my first call to LoadMap(...) and the second call to SetCenter(...) the Lease on that Remoting object has expired. Am I understanding this error report correctly? If this is the case, is there a way to extend the lease on the VE3D control? Clyde

  • Anonymous
    January 16, 2009
    Nikolai, I want to revise my last message. It appears that the lease being set more than once, so is there any way to prevent this. Clyde

  • Anonymous
    January 17, 2009
    The lease message and the cache message are both caused by trying to create VE3D twice in the same process, which is not supported.  I do not know if or how that would affect the second error, which doesn't seem to be directly related to 3D.

  • Anonymous
    February 09, 2010
    How do I force the GlobeControl to be in 2D instead of 3D in winforms?

  • Anonymous
    February 09, 2010
    Jun: Unfortunately you can't.  You can force the camera to always point straight down, and turn off certain 3D features like the elevation map and 3D models.  But when you zoom out you will still see it as a globe rather than a flat plane.

  • Anonymous
    February 09, 2010
    In the samples, the web-based ones have a "2D" button in the navigation pane.  That isn't available in the winforms control?

  • Anonymous
    February 09, 2010
    No.  The 2D mode there is implemented in javascript, while the 3D mode is implemented in C#.  It is possible to embed a browser instance in WinForms to use the 2D mode (in fact the sample set has an example of how to do that for html popups, which could be extended to do what you want).  It is not as straightforward, however, as embedding the 3D control directly.