Class Info |
|---|
public final class MapsInitializer Final class that extends Object. To use certain functions before obtaining a map, use this class to initialize the Map SDK. |
Qualifier and Type | Method Name and Description |
|---|---|
static synchronized void | initialize(Context context) Initializes the Map SDK so that its classes are ready for use. |
static synchronized void | initialize(Context context, String routePolicy) Initializes the Map SDK. You can set the data routing location. The options for routePolicy are CN (China), DE (Germany), SG (Singapore), and RU (Russia). |
static void | setAccessToken(String accessToken) Sets the access token of the Map SDK. |
static void | setApiKey(String apiKey) Sets the API key of the Map SDK. |
Method |
|---|
public static synchronized void initialize(Context context) Initializes the Map SDK so that its classes are ready for use. |
Parameters
Name | Description |
|---|---|
context | Context required for obtaining necessary SDK resources. This parameter cannot be null. |
Method |
|---|
public static synchronized void initialize(Context context, String routePolicy) Initializes the Map SDK. You can set the data routing location. |
Parameters
Name | Description |
|---|---|
context | Context required for obtaining necessary SDK resources. This parameter cannot be null. |
routePolicy | Data routing location. The options are CN (China), DE (Germany), SG (Singapore), and RU (Russia). |
Method |
|---|
public static void setAccessToken(String accessToken) Sets the access token of the Map SDK. NOTE:
|
Parameters
Name | Description |
|---|---|
accessToken | Access token. |
Method |
|---|
public static void setApiKey(String apiKey) Sets the API key of the Map SDK. NOTE:
|
Parameters
Name | Description |
|---|---|
apiKey | API key. |