目录

MapStyleOptions

Class Info

public class MapStyleOptions

Defines the style of a HuaweiMap object.

Through style options, you can customize the map style to change the visual effects of features such as roads, parks, and other POIs. In addition, you can completely hide these features, meaning that you can control specific map controls.

Public Constructor Summary

Constructor Name

MapStyleOptions(String json)

Creates a MapStyleOptions object using a style file.

Public Method Summary

Qualifier and Type

Method Name and Description

static MapStyleOptions

loadRawResourceStyle(Context clientContext, int resourceId)

Obtains a MapStyleOptions object created based on raw resources.

Public Methods

[h2]loadRawResourceStyle

Method

public static MapStyleOptions loadRawResourceStyle(Context clientContext, int resourceId)

Obtains a MapStyleOptions object created based on raw resources.

Parameters

Name

Description

clientContext

Context.

resourceId

Raw resource ID.

Throws

Name

Description

Resources.NotFoundException

If the resource ID is not a valid raw resource ID or the resource is unreadable.

Returns

Type

Description

MapStyleOptions

MapStyleOptions object.