ShowOnMap - ShutUpPaulo/TecProg_2016-01 GitHub Wiki
Class ShowOnMap
1. Class Attributes
Name | Type | Description | Default Value |
---|---|---|---|
INVALID_LATITUDE | final Double | Stores an invalid latitude to initialize latitude variable | 91 |
INVALID_LONGITUDE | final Double | Stores an invalid longitude to initialize longitude variable | 181 |
latitude | Double | Stores the latitude of the place to be shown at the map | INVALID_LATITUDE |
longitude | Double | Stores the longitude of the place to be shown at the map | INVALID_LONGITUDE |
mMap | Google Map | Stores the map which the localization of the place will be shown | null |
filter | String | Search filter used by the user to search a place | null |
2. Methods
2.1. onCreate
2.1.1. Description:
- Triggers actions that must be done when the activity is starting
2.1.2. Arguments:
- Bundle savedInstanceState: If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied
2.1.3. Return:
- Type: void
2.1.4. Variables:
Name | Type | Description | Default Value |
---|---|---|---|
bundle | Bundle | Bundle that allows the access to the place latitude and longitude send by the parent activity | * * * |
localizationValues | String[] | Array to get the latitude and longitude from the bundle | * * * |
latitude | Double | Place latitude value | * * * |
longitude | Double | Place longitude value | * * * |
2.2. onResume
2.2.1. Description:
- Overridden method called when the activity will start interacting with the user
2.2.2. Arguments:
- No arguments
2.2.3. Return:
- Type: void
2.3. checkIfMapIsInstantiated
2.3.1. Description:
- Method that instantiates the map if it is not instantiates yet
2.3.2. Arguments:
- No arguments
2.3.3. Return:
- Type: void
2.4. setUpMap
2.4.1. Description:
- Method that sets the map camera position and calls the method to add the place marker at the map
2.4.2. Arguments:
- No arguments
2.4.3. Return:
- Type: void
2.5 addMarkerPlace
2.5.1. Description:
- Method that adds the marker in the place localization at the map
2.5.2. Arguments:
- Double latitude: Place latitude where the marker must be placed (Must be >=-90 and <=90)
- Double longitude: Place longitude where the marker must be placed (Must be >=-180 and <=180)
2.5.3. Return:
- Type: void