MapView
Extends:
Class for the Map view
Constructor Summary
Public Constructor | ||
public |
constructor(props: Object) Create an instance of LoginView |
Member Summary
Public Members | ||
public |
MapP: * |
|
public |
Triggers when the component is mounted. |
|
public |
Component's state has updated |
|
public |
|
|
public |
Component will receive new properties via the props attribute |
|
public |
Component is about to unmount, do any cleanup here. |
|
public |
Navigate to a page with a title. |
|
public |
newMarker(latitude: Integer): * helper function of _onPinMarkerPress |
|
public |
onMarkerDragEnd(coord: Object): * Triggers after a marker being dragged has stopped being dragged. |
|
public |
onRegionChange(A: region): * Change region state as moving the map |
|
public |
refreshState: * Refreshes the state of the component so new data is fetched. |
|
public |
Render a searchbar for user to search location after clicking "search location" button |
|
public |
resetState: * Resets the state with default variables |
Private Members | ||
private |
_createNewMarker(data: Object): Object: * Creates a new marker from the data. |
|
private |
_getColourString(colours: List): string: * Get the string to display from the colours list. |
|
private |
handle click event after clicking "create marker" button |
|
private |
_onSelectedItemsChange(selectedFilters: List): * Add the new selected items to the state and update |
|
private |
Renders the action button add icon. |
|
private |
Renders the action button icon pin. |
|
private |
_renderCallout(item: Object): * Renders the callout for a marker. |
|
private |
Renders the cancel action button |
|
private |
Renders the save action button |
|
private |
_setLocationToMarkerItem(refs: List, item: Object, shouldReshowCallout: Boolean): * Sets the location of the map to the marker's position and open its callout. |
|
private |
_setMarkers(selectedFilters: List): * Sets markers according to the filter, if any, that is set. |
|
private |
Sets the state to the profile data retrieved from the model. |
|
private |
Sets the user's location to their current location. |
|
private |
Toggle the notification area. |
Method Summary
Public Methods | ||
public |
Delete created marker or circle after clicking delete button |
|
public |
render() Extract data from the component's view and send an update to the presenter to do any logic before sending it to the model |
|
public |
Render a circle to set notification receiving area |
|
public |
saveItem() Save data of created marker or circle after clicking save button |
|
public |
Save data of circle to notification settings |
|
public |
Save data of created marker to report lost page |
|
public |
setCircleLat(e: Object) Long press the map to change the coordinate of circle |
Public Constructors
Public Members
public MapP: * source
public componentWillMount: * source
public componentWillReceiveProps: * source
Component will receive new properties via the props attribute
public componentWillUnmount: * source
Component is about to unmount, do any cleanup here. Call viewUnmounting in base class so it can do any cleanup for the view before calling the presenter destroy method
public navigate(screen: string): * source
Navigate to a page with a title. This method is used over the commented out line below because successive touches of a bike item would not add the data because data is only received in process in the componentWillMount function. So adding the 'key' property to navigate makes it see that the new page is unique.
public onMarkerDragEnd(coord: Object): * source
Triggers after a marker being dragged has stopped being dragged.
public renderSearchbar: * source
Render a searchbar for user to search location after clicking "search location" button
Private Members
private _getColourString(colours: List): string: * source
Get the string to display from the colours list.
private _onSelectedItemsChange(selectedFilters: List): * source
Add the new selected items to the state and update
private _setLocationToMarkerItem(refs: List, item: Object, shouldReshowCallout: Boolean): * source
Sets the location of the map to the marker's position and open its callout.
private _setMarkers(selectedFilters: List): * source
Sets markers according to the filter, if any, that is set.
Public Methods
public render() source
Extract data from the component's view and send an update to the presenter to do any logic before sending it to the model