How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/USZipCodeData/US_ZipCodes.shp and <Your ArcGIS Developer Kit Install directory>/Samples/data/USZipCodeData/ZipCode_Boundaries_US_Major_Cities.shp.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
- Start Visual Studio, open the solution file, and build the project.
- Open a GlobeControl application or ArcGlobe.
- From the toolbars list, select the Weather toolbar to add to the application.
- Click Load Layer to connect to the Yahoo RSS weather service.
Additional information
The following items are covered in this sample:
- Implementing a GlobeCustomLayer through inheritance of a BaseClass.
- Consuming Web services (Yahoo really simple syndication [RSS] service).
- Executing a lengthy ArcObjects task on a background thread.
- Sharing resources between multiple threads.
- Updating user interface (UI) components from a background thread to keep responsiveness.
- Creating OpenGL display lists.
- Mapping a bitmap into OpenGL texture and binding the texture to a geometry.
- Technique to filter items that are outside the viewport.
- Technique to billboard items.
- OpenGL selection buffer (to perform select by area).
- Implementing identification.
- Implementing commands and tools to interact with a custom layer.
- Implementing a toolbar for GlobeControl and ArcGlobe.
RSSWeatherLayer3DClass.cs | Implementation file of the custom layer. |
GlobeWeatherIdentifyObject.cs | Implementation file of IIdentifyObject required to support standard identification. |
IdentifyDlg.cs | Identify dialog box used by the Identify object. |
AddWeatherLayerCmd.cs | Command that connects and disconnects the layer from RSS Web service. |
RefreshLayerCmd.cs | Command that produces the update thread of the layer. |
AddWeatherItemCmd.cs | Command that allows adding weather items by a given ZIP Code. |
ZipCodeDlg.cs | Dialog box where users type a ZIP Code to add new weather items. |
AddWeatherItemTool.cs | Tool that allows adding weather items by clicking a location on the Globe. |
SelectByCityNameCmd.cs | Allows selection of weather items from a list according to the city name. |
WeatherItemSelectionDlg.cs | Selection dialog box for the SelectByCityName command. |
SelectItemsTool.cs | Selection tool that allows select by location. |
WeatherLayerToolbar.cs | Toolbar that hosts the layer's commands and tools. |
GlobeCustomLayerBase.cs | Abstract base class implementing essential interfaces required to implement an ArcGIS layer for ArcGlobe and GlobeControl. |
Download the files for all languages
See Also:
How to get and install an OpenGL wrapper for .NETHow to draw a geographical object on the globe using direct OpenGL plug-in
Implementing custom globe layers with dynamic feed
How to draw mouse feedback on the globe using direct OpenGL plug-in
Writing multithreaded ArcObjects code
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime: 3D |
ArcView: 3D Analyst | ArcView: 3D Analyst |
ArcEditor: 3D Analyst | ArcEditor: 3D Analyst |
ArcInfo: 3D Analyst | ArcInfo: 3D Analyst |