GetLocation Method (CLIENT)


PLB Web Only, 9.7A

 

The GetLocation method retrieves the client browser latitude and longitude coordinates. These coordinates are returned in a delimited character string. The method uses the following format:

 

[label]

{object}.GetLocation

[GIVING {return}] USING [*Options=]{options}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A CLIENT object.

return

Optional. A Character String Variable that receives latitude and longitude coordinates separated by a comma delimiter.

options

Optional. A Numeric Variable or decimal number that identifies behavior flags for this method.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The EOS flag is set TRUE if the {return} Character String Variable is too small to receive the location coordinates.

  2. The ZERO flag is always cleared.

  3. The OVER flag is always cleared.

  4. There are no special {options} behavior bit values defined at this time.

  5. The latitude and longitude coordinates are returned as ASCII number character strings separated by a comma delimiter in the format:

  6.  

    {latitude},{longitude}

Example data format:

 

NN.nnnnnnnnnnnnnnn,MM.nnnnnnnnnnnnnnn

 

37.006708599999996,-92.98609249999999

Example Program Logic:

 

Panel PANEL

AllData DIM 300

Html DIM 300

.

        CREATE PANEL=...

        ACTIVATE PANEL

.

        Client.GetLocation Giving AllData

.

        CMATCH AllData To "E"

        IF Not Equal

        PACK Html1 Using "<img src='http://maps.googleapis.com/maps/api/staticmap?center=":

                  AllData:

                  "&zoom=14&size=400x300&sensor=false'>"

        ENDIF

.

        Panel.InnerHtml Using Html

        ...

 

 

See Also: CLIENT, Client Methods, Method Syntax

 



PL/B Language Reference GetInfo Method (CLIENT) GetMonitorInfo Method (CLIENT)