Advertisement
Guest User

OneStream.BusinessRule.DashboardDataSet.MapLoc

a guest
Feb 2nd, 2024
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.83 KB | Source Code | 0 0
  1. If args.FunctionType = DashboardDataSetFunctionType.GetDataSet AndAlso args.DataSetName.XFEqualsIgnoreCase("Locations") Then
  2.                     Dim tempDataSet As New XFDataSet
  3.                     Dim collection As XFMapItemCollection = OneStream.Shared.Wcf.XFMapDataSetHelper.CreateXFMapItemCollection(si, tempDataSet)
  4.                     ' Nederland is de naam van de parent entiteit.
  5.                     Dim EDimPK As DimPk = BRApi.Finance.Dim.GetDimPk(si, "Nederland")
  6.                     ' Nederland.Base is de entiteit filter voor de map.
  7.                     Dim LCList As List(Of MemberInfo) = BRApi.Finance.Members.GetMembersUsingFilter(si, EDimPK, "E#Nederland.base", True)
  8.                     For Each LC As MemberInfo In LCList
  9.                         Dim entityID As Integer = BRApi.Finance.Members.GetMemberId(si, DimType.Entity.Id, LC.Member.Name)
  10.                         ' Text5 is waar de GPS-coördinaten zijn opgeslagen.
  11.                         Dim LatLong As String = BRApi.Finance.Entity.Text(si, entityID, 5, False, False)
  12.                         If LatLong.Length > 1 Then
  13.                             Dim LocationList As String() = LatLong.Split(",")
  14.                             Dim LCLat As String = LocationList(0)
  15.                             Dim LCLong As String = LocationList(1)
  16.                             ' Het eerste bestand geeft de locatieafbeelding weer. Het tweede bestand is de hoverafbeelding.
  17.                             Dim pin As New XFMapPinPoint(LCLat, LCLong, LC.Member.Description, XFIMageFileSourceType.ClientImage, "StatusBlueBall", 0, 0, LC.Member.Name, XFImageFileSourceType.ClientImage, "StatusGreenCheckMark")
  18.                             collection.AddPinPoint(pin)
  19.                         End If
  20.                     Next
  21.                     Return collection.CreateDataSet(si)
  22.                 End If
Tags: OneStream
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement