메소드 | 설명 | |
---|---|---|
AddItem ( long zipCode ) : bool | ||
AddItem ( long zipCode, double lat, double lon ) : bool | ||
Connect ( ) : void |
connects to the RSS weather service
|
|
DeleteItem ( long zipCode ) : bool |
delete an item from the dataset
|
|
Disconnect ( ) : void |
disconnects from the RSS weather service
|
|
DrawImmediate ( IGlobeViewer pGlobeViewer ) : void |
This is where the actual drawing takes place.
|
|
Flash ( long zipCode ) : void |
specify the item to flash
|
|
GetCityNames ( ) : string[] |
get a list of all citynames currently in the dataset. Please note that since the unique ID is zipCode, it is possible to have a city name appearing more than once. |
|
GetClassID ( System.Guid &pClassID ) : void | ||
GetWeatherItem ( long zipCode ) : IPropertySet |
This method searches for the record of the given zipcode and retunes the information as a PropertySet.
|
|
GetWeatherItem ( string cityName ) : IPropertySet |
get a weather item given a city name. a city might have more than one zipCode and therefore this method will return the first zipcOde found for the specified city name. |
|
Hit ( int hitObjectID, ESRI pHit3D ) : void |
Hit method is used to get items by interacting with the display (such as select by area). The mechanism used in here is OpenGL selection buffer. Each object is assigned with a unique id (zipCode) and is loaded to the selection buffer 'glLoadName'. The globe framework will return this ID and we will use it in order to select the items from the table.
|
|
Identify ( IGeometry pGeom ) : IArray |
Identifying all the weather items falling within the given envelope
|
|
Load ( IStream pstm ) : void | ||
RSSWeatherLayer3DClass ( ) : System |
The class has only default CTor.
|
|
RefreshDB ( ) : void |
Run the update thread calling this method too frequently might end up in blockage of RSS service. The service will interpret the excessive calls as an offence and thus would block the service. |
|
Select ( long zipCode, bool newSelection ) : void |
select a weather item by its zipCode
|
|
UnselectAll ( ) : void |
unselect all weather items
|
|
ZoomTo ( long zipCode ) : void |
Zoom to weather item according to its zipcode
|
|
ZoomTo ( string cityName ) : void |
Zoom to a weather item according to its city name
|
메소드 | 설명 | |
---|---|---|
OnHandleDestroyed ( |
메소드 | 설명 | |
---|---|---|
AddWeatherItem ( long zipCode, double Lat, double Lon ) : void |
Makes a request against Yahoo! RSS Weather service and add update the layer's table
|
|
CreateDisplayLists ( ) : void |
Create the display lists used by the layer the cal to this method must be made from BeforeDraw, AfterDraw or DrawImmidiate. calling this method from anywhere else might end up in unexpected results since OpenGL state is not guaranteed |
|
CreateGeographicSpatialReference ( ) : ISpatialReference |
create a WGS1984 geographic coordinate system. In this case, the underlying data is in WGS1984 as well as the input required by the globe. for that reason, there is no need to reproject the data.
|
|
CreateTexture ( |
Given a bitmap (GDI+), create for it an OpenGL texture and return its ID in order to allow hardware acceleration, texture size must be power of two. |
|
DrawItem ( |
draw an item on the globe's surface the magnitude determine whether to draw the item as a dot or with the icon symbol. The determination of the magnitude threshold is empirically. |
|
GetLayerExtent ( ) : IEnvelope |
get the overall extent of the items in the layer
|
|
InitializeLocations ( ) : void |
Initialize the location table. Gets the location from a featureclass
|
|
InitializeTables ( ) : void |
initialize the main table used by the layer as well as the texture table. The base class calls new on the table and adds a default ID field.
|
|
InsideViewport ( double x, double y, double z, double clipNear, uint mode ) : bool |
Test whether an item is inside the current viewport given geocentric coordinate, convert it into window coordinate and then test whether it is within the current viewport |
|
OnRedrawEventHandler ( ) : void |
Globe redraw event handler. since this method is the delegate method of an 'Invoke' call it is guaranteed to run on the main thread and therefore does not end up in making cross apartment COM calls |
|
OnRedrawUpdateTimer ( object sender, System.Timers.ElapsedEventArgs e ) : void |
Globe redraw timer event
|
|
OnUpdateTimer ( object sender, System.Timers.ElapsedEventArgs e ) : void |
run the thread that does the update of the weather data
|
|
OrientBillboard ( ) : void |
orient the weather icons so that it'll face the camera
|
|
PopulateLocationsTableProc ( ) : void |
Load the information from the MajorCities featureclass to the locations table
|
|
ThreadProc ( ) : void |
the main update thread for the layer. Sine the layer gets the weather information from a web service which might take a while to respond, it is not logical to let the application hand while waiting for respond. Therefore, running the request on a different thread frees the application to continue working while waiting for a response. Please note that in this case, synchronization of shared resources must be addressed, otherwise you might end up getting unexpected results. |
public AddItem ( long zipCode, double lat, double lon ) : bool | ||
zipCode | long | |
lat | double | |
lon | double | |
리턴 | bool |
public DrawImmediate ( IGlobeViewer pGlobeViewer ) : void | ||
pGlobeViewer | IGlobeViewer | |
리턴 | void |
public GetWeatherItem ( long zipCode ) : IPropertySet | ||
zipCode | long | |
리턴 | IPropertySet |
public GetWeatherItem ( string cityName ) : IPropertySet | ||
cityName | string | |
리턴 | IPropertySet |
protected OnHandleDestroyed ( |
||
e | ||
리턴 | void |
public Select ( long zipCode, bool newSelection ) : void | ||
zipCode | long | |
newSelection | bool | |
리턴 | void |