Terrain Imagery Overlays
There are four ways to add custom imagery to VE3D. The first three involve using built-in classes, and you just have to provide information on where to get the data. The fourth involves implementing your own DataSource.
This sample demonstrates how to add common terrain imagery data to the world, and adds a simple tour to display the example data sets. We then use two events, one a built in data load event, and the other a custom event we created using the Step class, to tell the control to FlyTo a series of locations.
When the PlugIn is Activated, we create three datasources using built-in settings. The first uses a SingleImageDataSource, which reads data from a Bitmap object in memory and draws it on the terrain. The second uses a "content manifest", which is an xml file that describes the data, how to display it, and where to get it. An example is here. The last uses a parameter string, and is similar to VETileSourceSpecification. The % replacement variables in tilesource have the same numbers as those listed at the top of the xml manifest. The parameter string is also a good method for adding WMS server data.
It is also possible to create your own datasources.
This sample demonstrates how to add terrain imagery via a custom datasource. This one generates a colored Mandelbrot set.
When the PlugIn is Activated, we create our DataSource and add it to the system. We also save off any existing datasources so we can add them back again later. Once it is added, the data threads query it when we move into a new area, entering at QueryPrimitivesInternal. We use the bounding area of the query to generate an appropriate section of the Mandelbrot set, and return it as a rasterized image. This image is then displayed by the system.
This method is good if you have special request logic, or want to do some of the work client-side (in this case, all the work is client-side). This saves you from having to have a large server dataset of pre-rendered tiles, or execute expensive code on your servers. There are notes in the sample code for how to use this code to get information about the area you are looking at and generate appropriate request URLs, etc.