NotesGPSPosition (LotusScript)

プラットフォーム上の全地球測位デバイスによって提供される位置を表します。

現在は リリース 1.0.4 以降の HCL Nomad でサポートされています。

包含関係

NotesGPS に含まれる

NotesGPSCoordinates を含む

プロパティ

TimeStamp

メソッド

Update

構文

Set position = NotesGPS.getCurrentPosition()

例

Public Function getCoordinates() As String 
         
        On Error GoTo errhandler 
        On Error 4508 GoTo err4508 
          
        Dim session As New NotesSession 
        Dim gps As NotesGPS 
        Set gps =  session.CreateGPS() 
         
        Dim hasAccess As Boolean 
        hasAccess = GPS.Requestaccess() 
        If hasAccess Then 
            Dim pos As NOTESGPSPOSITION 
            Set pos = GPS.Getcurrentposition() 
            Dim coo As NOTESGPSCOORDINATES 
            Set coo = pos.Coordinates 
            Dim lat As Double 
            Dim lot As Double 
            lat = coo.Latitude 
            lot = coo.Longitude 
        End If 
        getCoordinates = "Coordinates: LAT " & lat & " LONG " & lot 
        Exit Function
errhandler: 
        MsgBox Error$ & " in " & Erl & " - " & Err 
        Exit Function 
err4508: 
        getCoordinates = "" 
        Exit Function
End Function

 

 


TimeStamp プロパティ

NotesGPS.GetCurrentPosition() の呼び出しによって作成された時刻、または NotesGPSPosition.Update() の呼び出しによって更新された時刻を表す NotesDateTime オブジェクトです。

データ型

NotesDateTime

詳細については、NotesDateTime クラスを参照してください。

例

Dim gps as NotesGPS

Dim hasAccess as Boolean

Dim gpsPosition as NotesGPSPosition

Dim ndt as NotesDateTime

Set gps= NotesSession.CreateGPS()

HasAccess = hasAccess = gps.Requestaccess()

If hasAccess then set gpsPosition = gps.getCurrentPosition()

Set ndt = gpsPosition.TimeStamp

 

 


Update メソッド

現在の NotesGPSPosition を更新するようにプラットフォームに要求します。

構文

call NotesGPSPosition.Update()

例

Dim gps as NotesGPS

Dim hasAccess as Boolean

Dim gpsPosition as NotesGPSPosition

Set gps= NotesSession.CreateGPS()

HasAccess = hasAccess = gps.Requestaccess()

If hasAccess then set gpsPosition = gps.getCurrentPosition()

Call gpsPosition.Update()