C# 클래스 RSSWeatherGraphicTracker.RSSWeather

파일 보기 프로젝트 열기: Esri/arcobjects-sdk-community-samples 1 사용 예제들

공개 메소드들

메소드 설명
Init ( IBasicMap mapOrGlobe ) : void
RSSWeather ( ) : System
Remove ( ) : void
UpdateTracker ( WeatherItemEventArgs weatherItemInfo ) : void

비공개 메소드들

메소드 설명
AddWeatherItem ( long zipCode, double Lat, double Lon ) : void

Makes a request against RSS Weather service and add update the table

CreateGeographicSpatialReference ( ) : ISpatialReference

create a WGS1984 geographic coordinate system. In this case, the underlying data provided by the service is in WGS1984.

DownloadIcon ( string iconPath, int &width, int &height ) : Bitmap

given a bitmap url, saves it on the local machine and returns its size

GetSymbol ( int iconCode, string iconPath ) : IGraphicTrackerSymbol

get the specified symbol from the symbols table.

InitializeLocations ( ) : void

Initialize the location table. Gets the location from a featureclass

InitializeSymbol ( string iconPath, int &iconWidth, int &iconHeight, Bitmap &bitmap ) : IGraphicTrackerSymbol

Initialize a character marker symbol for a given bitmap path

InitializeTables ( ) : void

initialize the main table as well as the symbols table. The base class calls new on the table and adds a default ID field.

OnUpdateTimer ( object sender, System.Timers.ElapsedEventArgs e ) : void

run the thread that does the update of the weather data

OnWeatherItemAddedEvent ( object sender, WeatherItemEventArgs args ) : void

weather ItemAdded event handler

gets fired when an item is added to the table

PopulateGraphicTracker ( ) : void
PopulateLocationsTable ( ) : void

Load the information from the MajorCities featureclass to the locations table

ThreadProc ( ) : void

the main update thread for the data.

Since the information is coming from a web service which might take a while to respond, it is not logical to let the application hang while waiting for response. 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.

ToFontDisp ( System font ) : stdole.IFontDisp
ToRGBColor ( System color ) : IRgbColor

메소드 상세

Init() 공개 메소드

public Init ( IBasicMap mapOrGlobe ) : void
mapOrGlobe IBasicMap
리턴 void

RSSWeather() 공개 메소드

public RSSWeather ( ) : System
리턴 System

Remove() 공개 메소드

public Remove ( ) : void
리턴 void

UpdateTracker() 공개 메소드

public UpdateTracker ( WeatherItemEventArgs weatherItemInfo ) : void
weatherItemInfo WeatherItemEventArgs
리턴 void