Skip to content

SiteMgr

Site

Overview
Description A class describing a Site object. A Site extends a location to include a boundary polygon around its perimeter. It may also include entry and exit points (gates), a path along the public road network to enter or exit a gate, and helpful notes for the driver upon entering the Site.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Class
Package com.alk.cpik.site

Public Methods

Method Name Return Type Description
getID() long Gets the unique identifier for the Site.
getName() string Gets the name of the Site.
getAddress() address Gets the Site address.
isPublic() boolean Gets whether the Site is public (created by Trimble MAPS) or user created.
getGates() List<Gate> Gets a list of gates associated with the Site.

Hooks and Callbacks

Hooks and Callbacks related to Sites.

SiteListener
onSiteEntry
onSiteExit

Gate

Overview
Description A class describing a Gate object for a Site. Gates are identified as Entry, Exit, or Two Way (entry and exit). Gates also include a Gate Path—the path along the public road network to enter or exit at that gate.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Class
Package com.alk.cpik.site

Public Methods

Method Name Return Type Description
isAutoRestricted() boolean Indicates if the Gate is auto restricted.
isTruckRestricted() boolean Indicates if the Gate is truck restricted.
getPhysicalLocation() Coordinate Gets the coordinates on the Site polygon where the Gate is located.
getSnappedLocation() Coordinate Gets the coordinates on the public road network to access the Gate.
getGateType() GateType Gets the Gate type—Entry, Exit, or Two Way.
getNotes() List<Note> Gets driver notes associated with the Site.

Gate.GateType

Overview
Description Describes the entry/exit characteristics of a Gate for a Site.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Enum
Package com.alk.cpik.site

Values

Value Description
UNKNOWN Entry/exit characteristics are not known.
ENTRY Gate is used for entering the Site only.
EXIT Gate is used for exiting the Site only.
TWO_WAY Gate can be used to enter or exit the Site.

Note

Overview
Description A class describing Note details for a Gate. A Note is a short message sent to the driver in CoPilot as he or she approaches that Gate. The notification can be audible (Text-to-Speech), visual (pop-up text display), or both.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Class
Package com.alk.cpik.site

Public Methods

Method Name Return Type Description
getNoteType() NoteType Gets how the Note will be shared with the driver in the CoPilot UI.
getSequence() long Gets the sequence number of a Note for gates with multiple notes. Each note's sequence number will determine the order it is displayed in Copilot's UI, in ascending order.
getTitle() String Gets the title of the pop-up message in which the Note is displayed in the CoPilot UI.
getContent() String Gets the body of the pop-up message in which the Note is displayed in the CoPilot UI.

Note.NoteType

Overview
Description Describes how a Note will be shared with the driver in the CoPilot UI.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Enum
Package com.alk.cpik.site

Values

Value Description
UNKNOWN Default uninitialized type. No action.
NONE Do nothing in the CoPilot UI.
VISUAL Display message screen with note title and content.
TTS Play Text-to-Speech (TTS) using note content.
VISUAL_AND_TTS Display VISUAL and play TTS asynchronously.

SiteListener.onSiteEntry

Overview
Description Called when CoPilot's GPS position enters the bounds of a Site polygon's coordinates.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Method
Package com.alk.cpik.site

Syntax

SiteListener.onSiteEntry(Site, Coordinate)

Parameters

Site site — Details of the Site that was entered.

Coordinate entryPoint — The location (coordinates) at which the site was entered.

Sample Code

class MySiteListener extends SiteListener
{
  @Override
  public void onSiteEntry(Site site, Coordinate entryPoint)
  {
    System.out.println("Entered site " + site.toString() + " at point " + entryPoint.toString());
  }
}

Related APIs

  • SiteListener.onSiteExit

SiteListener.onSiteExit

Overview
Description Called when CoPilot's GPS position leaves the bounds of a Site polygon's coordinates.
Supported on Android Since Version 10.9.0.1268
Supported on iOS Since Version 10.9.0.1268
Type Method
Package com.alk.cpik.site

Syntax

SiteListener.onSiteExit(Site, Coordinate)

Parameters

Site site — Details of the Site that was exited.

Coordinate entryPoint — The location (coordinates) at which the site was exited.

Sample Code

class MySiteListener extends SiteListener
{
  @Override
  public void onSiteExit(Site site, Coordinate exitPoint)
  {
     System.out.println("Exited site " + site.toString() + " at point " + exitPoint.toString());
  }
}

Related APIs

  • SiteListener.onSiteEntry

Last update: August 24, 2020