public class MapView
Extends FrameLayout and represents a view in which a map is displayed. The view data is obtained from HUAWEI Map Kit.
None.
| Construction Method |
| MapView(Context context) |
| MapView(Context context, AttributeSet attrs) |
| MapView(Context context, AttributeSet attrs, int defStyle) |
| MapView(Context context, HuaweiMapOptions options) |
| Return type | Method name |
| void | getMapAsync(OnMapReadyCallback callback) |
| void | onCreate(Bundle savedInstanceState) |
| void | onDestroy() |
| void | onEnterAmbient(Bundle ambientDetails) |
| void | onExitAmbient() |
| void | onLowMemory() |
| void | onPause() |
| void | onResume() |
| void | onSaveInstanceState(Bundle outState) |
| void | onStart() |
| void | onStop() |
| Method |
| public void getMapAsync(OnMapReadyCallback callback) |
| Obtains a HuaweiMap object. |
Parameters:
| Parameter name | Parameter desc |
| callback | Callback to be executed when a HuaweiMap object is ready for use. |
Return:
None.
| Method |
| public void onCreate(Bundle savedInstanceState) |
| Called when a map is created. If this method needs to be reloaded, call it from the parent class. |
Parameters:
| Parameter name | Parameter desc |
| savedInstanceState | Status to be saved for a MapView object. |
Return:
None.
| Method |
| public void onDestroy() |
| Called when a map is destroyed. If this method needs to be reloaded, call it from the parent class. |
Parameters:
None.
Return:
None.
| Method |
| public void onLowMemory() |
| Called when the memory is insufficient. If this method needs to be reloaded, call it from the parent class. |
Parameters:
None.
Return:
None.
| Method |
| public void onPause() |
| Called when an activity is paused. If this method needs to be reloaded, call it from the parent class. |
Parameters:
None.
Return:
None.
| Method |
| public void onResume() |
| Called when an activity is ready. If this method needs to be reloaded, call it from the parent class. |
Parameters:
None.
Return:
None.
| Method |
| public void onSaveInstanceState(Bundle outState) |
| Called to save the current status of a MapView object upon unexpected exit. |
| If this method needs to be reloaded, call it from the parent class. |
Parameters:
| Parameter name | Parameter desc |
| outState | Current status of a MapView object. |
Return:
None.
| Method |
| public void onStart() |
| Called when a MapView object is created successfully. Then the map is visible. If this method needs to be reloaded, call it from the parent class. |
Parameters:
None.
Return:
None.
| Method |
| public void onStop() |
| Called when a MapView creation activity exits. Then the map is invisible. If this method needs to be reloaded, call it from the parent class. |
Parameters:
None.
Return:
None.