Skip to content

Commit 2092905

Browse files
Merge pull request #376 from emrecankarakas/map/update-clean
UPDATE react-native-hms-map 6.11.2-304
2 parents 9bb1252 + 9a51445 commit 2092905

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

react-native-hms-map/android/src/main/java/com/huawei/hms/rn/map/logger/HMSLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public final class HMSLogger {
3838

3939
private static final String KIT = "Map";
4040
private static final String PLATFORM = "ReactNative";
41-
private static final String VERSION = "6.11.2.303";
41+
private static final String VERSION = "6.11.2.304";
4242

4343
private static final String SERVICE = "Cross-Platform";
4444

react-native-hms-map/example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hmscore/react-native-hms-map-demo",
3-
"version": "6.11.2-303",
3+
"version": "6.11.2-304",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"react": "18.2.0",
1515
"react-native": "0.72.7",
16-
"@hmscore/react-native-hms-map": "6.11.2-303"
16+
"@hmscore/react-native-hms-map": "6.11.2-304"
1717
},
1818
"devDependencies": {
1919
"@babel/core": "^7.21.8",

react-native-hms-map/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@hmscore/react-native-hms-map",
33
"title": "React Native Hms Map",
44
"description": "React Native HMS Map Kit",
5-
"version": "6.11.2-303",
5+
"version": "6.11.2-304",
66
"main": "src/index.js",
77
"repository": {
88
"type": "git",

react-native-hms-map/src/index.d.ts

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ declare module "@hmscore/react-native-hms-map" {
3535
*/
3636
GAP = 2
3737
}
38-
38+
type PatternItemEnum = `${Extract<PatternItemTypes, number>}` extends `${infer N extends number}` ? N : never;
3939
export enum CapTypes {
4040

4141
/**
@@ -188,7 +188,7 @@ declare module "@hmscore/react-native-hms-map" {
188188
VIOLET = 270,
189189
MAGENTA = 300,
190190
ROSE = 330
191-
};
191+
}
192192

193193
type HueEnum = `${Extract<Hue, number>}` extends `${infer N extends number}` ? N : never;
194194

@@ -689,7 +689,20 @@ declare module "@hmscore/react-native-hms-map" {
689689
* Events triggered by the map.
690690
*/
691691
export interface MapEvent<T = {}> extends NativeSyntheticEvent<T> { }
692+
/**
693+
* Stroke pattern of a polyline or the outline of a polygon or circle.
694+
*/
695+
export interface PatternItem {
696+
/**
697+
* Type of the pattern.
698+
*/
699+
type: PatternItemEnum;
692700

701+
/**
702+
* Length, in pixels. It is not needed for DOT pattern item type.
703+
*/
704+
length?: number;
705+
}
693706
/**
694707
* Props for <HMSCircle> component.
695708
*/
@@ -1341,6 +1354,14 @@ declare module "@hmscore/react-native-hms-map" {
13411354
/**
13421355
* Props for <MapView> component.
13431356
*/
1357+
/**
1358+
* The options for routePolicy are
1359+
* CHINA = "CN"
1360+
* GERMANY = "DE"
1361+
* SINGAPORE = "SG"
1362+
* RUSSIA = "RU"
1363+
*/
1364+
export type RoutePolicyType = "CN" | "DE" | "SG" | "RU";
13441365
export interface HMSMapProps extends ViewProps {
13451366

13461367
/**
@@ -1621,7 +1642,7 @@ declare module "@hmscore/react-native-hms-map" {
16211642
* 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).
16221643
* Sets the access token of the Map SDK.
16231644
*/
1624-
initializer(apiKey: String, routePolicy: String): Promise<void>;
1645+
initializer(apiKey: String, routePolicy: RoutePolicyType): Promise<void>;
16251646

16261647
/**
16271648
* Obtains all attributes of the Huawei map object
@@ -1786,12 +1807,12 @@ declare module "@hmscore/react-native-hms-map" {
17861807
/**
17871808
* Enables HMSLogger
17881809
*/
1789-
enableLogger(): Promise;
1810+
enableLogger(): Promise<null>;
17901811

17911812
/**
17921813
* Disables HMSLogger
17931814
*/
1794-
disableLogger(): Promise;
1815+
disableLogger(): Promise<null>;
17951816

17961817
/**
17971818
* Gets the layer info about map layer objects
@@ -1812,4 +1833,4 @@ declare module "@hmscore/react-native-hms-map" {
18121833
export default class HMSMap extends React.Component<React.PropsWithChildren<HMSMapProps>> {
18131834
static module: HMSMapMethods;
18141835
}
1815-
}
1836+
}

0 commit comments

Comments
 (0)