Provides access to time properties of a MapDescription.
Members
Name | Description | |
---|---|---|
TimeReference | Time reference used by the time aware content. | |
TimeValue | Time value that will be used by the time aware content of the map. |
IMapTimeDescription.TimeReference Property
Time reference used by the time aware content.
Public Property TimeReference As ITimeReference
public ITimeReference TimeReference {get; set;}
Remarks
You should set this property when the TimeValue that you are passing in is in different timezone that any of the dataframe's or layer's TimeReference in the MapServer.
When TimeReference is set to Null/Nothing, MapServer assumes the TimeValue is in layer's TimeReference while searching features from layer. For example, there may be two layers in the map, one is in Pacific Standard Time (PST) and the other is in Eastern Standard Time (EST). If the TimeValue you are passing in is PST, but you have TimeReference is set to Null, when MapServer searches for feature for the first layer, it will assume the input TimeValue is in PST and find the correct features. While it searches for the features from the second layer, it will assume the input TimeValue is in EST and will get incorrect features.
IMapTimeDescription.TimeValue Property
Time value that will be used by the time aware content of the map.
Public Property TimeValue As ITimeValue
public ITimeValue TimeValue {get; set;}
Classes that implement IMapTimeDescription
Classes | Description |
---|---|
MapDescription | The Map Description coclass contains settings of a map in the current document. |
Example: setting time to a MapDescription
IMapTimeDescription pMapTimeDesc = pMapDesc as IMapTimeDescription;
ITime pTime = new TimeClass();
// date-time in YYYY/MM/DD hh:mm:ss format
pTime.SetFromTimeString(esriTimeStringFormat.esriTSFYearThruSecondWithSlash, "2000/01/01 08:00:00");
ITimeInstant pTimeInstant = new TimeInstantClass();
pTimeInstant.Time = pTime;
pTimeInstant.TimeReference = pMapTimeDesc.TimeReference;
pMapTimeDesc.TimeValue = pTimeInstant;