tp TouchPointWP Location - TenthPres/TouchPoint-WP GitHub Wiki

tp\TouchPointWP\Location

A Location is generally a physical place, with an internet connection. These likely correspond to campuses, but don't necessarily need to.

Properties

name

public mixed name
  • Visibility: public

lat

public mixed lat
  • Visibility: public

lng

public mixed lng
  • Visibility: public

radius

public mixed radius
  • Visibility: public

ipAddresses

public mixed ipAddresses
  • Visibility: public

Methods

getLocations

\tp\TouchPointWP\Location[] tp\TouchPointWP\Location::getLocations()

Get an array of the

  • Visibility: public
  • This method is static.

Returns

  • \tp\TouchPointWP\Location[] -

getLocationForIP

mixed tp\TouchPointWP\Location::getLocationForIP(string ipAddress)
  • Visibility: public
  • This method is static.

Arguments

  • ipAddress string

Returns

  • mixed

hasGeo

bool tp\TouchPointWP\hasGeo::hasGeo()

Indicates whether a map of a single item can be displayed.

Returns

  • bool -

asGeoIFace

object|null tp\TouchPointWP\hasGeo::asGeoIFace(string type)

Returns a standardized stdObject, or null if not viable.

Return object properties are lat, lng, human, and type.

Arguments

  • type string - 'loc' for navigator location, or 'ip' for ip address location

Returns

  • object|null -

getLocationForLatLng

\tp\TouchPointWP\Location|null tp\TouchPointWP\Location::getLocationForLatLng(float lat, float lng)

Get a location that corresponds to a given lat/lng, or null if none match.

  • Visibility: public
  • This method is static.

Arguments

  • lat float* lng float

Returns

  • \tp\TouchPointWP\Location|null -

validateSetting

false|string tp\TouchPointWP\Location::validateSetting(string settings)

Validates and corrects the Locations settings value.

  • Visibility: public
  • This method is static.

Arguments

  • settings string

Returns

  • false|string -

locationName

?string tp\TouchPointWP\hasGeo::locationName()

Get the name of the location.

Returns

  • ?string -