app / sg.edu.ntu.scse.cz2006.gymbuddies.tasks / TrimNearbyGyms

TrimNearbyGyms

class TrimNearbyGyms : AsyncTask<Void, Void, ArrayList<MarkerOptions>>

Task to execute to cut down the number of markers displayed on the map for gyms For sg.edu.ntu.scse.cz2006.gymbuddies.tasks in Gym Buddies!

Author
Kenneth Soh

Since
2019-09-25

Types

Callback

Internal interface to handle callbacks

interface Callback

Constructors

<init>

Initializees the task to execute

TrimNearbyGyms(count: Int, location: LatLng, markers: Set<MarkerOptions>, callback: Callback)

Properties

callback

Callback Callback to call when task completes

val callback: Callback

count

Int Number of markers to display only

var count: Int

location

LatLng Current location of the user

val location: LatLng

markers

Set List of all markers to trim

val markers: Set<MarkerOptions>

Functions

doInBackground

Internal task to execute in the background on a seperate thread

fun doInBackground(vararg p0: Void?): ArrayList<MarkerOptions>

onPostExecute

Function ran when the task completes

fun onPostExecute(result: ArrayList<MarkerOptions>): Unit

Companion Object Properties

TAG

Activity Tag for logs

const val TAG: String