@wemap/positioning 2.3.8 → 2.3.10
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/package.json +1 -1
- package/src/PositioningHandler.js +5 -1
- package/src/components/PositioningInclinationComponent.jsx +1 -1
- package/src/components/PositioningPoseComponent.jsx +5 -3
- package/src/providers/Provider.js +8 -0
- package/src/providers/pose/ArCoreAbsoluteProvider.js +7 -0
- package/src/providers/pose/ArCoreProvider.js +7 -0
package/package.json
CHANGED
|
@@ -44,7 +44,11 @@ class PositioningHandler {
|
|
|
44
44
|
this.providerInstances[provider.id] = provider;
|
|
45
45
|
provider.start();
|
|
46
46
|
|
|
47
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
id: provider.id,
|
|
49
|
+
name: provider.name,
|
|
50
|
+
useCameraNatively: provider.useCameraNatively
|
|
51
|
+
};
|
|
48
52
|
} catch (e) {
|
|
49
53
|
onError(e);
|
|
50
54
|
return null;
|
|
@@ -36,7 +36,7 @@ class PositioningPoseComponent extends React.Component {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
start() {
|
|
39
|
-
|
|
39
|
+
const output = this.props.positioningHandler.start(
|
|
40
40
|
[EventType.AbsolutePosition, EventType.AbsoluteAttitude],
|
|
41
41
|
this.onEvents,
|
|
42
42
|
this.onError,
|
|
@@ -46,10 +46,12 @@ class PositioningPoseComponent extends React.Component {
|
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
|
|
49
|
-
if (!
|
|
49
|
+
if (!output) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
this.id = output.id;
|
|
54
|
+
|
|
53
55
|
this.props.positioningHandler.setItinerary(this.id, ITINERARY);
|
|
54
56
|
this.props.positioningHandler.setNetwork(this.id, ITINERARY);
|
|
55
57
|
this.props.positioningHandler.setPosition(this.id, INITIAL_POSITION);
|
|
@@ -88,7 +90,7 @@ class PositioningPoseComponent extends React.Component {
|
|
|
88
90
|
this.setState({
|
|
89
91
|
position: error,
|
|
90
92
|
attitude: error,
|
|
91
|
-
errored:
|
|
93
|
+
errored: true
|
|
92
94
|
});
|
|
93
95
|
}
|
|
94
96
|
|
|
@@ -225,6 +225,14 @@ class Provider {
|
|
|
225
225
|
static get nativeInterface() {
|
|
226
226
|
return global.WemapProvidersAndroid;
|
|
227
227
|
}
|
|
228
|
+
|
|
229
|
+
static get useCameraNatively() {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
get useCameraNatively() {
|
|
234
|
+
return this.constructor.useCameraNatively;
|
|
235
|
+
}
|
|
228
236
|
}
|
|
229
237
|
|
|
230
238
|
export default Provider;
|
|
@@ -155,6 +155,13 @@ class ArCoreAbsoluteProvider extends Provider {
|
|
|
155
155
|
this.position.provider = this.constructor.name;
|
|
156
156
|
this.notify(this.createEvent(EventType.AbsolutePosition, this.position));
|
|
157
157
|
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @override
|
|
161
|
+
*/
|
|
162
|
+
static get useCameraNatively() {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
export default ArCoreAbsoluteProvider;
|