IEaxDataAreaSlice.MarkerDimension

Fore Syntax

MarkerDimension: IDimInstance;

Fore.NET Syntax

MarkerDimension: Prognoz.Platform.Interop.Dimensions.IDimInstance;

Description

The MarkerDimension property determines geolocation objects dimension.

Comments

Map data source must contain exclusive dimension of geolocation objects. This dimension must be based on the MDM dictionary containing LATITUDE and LONGITUDE real attributes. Attributes must contain latitude and longitude values for geolocation markers.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS_MARKERS identifier. Report data source is a time series database containing a factor attribute with the CITY identifier. This attribute is a link to the MDM dictionary containing real attributes LATITUDE and LONGITUDE with values of latitude and longitude for geolocation markers.

Cubes, Dimensions, Express, Metabase, Rds.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    DArea: IEaxDataArea;
    DAreaSlice: IEaxDataAreaSlice;
    Rub: IRubricator;
    Atts: IMetaAttributes;
    DictObj: IMetabaseObjectDescriptor;
    DimInst: IDimInstance;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS_MARKERS").edit As IEaxAnalyzer;
    DArea := Express.DataArea;
    If DArea.Slices.Count > 0 Then
        DAreaSlice := DArea.Slices.Item(0);
        // Get data source for data slice
        Rub := DAreaSlice.DataSource As IRubricator;
        // Ger time series attributes
        Atts := Rub.Facts.Attributes;
        // Get the dictionary that is a data source for the "CITY" attribute
        DictObj := Atts.FindById("CITY").ValuesObject;
        // Open obtained dictionary
        DimInst := DictObj.Open(NullAs IDimInstance;
        // Set the open dictionary as a geolocation objects dimension
        DAreaSlice.MarkerDimension := DimInst;
    End If;
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the geolocation object dimension is set in express report.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    DArea: IEaxDataArea;
    DAreaSlice: IEaxDataAreaSlice;
    Rub: IRubricator;
    Atts: IMetaAttributes;
    DictObj: IMetabaseObjectDescriptor;
    DimInst: IDimInstance;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    Express := MB.ItemById["EXPRESS_MARKERS"].Edit() As IEaxAnalyzer;
    DArea := Express.DataArea;
    If DArea.Slices.Count > 0 Then
        DAreaSlice := DArea.Slices.Item[0];
        // Get data source for data slice
        Rub := DAreaSlice.DataSource As IRubricator;
        // Ger time series attributes
        Atts := Rub.Facts.Attributes;
        // Get the dictionary that is a data source for the "CITY" attribute
        DictObj := Atts.FindById("CITY").ValuesObject;
        // Open obtained dictionary
        DimInst := DictObj.Open(NullAs IDimInstance;
        // Set the open dictionary as a geolocation objects dimension
        DAreaSlice.MarkerDimension := DimInst;
    End If;
    (Express As IMetabaseObject).Save();
End Sub;

See also:

IEaxDataAreaSlice