Reference Source
public class | source

MapPresenter

Extends:

* → MapPresenter

Class for the Map Presenter.

Constructor Summary

Public Constructor
public

Creates an instance of the MapPresenter.

Member Summary

Public Members
public
public

Force the view/presenter to refresh the view's data

public

Returns the data from the MapModel.

public

Get the number of notifications from the Alerts model.

public

getProfileImage(callback: Function): *

Get the profile picture from the profile model

public

Gets the user's current location from the model.

public

If the view or presenter is destroyed, unsubscribe the presenter from the model.

public

onUpdated only called from HomeModel because MapModel doesn't call it. Since data in MapModel should be the same as the from the HomeModel, we don't have to read from the database in the MapModel and we can just wait for data to be received.

public

view: *

Method Summary

Private Methods
private

Public Constructors

public constructor() source

Creates an instance of the MapPresenter.

Public Members

public filterMarkers: * source

public forceRefresh: * source

Force the view/presenter to refresh the view's data

public getData: Object: * source

Returns the data from the MapModel.

Return:

Object

The data from the map model.

public getNotificationCount: Number: * source

Get the number of notifications from the Alerts model.

Return:

Number

The number of notifications

public getProfileImage(callback: Function): * source

Get the profile picture from the profile model

public getUserLocation: Object: * source

Gets the user's current location from the model.

Return:

Object

The longitude and latitude of the user's current location

public onDestroy: * source

If the view or presenter is destroyed, unsubscribe the presenter from the model.

public onUpdated: * source

onUpdated only called from HomeModel because MapModel doesn't call it. Since data in MapModel should be the same as the from the HomeModel, we don't have to read from the database in the MapModel and we can just wait for data to be received.

public view: * source

Private Methods

private forceRequestData() source