Class: Location

Location

Location class used as base for any themeparks object that has a physical location (parks, resorts, restaurants etc.)

new Location(options)

Create a new Location object
Parameters:
Name Type Description
options Object
Properties
Name Type Description
name String The name of this location
timezone String Location's timezone
latitude Number Location's latitude
longitude Number Location's longitude

Members


IsValid

Return whether this location has a valid geolocation

Latitude :String

Return the formatted latitude for this location Formatted as XX°YY′
Type:
  • String

LatitudeRaw :Number

Return the raw numeric value of this position's latitude
Type:
  • Number

LocationString

Return this GeoLocation safe for printing

Longitude :String

Return the formatted longitude for this location Formatted as XX°YY′ZZ″
Type:
  • String

LongitudeRaw :Number

Return the raw numeric value of this position's longitude
Type:
  • Number

Name :String

Get this Location's name in a human-readable form
Type:
  • String

Name :String

Update this Location's name
Type:
  • String

Timezone :String

Get this location's Timezone
Type:
  • String

Methods


<static> RandomBetween()

Return a random point within an area defined by lonA, latA, lonB, and latB (a square)
Returns:
object with longitude and latitude randomly set between locationA and locationB
Type
Object

Log(ToPrint)

Debug print a message (when NODE_DEBUG=themeparks is set in environment)
Parameters:
Name Type Argument Description
ToPrint * <repeatable>
Objects/strings to print

Now()

Get Location's current date/time
Returns:
Current date/time as a Moment object
Type
Moment

toGoogleMaps()

Return a URL to this park on Google Maps
Returns:
URL to this park on Google Maps
Type
String