@wemap/positioning 2.7.13 → 14.0.0-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/README.md +51 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16582 -0
- package/dist/qr-scanner-worker.min-CdBZO1_x.js +2 -0
- package/dist/src/ILocationSource.d.ts +104 -0
- package/dist/src/ILocationSource.d.ts.map +1 -0
- package/dist/src/MapMatching.d.ts +83 -0
- package/dist/src/MapMatching.d.ts.map +1 -0
- package/dist/src/location-sources/GnssWifiLocationSource.d.ts +79 -0
- package/dist/src/location-sources/GnssWifiLocationSource.d.ts.map +1 -0
- package/dist/src/location-sources/LocationSource.d.ts +102 -0
- package/dist/src/location-sources/LocationSource.d.ts.map +1 -0
- package/dist/src/location-sources/VPSLocationSource.d.ts +107 -0
- package/dist/src/location-sources/VPSLocationSource.d.ts.map +1 -0
- package/dist/src/types.d.ts +65 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/utils/permissions.d.ts +29 -0
- package/dist/src/utils/permissions.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +23 -59
- package/babel.config.js +0 -11
- package/config.json +0 -4
- package/debug/absolute-attitude.html +0 -16
- package/debug/arcore-absolute.html +0 -16
- package/debug/arcore.html +0 -16
- package/debug/components/AbsoluteAttitudeComponent.jsx +0 -100
- package/debug/components/ArCoreAbsoluteComponent.jsx +0 -104
- package/debug/components/ArCoreComponent.jsx +0 -69
- package/debug/components/GnssWifiComponent.jsx +0 -56
- package/debug/components/GnssWifiPdrComponent.jsx +0 -76
- package/debug/components/ImuComponent.jsx +0 -95
- package/debug/components/InclinationComponent.jsx +0 -52
- package/debug/components/MapComponent.jsx +0 -228
- package/debug/components/NavigationConfig.js +0 -92
- package/debug/components/PdrComponent.jsx +0 -75
- package/debug/components/PoseComponent.jsx +0 -77
- package/debug/components/PositioningComponent.jsx +0 -29
- package/debug/components/PositioningInclinationComponent.jsx +0 -82
- package/debug/components/PositioningPoseComponent.jsx +0 -117
- package/debug/components/RelativeAttitudeComponent.jsx +0 -82
- package/debug/components/StartStopComponent.jsx +0 -50
- package/debug/components/Utils.js +0 -128
- package/debug/components/index.js +0 -34
- package/debug/gnss-wifi-pdr.html +0 -16
- package/debug/gnss-wifi.html +0 -16
- package/debug/imu.html +0 -16
- package/debug/inclination.html +0 -16
- package/debug/pdr.html +0 -16
- package/debug/pose.html +0 -16
- package/debug/positioning.html +0 -16
- package/debug/relative-attitude.html +0 -16
- package/dist/wemap-positioning.min.js +0 -1
- package/index.js +0 -8
- package/src/PositioningHandler.js +0 -237
- package/src/PositioningHandler.spec.js +0 -294
- package/src/PositioningOptions.js +0 -34
- package/src/errors/AskImuOnDesktopError.js +0 -9
- package/src/errors/ContainsIgnoredProviderError.js +0 -9
- package/src/errors/GeolocationApiMissingError.js +0 -9
- package/src/errors/GeolocationPermissionDeniedError.js +0 -9
- package/src/errors/GeolocationPositionUnavailableError.js +0 -9
- package/src/errors/IpResolveServerError.js +0 -9
- package/src/errors/MissingAccelerometerError.js +0 -11
- package/src/errors/MissingArCoreError.js +0 -9
- package/src/errors/MissingGyroscopeError.js +0 -11
- package/src/errors/MissingMagnetometerError.js +0 -9
- package/src/errors/MissingNativeInterfaceError.js +0 -9
- package/src/errors/MissingSensorError.js +0 -14
- package/src/errors/NoProviderFoundError.js +0 -9
- package/src/events/Availability.js +0 -30
- package/src/events/EventType.js +0 -22
- package/src/events/ProviderEvent.js +0 -35
- package/src/providers/Constants.js +0 -5
- package/src/providers/Provider.js +0 -247
- package/src/providers/ProvidersList.js +0 -44
- package/src/providers/ProvidersLogger.js +0 -75
- package/src/providers/attitude/AbsoluteAttitudeProvider.js +0 -199
- package/src/providers/attitude/EkfAttitude.js +0 -238
- package/src/providers/attitude/EkfAttitude.spec.js +0 -116
- package/src/providers/attitude/RelativeAttitudeProvider.js +0 -121
- package/src/providers/others/ImuProvider.js +0 -179
- package/src/providers/others/InclinationProvider.js +0 -99
- package/src/providers/others/MapMatchingProvider.js +0 -65
- package/src/providers/pose/ArCoreAbsoluteProvider.js +0 -235
- package/src/providers/pose/ArCoreProvider.js +0 -191
- package/src/providers/pose/GnssWifiPdrProvider.js +0 -219
- package/src/providers/pose/PoseProvider.js +0 -71
- package/src/providers/pose/pdr/PdrProvider.js +0 -364
- package/src/providers/pose/pdr/helpers/HeadingUnlocker.js +0 -41
- package/src/providers/pose/pdr/helpers/HeadingUnlocker.spec.js +0 -26
- package/src/providers/pose/pdr/helpers/Smoother.js +0 -92
- package/src/providers/pose/pdr/helpers/Smoother.spec.js +0 -426
- package/src/providers/pose/pdr/helpers/ThugDetector.js +0 -37
- package/src/providers/pose/pdr/steps/StepDetection.js +0 -7
- package/src/providers/pose/pdr/steps/StepDetectionLadetto.js +0 -67
- package/src/providers/pose/pdr/steps/StepDetectionMinMaxPeaks.js +0 -80
- package/src/providers/pose/pdr/steps/StepDetectionMinMaxPeaks2.js +0 -108
- package/src/providers/position/GnssWifiProvider.js +0 -130
- package/src/providers/position/IpProvider.js +0 -74
- package/webpack/webpack.common.js +0 -20
- package/webpack/webpack.dev.js +0 -24
- package/webpack/webpack.prod.js +0 -15
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// in seconds
|
|
3
|
-
const WINDOW_TIME = 0.3;
|
|
4
|
-
|
|
5
|
-
// in seconds
|
|
6
|
-
const MIN_TIME_BETWEEN_STEPS = 0.4;
|
|
7
|
-
|
|
8
|
-
// in Hz
|
|
9
|
-
const MAX_FRENQUENCY = 4;
|
|
10
|
-
const MIN_FRENQUENCY = 1;
|
|
11
|
-
|
|
12
|
-
// in m.s-2
|
|
13
|
-
const VERTICAL_ACC_POSITIVE_PEAK_THRESHOLD = 1.5;
|
|
14
|
-
const VERTICAL_ACC_NEGATIVE_PEAK_THRESHOLD = -1;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class StepDetectionMinMaxPeaks {
|
|
18
|
-
|
|
19
|
-
constructor() {
|
|
20
|
-
this.slidingWindow = [];
|
|
21
|
-
|
|
22
|
-
this.lastStepTimestamp = -MIN_TIME_BETWEEN_STEPS;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
compute(timestamp, linearAcc) {
|
|
27
|
-
|
|
28
|
-
if (this.lastStepTimestamp && this.lastStepTimestamp + MIN_TIME_BETWEEN_STEPS > timestamp) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let maxValue = Number.MIN_SAFE_INTEGER;
|
|
33
|
-
let minValue = Number.MAX_SAFE_INTEGER;
|
|
34
|
-
|
|
35
|
-
const windowTime = WINDOW_TIME;
|
|
36
|
-
this.slidingWindow.forEach(function(item, index, object) {
|
|
37
|
-
if (item.timestamp < timestamp - windowTime) {
|
|
38
|
-
object.splice(index, 1);
|
|
39
|
-
} else {
|
|
40
|
-
maxValue = Math.max(item.verticalAcc, maxValue);
|
|
41
|
-
minValue = Math.min(item.verticalAcc, minValue);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
this.slidingWindow.push({
|
|
45
|
-
timestamp: timestamp,
|
|
46
|
-
verticalAcc: linearAcc[2]
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (maxValue > VERTICAL_ACC_POSITIVE_PEAK_THRESHOLD
|
|
51
|
-
&& minValue < VERTICAL_ACC_NEGATIVE_PEAK_THRESHOLD) {
|
|
52
|
-
|
|
53
|
-
const timeInterval = this.lastStepTimestamp ? timestamp - this.lastStepTimestamp : 1;
|
|
54
|
-
this.frequency = Math.min(Math.max((1 / timeInterval), MIN_FRENQUENCY), MAX_FRENQUENCY);
|
|
55
|
-
|
|
56
|
-
this.lastStepTimestamp = timestamp;
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
get lastStepSize() {
|
|
64
|
-
|
|
65
|
-
if (!this.frequency) {
|
|
66
|
-
return 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const kParamA = 0.45;
|
|
70
|
-
const kParamB = 0.2;
|
|
71
|
-
return kParamA + kParamB * this.frequency;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
get speed() {
|
|
75
|
-
return this.lastStepTimestamp ? this.lastStepSize * this.frequency : 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default StepDetectionMinMaxPeaks;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// in seconds
|
|
3
|
-
const WINDOW_TIME = 0.3;
|
|
4
|
-
|
|
5
|
-
// in seconds
|
|
6
|
-
const MIN_TIME_BETWEEN_STEPS = 0.4;
|
|
7
|
-
|
|
8
|
-
// in Hz
|
|
9
|
-
const MAX_FRENQUENCY = 4;
|
|
10
|
-
const MIN_FRENQUENCY = 1;
|
|
11
|
-
|
|
12
|
-
// in m.s-2
|
|
13
|
-
const VERTICAL_ACC_POSITIVE_PEAK_THRESHOLD = 0.75;
|
|
14
|
-
const VERTICAL_ACC_NEGATIVE_PEAK_THRESHOLD = -0.3;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class StepDetectionMinMaxPeaks2 {
|
|
18
|
-
|
|
19
|
-
constructor() {
|
|
20
|
-
this.slidingWindow = [];
|
|
21
|
-
|
|
22
|
-
this.lastStepTimestamp = -MIN_TIME_BETWEEN_STEPS;
|
|
23
|
-
this.previousVerticalAcc = 0;
|
|
24
|
-
this.influence = 0.2;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
compute(timestamp, linearAcc, angularRate) {
|
|
29
|
-
|
|
30
|
-
const verticalAcc = this.influence * (linearAcc[2] * 2) + (1 - this.influence) * this.previousVerticalAcc;
|
|
31
|
-
this.previousVerticalAcc = verticalAcc;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (Math.sqrt(angularRate[0] ** 2 + angularRate[1] ** 2 + angularRate[2] ** 2) > 0.75) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (this.lastStepTimestamp && this.lastStepTimestamp + MIN_TIME_BETWEEN_STEPS > timestamp) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
let maxValue = Number.MIN_SAFE_INTEGER;
|
|
43
|
-
let minValue = Number.MAX_SAFE_INTEGER;
|
|
44
|
-
|
|
45
|
-
this.slidingWindow.forEach(function(item, index, object) {
|
|
46
|
-
if (item.timestamp < timestamp - WINDOW_TIME) {
|
|
47
|
-
object.splice(index, 1);
|
|
48
|
-
} else {
|
|
49
|
-
maxValue = Math.max(item.verticalAcc, maxValue);
|
|
50
|
-
minValue = Math.min(item.verticalAcc, minValue);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
this.slidingWindow.push({
|
|
54
|
-
timestamp: timestamp,
|
|
55
|
-
verticalAcc: verticalAcc
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (maxValue > VERTICAL_ACC_POSITIVE_PEAK_THRESHOLD
|
|
60
|
-
&& minValue < VERTICAL_ACC_NEGATIVE_PEAK_THRESHOLD) {
|
|
61
|
-
|
|
62
|
-
const timeInterval = this.lastStepTimestamp ? timestamp - this.lastStepTimestamp : 1;
|
|
63
|
-
this.frequency = Math.min(Math.max((1 / timeInterval), MIN_FRENQUENCY), MAX_FRENQUENCY);
|
|
64
|
-
|
|
65
|
-
this.lastStepTimestamp = timestamp;
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
get lastStepSize() {
|
|
73
|
-
|
|
74
|
-
if (!this.frequency) {
|
|
75
|
-
return 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const kParamA = 0.45;
|
|
79
|
-
const kParamB = 0.2;
|
|
80
|
-
return kParamA + kParamB * this.frequency;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
get speed() {
|
|
84
|
-
return this.lastStepSize && this.frequency ? this.lastStepSize * this.frequency : 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
mean(data) {
|
|
88
|
-
let sum = 0.0, mean = 0.0;
|
|
89
|
-
|
|
90
|
-
for (let i = 0; i < data.length; ++i) {
|
|
91
|
-
sum += data[i].verticalAcc;
|
|
92
|
-
}
|
|
93
|
-
mean = sum / data.length;
|
|
94
|
-
return mean;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
stddev(data) {
|
|
98
|
-
const theMean = this.mean(data);
|
|
99
|
-
let standardDeviation = 0;
|
|
100
|
-
for (let i = 0; i < data.length; ++i) {
|
|
101
|
-
standardDeviation += (data[i].verticalAcc - theMean) ** 2;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return Math.sqrt(standardDeviation / data.length);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export default StepDetectionMinMaxPeaks2;
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { deg2rad } from '@wemap/maths';
|
|
2
|
-
import { WGS84UserPosition } from '@wemap/geo';
|
|
3
|
-
import { TimeUtils } from '@wemap/utils';
|
|
4
|
-
|
|
5
|
-
import EventType from '../../events/EventType';
|
|
6
|
-
import GeolocationApiMissingError from '../../errors/GeolocationApiMissingError';
|
|
7
|
-
import Provider from '../Provider';
|
|
8
|
-
import GeolocationPermissionDeniedError from '../../errors/GeolocationPermissionDeniedError';
|
|
9
|
-
import GeolocationPositionUnavailableError from '../../errors/GeolocationPositionUnavailableError';
|
|
10
|
-
import Availability from '../../events/Availability';
|
|
11
|
-
|
|
12
|
-
const POSITION_OPTIONS = {
|
|
13
|
-
enableHighAccuracy: true,
|
|
14
|
-
timeout: Infinity,
|
|
15
|
-
maximumAge: 0
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* GnssWifiProvider is a provider based on navigator.geolocation.
|
|
20
|
-
* This API does not allow us to know if the position returned is provided
|
|
21
|
-
* by Wifi Fingerprinting algorithms or by GNSS. That is why the name is
|
|
22
|
-
* "GnssWifi".
|
|
23
|
-
*/
|
|
24
|
-
class GnssWifiProvider extends Provider {
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @override
|
|
28
|
-
*/
|
|
29
|
-
static get name() {
|
|
30
|
-
return 'GnssWifi';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @override
|
|
35
|
-
*/
|
|
36
|
-
static get displayName() {
|
|
37
|
-
return 'GNSS / Wifi from Browser';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @override
|
|
42
|
-
*/
|
|
43
|
-
static get eventsType() {
|
|
44
|
-
return [EventType.AbsolutePosition];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @override
|
|
49
|
-
*/
|
|
50
|
-
static checkAvailability(options) {
|
|
51
|
-
return Availability.merge(
|
|
52
|
-
super.checkAvailability(options),
|
|
53
|
-
navigator && navigator.geolocation
|
|
54
|
-
? Availability.yes()
|
|
55
|
-
: Availability.no(new GeolocationApiMissingError())
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @override
|
|
61
|
-
*/
|
|
62
|
-
startInternal() {
|
|
63
|
-
|
|
64
|
-
this.geoLocationId = navigator.geolocation.watchPosition(
|
|
65
|
-
this.onNewPosition,
|
|
66
|
-
this.onPositionError,
|
|
67
|
-
POSITION_OPTIONS
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @override
|
|
74
|
-
*/
|
|
75
|
-
stopInternal() {
|
|
76
|
-
|
|
77
|
-
navigator.geolocation.clearWatch(this.geoLocationId);
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
onNewPosition = geolocation => {
|
|
85
|
-
const { coords } = geolocation;
|
|
86
|
-
if (!coords) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
let bearing;
|
|
91
|
-
if (coords.heading) {
|
|
92
|
-
bearing = deg2rad(coords.heading);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const timestamp = TimeUtils.unixTimestampToPreciseTime(geolocation.timestamp) / 1e3;
|
|
96
|
-
|
|
97
|
-
const position = new WGS84UserPosition(
|
|
98
|
-
coords.latitude,
|
|
99
|
-
coords.longitude,
|
|
100
|
-
null,
|
|
101
|
-
null,
|
|
102
|
-
timestamp,
|
|
103
|
-
coords.accuracy,
|
|
104
|
-
bearing,
|
|
105
|
-
GnssWifiProvider.name);
|
|
106
|
-
|
|
107
|
-
this.notify(this.createEvent(
|
|
108
|
-
EventType.AbsolutePosition, position, timestamp
|
|
109
|
-
));
|
|
110
|
-
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
onPositionError = error => {
|
|
114
|
-
|
|
115
|
-
let customError;
|
|
116
|
-
switch (error.code) {
|
|
117
|
-
case 1:
|
|
118
|
-
customError = new GeolocationPermissionDeniedError(error.message);
|
|
119
|
-
break;
|
|
120
|
-
case 2:
|
|
121
|
-
customError = new GeolocationPositionUnavailableError(error.message);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (customError) {
|
|
125
|
-
this.notifyError(customError);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export default GnssWifiProvider;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { WGS84UserPosition } from '@wemap/geo';
|
|
2
|
-
import { TimeUtils } from '@wemap/utils';
|
|
3
|
-
|
|
4
|
-
import EventType from '../../events/EventType';
|
|
5
|
-
import Provider from '../Provider';
|
|
6
|
-
import IpResolveServerError from '../../errors/IpResolveServerError';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* GnssWifiProvider is a provider based on navigator.geolocation.
|
|
10
|
-
* This API does not allow us to know if the position returned is provided
|
|
11
|
-
* by Wifi Fingerprinting algorithms or by GNSS. That is why the name is
|
|
12
|
-
* "GnssWifi".
|
|
13
|
-
*/
|
|
14
|
-
class IpProvider extends Provider {
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @override
|
|
18
|
-
*/
|
|
19
|
-
static get name() {
|
|
20
|
-
return 'IP';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @override
|
|
25
|
-
*/
|
|
26
|
-
static get displayName() {
|
|
27
|
-
return 'IP from ipinfo.io';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @override
|
|
32
|
-
*/
|
|
33
|
-
static get eventsType() {
|
|
34
|
-
return [EventType.AbsolutePosition];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @override
|
|
39
|
-
*/
|
|
40
|
-
startInternal() {
|
|
41
|
-
|
|
42
|
-
fetch('https://ipinfo.io/geo?token=24a7ca2f3b489d')
|
|
43
|
-
.then((response) => {
|
|
44
|
-
if (!response) {
|
|
45
|
-
this.notifyError(new IpResolveServerError());
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const timestamp = TimeUtils.preciseTime / 1e3;
|
|
50
|
-
|
|
51
|
-
const position = new WGS84UserPosition(
|
|
52
|
-
parseFloat(response.loc.split(',')[0]),
|
|
53
|
-
parseFloat(response.loc.split(',')[1]),
|
|
54
|
-
null,
|
|
55
|
-
null,
|
|
56
|
-
timestamp
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
this.notify(this.createEvent(
|
|
60
|
-
EventType.AbsolutePosition, position, timestamp
|
|
61
|
-
));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @override
|
|
67
|
-
*/
|
|
68
|
-
stopInternal() {
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export default IpProvider;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
module: {
|
|
3
|
-
rules: [
|
|
4
|
-
{
|
|
5
|
-
test: /\.jsx?$/,
|
|
6
|
-
include: [
|
|
7
|
-
/src/,
|
|
8
|
-
/wemap-(.*)/
|
|
9
|
-
],
|
|
10
|
-
exclude: /(\/mapbox-gl\/|.test.js|.spec.js|.mock.js)/,
|
|
11
|
-
use: { loader: 'babel-loader' }
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
test: /\.css$/,
|
|
15
|
-
use: ['style-loader', 'css-loader']
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
resolve: { extensions: ['.js', '.jsx'] }
|
|
20
|
-
};
|
package/webpack/webpack.dev.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const merge = require('webpack-merge');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const common = require('./webpack.common.js');
|
|
5
|
-
|
|
6
|
-
const debugFolder = path.join(__dirname, '../debug');
|
|
7
|
-
|
|
8
|
-
module.exports = merge(common, {
|
|
9
|
-
mode: 'development',
|
|
10
|
-
entry: { 'positioning-components': './debug/components/index.js' },
|
|
11
|
-
output: {
|
|
12
|
-
publicPath: '/js/',
|
|
13
|
-
filename: '[name].js',
|
|
14
|
-
path: path.join(debugFolder, 'js'),
|
|
15
|
-
libraryTarget: 'global'
|
|
16
|
-
},
|
|
17
|
-
devServer: {
|
|
18
|
-
contentBase: debugFolder,
|
|
19
|
-
inline: true,
|
|
20
|
-
hot: true,
|
|
21
|
-
host: '0.0.0.0',
|
|
22
|
-
port: 9000
|
|
23
|
-
}
|
|
24
|
-
});
|
package/webpack/webpack.prod.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const merge = require('webpack-merge');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const common = require('./webpack.common.js');
|
|
5
|
-
const config = require('../config.json');
|
|
6
|
-
|
|
7
|
-
module.exports = merge(common, {
|
|
8
|
-
mode: 'production',
|
|
9
|
-
entry: './index.js',
|
|
10
|
-
output: {
|
|
11
|
-
filename: config.distFileName,
|
|
12
|
-
path: path.join(__dirname, '../', config.distFolder),
|
|
13
|
-
libraryTarget: 'commonjs2'
|
|
14
|
-
}
|
|
15
|
-
});
|