In an earlier post we talked about some of the new SDK features in the latest release (Build 410). In that post we mentioned the addition of OpenGL support and included a screenshot showing wind vectors implemented using OpenGL in Explorer. Here’s a link to a YouTube movie showing that in action.
(submitted by Rob Dunfey, ArcGIS Explorer SDK Development Team)
The latest release of ArcGIS Explorer includes a host of enhancements to the API, creating new opportunities for custom task developers. The custom task framework genuinely differentiates ArcGIS Explorer from other virtual globes, allowing users to plug in custom functionality directly into the main application.
The most notable of the API enhancements are changes to the View3D class. This class controls the main viewing window in ArcGIS Explorer (the window which displays the globe). New methods and events on the View3D class now allow developers to render OpenGL graphics on top of the view. In the example below, we’ve drawn wind vectors using OpenGL.
If you step back and think about this, it really is a quite powerful feature. What you choose to draw to the globe is now only limited by your imagination. A new developer sample in the SDK illustrates how you can use these new methods and events to draw grid lines and symbols on top of the globe, but perhaps you will choose to render a Second Life avatar? More usefully, you may want to display a unique watermark on top of the globe when viewing a particular layer, or incorporate the output from other specialist modelling software.
Other changes to the View3D class include a new property that enables your custom task to alter the vertical exaggeration of the globe surface, and a FlyPolyline method that will allow you to fly along a polyline. This is similar to the functionality available in the application when you right-click a result from the Get Driving Directions task.
We’ve also added methods and properties to the View and Layer classes to give developers greater control over the caching of layers. Now when you add layers to ArcGIS Explorer with a custom task, you can use the new CacheType layer property to determine how ArcGIS Explorer caches the layer, just like when you add layers via the ArcGIS Explorer user interface.
In addition, the new RemoveLayerCache method on the View class allows your custom task to delete a layer cache. Using these new members in combination as a developer, you have far greater control of layer caching, and can ensure layers representing dynamic data sources remain current.
New methods and properties have also been added to the API to help developers work with results. For example, the new AutoZoom property on the TaskContext will automatically zoom the observer to the location of any new results that are passed to the task context. Using this, and adding just a single line of code should make for more user friendly custom tasks.
The new SetZoomPerspective on the Result class lets the custom task developer define the location from which a particular result should be viewed when zoomed to in the application. Again, this should make for more user friendly custom tasks.
We’ve also fixed a bug with the LocalLayer class so that it can be used to represent kml files stored on a web server. Previously it didn’t recognize the http prefix which meant this wasn’t possible. Perhaps you want to build a custom task that searches the web for KML files and displays the KML files it finds in ArcGIS Explorer? With this fix, now you can.
And finally, a number of constructor overloads have been added to the API which should make for less lines of code.