Class Info |
|---|
public class TextureMapView extends MapView Map container, which is inherited from MapView. CAUTION: TextureMapView cannot be used together with MapFragment, MapView, and SupportMapFragment. |
If the input parameter is not of the Activity type, no update wizard will be displayed to a user when HMS Core (APK) needs to be updated. Instead, the error information "Hms is not available26" is displayed. In such case, HMS Core (APK) needs to be manually updated. To show the update wizard, you are advised to pass a parameter of the Activity type instead of the Context type to create a TextureMapView instance.
Constructor Name |
|---|
TextureMapView(Context context) Creates a TextureMapView object based on specified parameters. |
TextureMapView(Context context, AttributeSet attrs) Creates a TextureMapView object based on specified parameters. |
TextureMapView(Context context, AttributeSet attrs, int defStyle) Creates a TextureMapView object based on specified parameters. |
TextureMapView(Context context, HuaweiMapOptions options) Creates a TextureMapView object based on specified parameters. |
Qualifier and Type | Method Name and Description |
|---|---|
void | getMapAsync(OnMapReadyCallback callback) Obtains a HuaweiMap object when the object is ready. |
void | onCreate(Bundle savedInstanceState) Called when a map is created. |
void | Called when a map is destroyed. |
void | Called when the memory is insufficient. |
void | onPause() Called when an activity is paused. |
void | onResume() Called when an activity is ready. |
void | onSaveInstanceState(Bundle outState) Called to save the current map status upon unexpected exit. |
void | onStart() Called when an activity is created successfully. Then the map is visible. |
void | onStop() Called when an activity exits. Then the map is invisible. |
Methods Inherited from Class com.huawei.hms.maps.MapView |
|---|
getMapAsync(OnMapReadyCallback callback), onCreate(Bundle savedInstanceState), onDestroy(), onLowMemory(), onPause(), onResume(), onSaveInstanceState(Bundle outState), onStart(), onStop() |
Constructor |
|---|
public TextureMapView(Context context) Creates a TextureMapView object based on specified parameters. |
Parameters
Name | Description |
|---|---|
context | Context. |
Constructor |
|---|
public TextureMapView(Context context, AttributeSet attrs) Creates a TextureMapView object based on specified parameters. |
Parameters
Name | Description |
|---|---|
context | Context. |
attrs | Collection of MapView attributes in the XML file. |
Constructor |
|---|
public TextureMapView(Context context, AttributeSet attrs, int defStyle) Creates a TextureMapView object based on specified parameters. |
Parameters
Name | Description |
|---|---|
context | Context. |
attrs | Collection of MapView attributes in the XML file. |
defStyle | Attributes of the current theme, including reference to the style resource. The resource provides default values for the map view. The value 0 indicates that default values are not used. |
Constructor |
|---|
public TextureMapView(Context context, HuaweiMapOptions options) Creates a TextureMapView object based on specified parameters. |
Parameters
Name | Description |
|---|---|
context | Context. |
options | TextureMapView instance that contains configurations about the map. |
Method |
|---|
public void getMapAsync(OnMapReadyCallback callback) Obtains a HuaweiMap object when the object is ready. |
Parameters
Name | Description |
|---|---|
callback | Callback to be executed when a HuaweiMap object is ready for use. |
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
Name | Description |
|---|---|
savedInstanceState | Map status to be saved. |
Method |
|---|
public void onDestroy() Called when a map is destroyed. If this method needs to be reloaded, call it from the parent class. |
Method |
|---|
public void onLowMemory() Called when the memory is insufficient. If this method needs to be reloaded, call it from the parent class. |
Method |
|---|
public void onPause() Called when an activity is paused. If this method needs to be reloaded, call it from the parent class. |
Method |
|---|
public void onResume() Called when an activity is ready. If this method needs to be reloaded, call it from the parent class. |
Method |
|---|
public void onSaveInstanceState(Bundle outState) Called to save map data upon unexpected exit. If this method needs to be reloaded, call it from the parent class. |
Parameters
Name | Description |
|---|---|
outState | Map data to be saved. |