@nitra/geolocation 7.1.5 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NitraGeolocation.podspec +18 -0
- package/Package.swift +6 -10
- package/README.md +102 -11
- package/android/build.gradle +51 -22
- package/android/src/main/kotlin/com/capacitorjs/plugins/geolocation/GeolocationErrors.kt +10 -0
- package/android/src/main/kotlin/com/capacitorjs/plugins/geolocation/GeolocationPlugin.kt +236 -32
- package/dist/docs.json +37 -5
- package/dist/esm/definitions.d.ts +87 -7
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +4 -0
- package/dist/esm/web.js +62 -2
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +66 -9
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +66 -9
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/GeolocationPlugin/GeolocationCallbackManager.swift +9 -0
- package/ios/Sources/GeolocationPlugin/GeolocationConstants.swift +5 -0
- package/ios/Sources/GeolocationPlugin/GeolocationError.swift +4 -1
- package/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift +66 -19
- package/ios/Sources/GeolocationPlugin/IONGLOCPositionModel+JSONTransformer.swift +8 -3
- package/package.json +24 -22
|
@@ -4,15 +4,20 @@ import IONGeolocationLib
|
|
|
4
4
|
extension IONGLOCPositionModel {
|
|
5
5
|
func toJSObject() -> JSObject {
|
|
6
6
|
[
|
|
7
|
-
Constants.Position.timestamp:
|
|
7
|
+
Constants.Position.timestamp: NSNull(),
|
|
8
8
|
Constants.Position.coords: coordsJSObject
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
private var coordsJSObject: JSObject {
|
|
13
|
-
|
|
13
|
+
let headingValue = trueHeading ?? magneticHeading ?? (course != -1.0 ? course : nil)
|
|
14
|
+
return [
|
|
14
15
|
Constants.Position.altitude: altitude,
|
|
15
|
-
Constants.Position.heading:
|
|
16
|
+
Constants.Position.heading: headingValue ?? NSNull(),
|
|
17
|
+
Constants.Position.magneticHeading: magneticHeading ?? NSNull(),
|
|
18
|
+
Constants.Position.trueHeading: trueHeading ?? NSNull(),
|
|
19
|
+
Constants.Position.headingAccuracy: headingAccuracy ?? NSNull(),
|
|
20
|
+
Constants.Position.course: course != -1.0 ? course : NSNull(),
|
|
16
21
|
Constants.Position.accuracy: horizontalAccuracy,
|
|
17
22
|
Constants.Position.latitude: latitude,
|
|
18
23
|
Constants.Position.longitude: longitude,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitra/geolocation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "The Geolocation API provides simple methods for getting and tracking the current position of the device using GPS, along with altitude, heading, and speed information if available.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"ios/Sources",
|
|
14
14
|
"ios/Tests",
|
|
15
15
|
"Package.swift",
|
|
16
|
-
"
|
|
16
|
+
"NitraGeolocation.podspec"
|
|
17
17
|
],
|
|
18
18
|
"author": "Outsystems",
|
|
19
19
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "https://github.com/nitra/capacitor-geolocation.git"
|
|
23
23
|
},
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/ionic-team/capacitor-geolocation/issues"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"capacitor",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
34
|
-
"verify:ios": "xcodebuild -scheme
|
|
34
|
+
"verify:ios": "xcodebuild -scheme CapacitorGeolocation -destination generic/platform=iOS",
|
|
35
35
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
36
36
|
"verify:web": "npm run build",
|
|
37
37
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
@@ -39,39 +39,41 @@
|
|
|
39
39
|
"eslint": "eslint . --ext ts",
|
|
40
40
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
41
41
|
"swiftlint": "node-swiftlint",
|
|
42
|
-
"docgen": "docgen --api GeolocationPlugin --output-readme README.md --output-json dist/docs.json
|
|
42
|
+
"docgen": "docgen --api GeolocationPlugin --output-readme README.md --output-json dist/docs.json",
|
|
43
43
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
44
44
|
"clean": "rimraf ./dist",
|
|
45
45
|
"watch": "tsc --watch",
|
|
46
|
-
"prepublishOnly": "npm run build"
|
|
46
|
+
"prepublishOnly": "npm run build",
|
|
47
|
+
"publish:cocoapod": "pod trunk push ./NitraGeolocation.podspec --allow-warnings"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@capacitor/synapse": "^1.0.
|
|
50
|
+
"@capacitor/synapse": "^1.0.4"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@capacitor/android": "
|
|
53
|
-
"@capacitor/core": "
|
|
54
|
-
"@capacitor/docgen": "^0.
|
|
55
|
-
"@capacitor/ios": "
|
|
53
|
+
"@capacitor/android": "^8.0.0",
|
|
54
|
+
"@capacitor/core": "^8.0.0",
|
|
55
|
+
"@capacitor/docgen": "^0.3.0",
|
|
56
|
+
"@capacitor/ios": "^8.0.0",
|
|
56
57
|
"@ionic/eslint-config": "^0.4.0",
|
|
57
58
|
"@ionic/prettier-config": "^4.0.0",
|
|
58
59
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
59
60
|
"@semantic-release/changelog": "^6.0.3",
|
|
61
|
+
"@semantic-release/exec": "^7.1.0",
|
|
60
62
|
"@semantic-release/git": "^10.0.1",
|
|
61
|
-
"@semantic-release/github": "^
|
|
62
|
-
"@semantic-release/npm": "^
|
|
63
|
-
"@types/node": "^
|
|
64
|
-
"eslint": "^8.57.
|
|
65
|
-
"prettier": "^3.
|
|
66
|
-
"prettier-plugin-java": "^2.
|
|
67
|
-
"rimraf": "^6.
|
|
68
|
-
"rollup": "^
|
|
69
|
-
"semantic-release": "^
|
|
63
|
+
"@semantic-release/github": "^12.0.2",
|
|
64
|
+
"@semantic-release/npm": "^13.1.2",
|
|
65
|
+
"@types/node": "^24.10.1",
|
|
66
|
+
"eslint": "^8.57.1",
|
|
67
|
+
"prettier": "^3.6.2",
|
|
68
|
+
"prettier-plugin-java": "^2.7.7",
|
|
69
|
+
"rimraf": "^6.1.2",
|
|
70
|
+
"rollup": "^4.53.3",
|
|
71
|
+
"semantic-release": "^25.0.2",
|
|
70
72
|
"swiftlint": "^2.0.0",
|
|
71
|
-
"typescript": "
|
|
73
|
+
"typescript": "^5.9.3"
|
|
72
74
|
},
|
|
73
75
|
"peerDependencies": {
|
|
74
|
-
"@capacitor/core": ">=
|
|
76
|
+
"@capacitor/core": ">=8.0.0"
|
|
75
77
|
},
|
|
76
78
|
"prettier": "@ionic/prettier-config",
|
|
77
79
|
"swiftlint": "@ionic/swiftlint-config",
|