react-native-pointr 9.3.1 → 9.6.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/CHANGELOG.md +16 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/pointr/PTRMapWidgetManager.kt +5 -5
- package/package.json +15 -2
- package/react-native-pointr.podspec +1 -1
- package/example/pointr_rn_demo/.bundle/config +0 -2
- package/example/pointr_rn_demo/.eslintrc.js +0 -4
- package/example/pointr_rn_demo/.prettierrc.js +0 -5
- package/example/pointr_rn_demo/.watchmanconfig +0 -1
- package/example/pointr_rn_demo/App.tsx +0 -323
- package/example/pointr_rn_demo/Gemfile +0 -16
- package/example/pointr_rn_demo/Gemfile.lock +0 -111
- package/example/pointr_rn_demo/README.md +0 -188
- package/example/pointr_rn_demo/__tests__/App.test.tsx +0 -13
- package/example/pointr_rn_demo/android/app/build.gradle +0 -119
- package/example/pointr_rn_demo/android/app/debug.keystore +0 -0
- package/example/pointr_rn_demo/android/app/proguard-rules.pro +0 -10
- package/example/pointr_rn_demo/android/app/src/main/AndroidManifest.xml +0 -27
- package/example/pointr_rn_demo/android/app/src/main/java/com/pointr_rn_demo/MainActivity.kt +0 -22
- package/example/pointr_rn_demo/android/app/src/main/java/com/pointr_rn_demo/MainApplication.kt +0 -27
- package/example/pointr_rn_demo/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/pointr_rn_demo/android/app/src/main/res/values/strings.xml +0 -3
- package/example/pointr_rn_demo/android/app/src/main/res/values/styles.xml +0 -9
- package/example/pointr_rn_demo/android/build.gradle +0 -32
- package/example/pointr_rn_demo/android/gradle.properties +0 -44
- package/example/pointr_rn_demo/android/settings.gradle +0 -6
- package/example/pointr_rn_demo/app.json +0 -4
- package/example/pointr_rn_demo/babel.config.js +0 -3
- package/example/pointr_rn_demo/index.js +0 -16
- package/example/pointr_rn_demo/ios/.xcode.env +0 -11
- package/example/pointr_rn_demo/ios/Podfile +0 -40
- package/example/pointr_rn_demo/ios/Podfile.lock +0 -2767
- package/example/pointr_rn_demo/ios/pointr_rn_demo/AppDelegate.swift +0 -48
- package/example/pointr_rn_demo/ios/pointr_rn_demo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/pointr_rn_demo/ios/pointr_rn_demo/Images.xcassets/Contents.json +0 -6
- package/example/pointr_rn_demo/ios/pointr_rn_demo/Info.plist +0 -63
- package/example/pointr_rn_demo/ios/pointr_rn_demo/LaunchScreen.storyboard +0 -47
- package/example/pointr_rn_demo/ios/pointr_rn_demo/PrivacyInfo.xcprivacy +0 -37
- package/example/pointr_rn_demo/ios/pointr_rn_demo.xcodeproj/project.pbxproj +0 -496
- package/example/pointr_rn_demo/ios/pointr_rn_demo.xcodeproj/xcshareddata/xcschemes/pointr_rn_demo.xcscheme +0 -88
- package/example/pointr_rn_demo/ios/pointr_rn_demo.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/pointr_rn_demo/jest.config.js +0 -3
- package/example/pointr_rn_demo/metro.config.js +0 -22
- package/example/pointr_rn_demo/package-lock.json +0 -11747
- package/example/pointr_rn_demo/package.json +0 -46
- package/example/pointr_rn_demo/prepare-demo-distribution.sh +0 -103
- package/example/pointr_rn_demo/tsconfig.json +0 -5
- package/prepare-distribution.sh +0 -84
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [9.6.0] - 2026-03-26
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Mobile SDK 9.6.0 integration.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [9.5.0] - 2026-03-02
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Mobile SDK 9.5.0 integration.
|
|
17
|
+
|
|
18
|
+
## [9.4.0] - 2026-02-05
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Mobile SDK 9.4.0 integration.
|
|
22
|
+
|
|
7
23
|
## [9.3.1] - 2026-01-07
|
|
8
24
|
|
|
9
25
|
### Added
|
package/android/build.gradle
CHANGED
|
@@ -91,9 +91,9 @@ dependencies {
|
|
|
91
91
|
// For < 0.71, this will be from the local maven repo
|
|
92
92
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
93
93
|
//noinspection GradleDynamicVersion
|
|
94
|
-
implementation "com.facebook.react:react-
|
|
94
|
+
implementation "com.facebook.react:react-android:0.82.1"
|
|
95
95
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
96
|
-
implementation("com.pointrlabs:pointr:9.
|
|
96
|
+
implementation("com.pointrlabs:pointr:9.6.0")
|
|
97
97
|
implementation ("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
|
|
98
98
|
implementation 'com.google.android.material:material:1.12.0'
|
|
99
99
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
|
@@ -99,7 +99,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
|
|
|
99
99
|
val action: PTRMapWidgetAction = when (command) {
|
|
100
100
|
PTRMapWidgetCommandType.SITE -> {
|
|
101
101
|
val siteId = args.getString(0).orEmpty()
|
|
102
|
-
val location = PTRMapWidgetSiteLocation(siteId,
|
|
102
|
+
val location = PTRMapWidgetSiteLocation(siteId, isExternal = true)
|
|
103
103
|
PTRMapWidgetFocusAction(location)
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -177,7 +177,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
|
|
|
177
177
|
|
|
178
178
|
PTRMapWidgetCommandType.MARK_MY_CAR_SITE -> {
|
|
179
179
|
val siteId = args.getString(0).orEmpty()
|
|
180
|
-
val location = PTRMapWidgetSiteLocation(siteId,
|
|
180
|
+
val location = PTRMapWidgetSiteLocation(siteId, isExternal = true)
|
|
181
181
|
PTRMapWidgetMarkMyCarAction(location, shouldShowPopup = args.getBoolean(1))
|
|
182
182
|
}
|
|
183
183
|
|
|
@@ -194,7 +194,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
|
|
|
194
194
|
|
|
195
195
|
PTRMapWidgetCommandType.SHOW_MY_CAR_SITE -> {
|
|
196
196
|
val siteId = args.getString(0).orEmpty()
|
|
197
|
-
val location = PTRMapWidgetSiteLocation(siteId,
|
|
197
|
+
val location = PTRMapWidgetSiteLocation(siteId, isExternal = true)
|
|
198
198
|
PTRMapWidgetShowMyCarAction(location, shouldShowPopup = args.getBoolean(1))
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -220,7 +220,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
|
|
|
220
220
|
val location = when (focusType) {
|
|
221
221
|
PTRMapWidgetCommandType.SITE -> {
|
|
222
222
|
val siteId = args.getString(5).orEmpty()
|
|
223
|
-
PTRMapWidgetSiteLocation(siteId,
|
|
223
|
+
PTRMapWidgetSiteLocation(siteId, isExternal = true)
|
|
224
224
|
}
|
|
225
225
|
PTRMapWidgetCommandType.BUILDING -> {
|
|
226
226
|
val siteId = args.getString(5).orEmpty()
|
|
@@ -241,7 +241,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
|
|
|
241
241
|
else -> {
|
|
242
242
|
// Default to site if invalid focus type
|
|
243
243
|
val siteId = args.getString(5).orEmpty()
|
|
244
|
-
PTRMapWidgetSiteLocation(siteId,
|
|
244
|
+
PTRMapWidgetSiteLocation(siteId, isExternal = true)
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
PTRMapWidgetFocusAction(location)
|
package/package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-pointr",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"description": "Pointr React-Native Module",
|
|
5
5
|
"main": "src/index",
|
|
6
|
+
"files": [
|
|
7
|
+
"src",
|
|
8
|
+
"ios",
|
|
9
|
+
"android/src",
|
|
10
|
+
"android/build.gradle",
|
|
11
|
+
"android/gradle.properties",
|
|
12
|
+
"react-native-pointr.podspec",
|
|
13
|
+
"README.md",
|
|
14
|
+
"CHANGELOG.md",
|
|
15
|
+
"API_REFERENCE.md",
|
|
16
|
+
"EXTENDING.md",
|
|
17
|
+
"WAYFINDING_EVENTS.md"
|
|
18
|
+
],
|
|
6
19
|
"author": " <> ()",
|
|
7
20
|
"license": "UNLICENSED",
|
|
8
21
|
"homepage": "#readme",
|
|
@@ -25,4 +38,4 @@
|
|
|
25
38
|
"scripts": {
|
|
26
39
|
"prepare-dist": "chmod +x prepare-distribution.sh && ./prepare-distribution.sh"
|
|
27
40
|
}
|
|
28
|
-
}
|
|
41
|
+
}
|
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
|
-
s.dependency 'PointrKit', '9.
|
|
19
|
+
s.dependency 'PointrKit', '9.6.0'
|
|
20
20
|
|
|
21
21
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
22
22
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
requireNativeComponent,
|
|
4
|
-
findNodeHandle,
|
|
5
|
-
Button,
|
|
6
|
-
View,
|
|
7
|
-
ScrollView,
|
|
8
|
-
NativeSyntheticEvent,
|
|
9
|
-
NativeModules,
|
|
10
|
-
NativeEventEmitter
|
|
11
|
-
} from 'react-native';
|
|
12
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
13
|
-
import {
|
|
14
|
-
getPois,
|
|
15
|
-
showMapWidget,
|
|
16
|
-
PTRSiteCommand,
|
|
17
|
-
PTRBuildingCommand,
|
|
18
|
-
PTRLevelCommand,
|
|
19
|
-
PTRPoiCommand,
|
|
20
|
-
PTRPathCommand,
|
|
21
|
-
PTRStaticPathCommand,
|
|
22
|
-
PTRMarkMyCarLevelCommand,
|
|
23
|
-
PTRMarkMyCarSiteCommand,
|
|
24
|
-
PTRShowMyCarSiteCommand,
|
|
25
|
-
PTRStartAndFocusCommand,
|
|
26
|
-
type PTRPoi,
|
|
27
|
-
type PTRWayfindingEvent,
|
|
28
|
-
} from 'react-native-pointr';
|
|
29
|
-
|
|
30
|
-
interface PTRMapWidgetProps {
|
|
31
|
-
style?: any;
|
|
32
|
-
onMapWidgetDidEndLoading?: (event: NativeSyntheticEvent<any>) => void;
|
|
33
|
-
onWayfindingEvent?: (event: NativeSyntheticEvent<PTRWayfindingEvent>) => void;
|
|
34
|
-
}
|
|
35
|
-
const PTRMapWidget = requireNativeComponent<PTRMapWidgetProps>('PTRMapWidget');
|
|
36
|
-
|
|
37
|
-
// Create event emitter for Pointr events
|
|
38
|
-
const PTREventEmitter = new NativeEventEmitter(NativeModules.PTRNativePointrLibrary);
|
|
39
|
-
|
|
40
|
-
function App(): React.JSX.Element {
|
|
41
|
-
const ref = useRef<any>(null);
|
|
42
|
-
const [isInitialized, setIsInitialized] = useState(false);
|
|
43
|
-
const insets = useSafeAreaInsets();
|
|
44
|
-
|
|
45
|
-
// Initialize Pointr library when component mounts
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
// Use setTimeout to defer initialization to next tick, preventing blocking
|
|
48
|
-
const timer = setTimeout(() => {
|
|
49
|
-
try {
|
|
50
|
-
console.log('Initializing Pointr library...');
|
|
51
|
-
|
|
52
|
-
// Initialize the Pointr library
|
|
53
|
-
NativeModules.PTRNativePointrLibrary.initialize(
|
|
54
|
-
"1ee58e56-fc35-4ec4-b32e-5d49e65fb52d",
|
|
55
|
-
"af5d9431-56a3-46a9-ae0a-65d9757528d1",
|
|
56
|
-
"https://sample-app-v9.pointr.cloud",
|
|
57
|
-
0
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
// Start the Pointr SDK
|
|
61
|
-
NativeModules.PTRNativePointrLibrary.start((state: string) => {
|
|
62
|
-
console.log(`Pointr state: ${state}`);
|
|
63
|
-
setIsInitialized(true);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
} catch (error) {
|
|
67
|
-
console.error('Error initializing Pointr:', error);
|
|
68
|
-
setIsInitialized(true); // Set to true anyway to prevent blocking UI
|
|
69
|
-
}
|
|
70
|
-
}, 100);
|
|
71
|
-
|
|
72
|
-
return () => clearTimeout(timer);
|
|
73
|
-
}, []);
|
|
74
|
-
|
|
75
|
-
// Set up geofence event listener
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
if (!isInitialized) return;
|
|
78
|
-
// Subscribe to OnGeofenceEvent
|
|
79
|
-
const geofenceSubscription = PTREventEmitter.addListener(
|
|
80
|
-
'OnGeofenceEvent',
|
|
81
|
-
(geofenceEvent) => {
|
|
82
|
-
console.log('=== Geofence Event Received ===');
|
|
83
|
-
// Log the event type
|
|
84
|
-
console.log(`Event Type: ${geofenceEvent.eventType}`);
|
|
85
|
-
|
|
86
|
-
// Log timestamp if available (iOS only)
|
|
87
|
-
if (geofenceEvent.timestamp) {
|
|
88
|
-
console.log(`Timestamp: ${new Date(geofenceEvent.timestamp).toISOString()}`);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Log geofence information
|
|
92
|
-
if (geofenceEvent.geofence) {
|
|
93
|
-
console.log('Geofence Information:');
|
|
94
|
-
console.log(` - ID: ${geofenceEvent.geofence.id}`);
|
|
95
|
-
console.log(` - External ID: ${geofenceEvent.geofence.externalId}`);
|
|
96
|
-
console.log(` - Name: ${geofenceEvent.geofence.name}`);
|
|
97
|
-
console.log(` - Type: ${geofenceEvent.geofence.geofenceType}`);
|
|
98
|
-
console.log(` - Location: ${geofenceEvent.geofence.position.latitude}, ${geofenceEvent.geofence.position.longitude}`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Log notification information if available
|
|
102
|
-
if (geofenceEvent.geofenceNotification) {
|
|
103
|
-
console.log('Notification:');
|
|
104
|
-
console.log(` - ID: ${geofenceEvent.geofenceNotification.id}`);
|
|
105
|
-
console.log(` - Message: ${geofenceEvent.geofenceNotification.message}`);
|
|
106
|
-
console.log(` - Timestamp: ${geofenceEvent.geofenceNotification.timestamp}`);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
console.log('================================');
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
const positionSubscription = PTREventEmitter.addListener("OnPositionManagerCalculatedLocation", (location) => {
|
|
114
|
-
// console.log("Calculated Location: ", location);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// Clean up the subscription when component unmounts
|
|
118
|
-
return () => {
|
|
119
|
-
geofenceSubscription.remove();
|
|
120
|
-
positionSubscription.remove();
|
|
121
|
-
};
|
|
122
|
-
}, [isInitialized]);
|
|
123
|
-
|
|
124
|
-
const handleWayfindingEvent = (event: NativeSyntheticEvent<PTRWayfindingEvent>) => {
|
|
125
|
-
const wayfindingEvent = event.nativeEvent;
|
|
126
|
-
|
|
127
|
-
// Determine event type name
|
|
128
|
-
let eventTypeName: string;
|
|
129
|
-
switch (wayfindingEvent.type) {
|
|
130
|
-
case -1:
|
|
131
|
-
eventTypeName = 'Cancelled';
|
|
132
|
-
break;
|
|
133
|
-
case 0:
|
|
134
|
-
eventTypeName = 'Started';
|
|
135
|
-
break;
|
|
136
|
-
case 1:
|
|
137
|
-
eventTypeName = 'Ended';
|
|
138
|
-
break;
|
|
139
|
-
default:
|
|
140
|
-
eventTypeName = 'Unknown';
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
console.log('=== Wayfinding Event ===');
|
|
144
|
-
console.log(`Event Type: ${eventTypeName} (${wayfindingEvent.type})`);
|
|
145
|
-
console.log('Destination POI:');
|
|
146
|
-
console.log(` - Name: ${wayfindingEvent.poi.name}`);
|
|
147
|
-
console.log(` - Identifier: ${wayfindingEvent.poi.identifier}`);
|
|
148
|
-
console.log(` - External ID: ${wayfindingEvent.poi.externalIdentifier}`);
|
|
149
|
-
console.log(` - Type Code: ${wayfindingEvent.poi.typeCode}`);
|
|
150
|
-
console.log(` - Position: lat ${wayfindingEvent.poi.position.lat}, lon ${wayfindingEvent.poi.position.lon}, level ${wayfindingEvent.poi.position.lvl}`);
|
|
151
|
-
console.log('========================');
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
const handleMapWidgetDidEndLoading = (event: NativeSyntheticEvent<any>) => {
|
|
155
|
-
const ptrCommandResponse = event.nativeEvent;
|
|
156
|
-
if (ptrCommandResponse.command === "site") {
|
|
157
|
-
console.log("Map did end loading:", ptrCommandResponse.command, ptrCommandResponse.siteExternalIdentifier, ptrCommandResponse.error);
|
|
158
|
-
|
|
159
|
-
getPois(ptrCommandResponse.siteExternalIdentifier)
|
|
160
|
-
.then((pois: PTRPoi[]) => {
|
|
161
|
-
console.log(`POIs fetched: ${pois.length} items`);
|
|
162
|
-
// Example: Log first POI details
|
|
163
|
-
if (pois.length > 0) {
|
|
164
|
-
const firstPoi = pois[0];
|
|
165
|
-
console.log('First POI:', {
|
|
166
|
-
name: firstPoi.name,
|
|
167
|
-
identifier: firstPoi.identifier,
|
|
168
|
-
typeCode: firstPoi.typeCode,
|
|
169
|
-
position: firstPoi.position,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
})
|
|
173
|
-
.catch((error) => {
|
|
174
|
-
console.error("Error fetching POIs:", error);
|
|
175
|
-
});
|
|
176
|
-
} else {
|
|
177
|
-
console.log("Map did end loading with unknown parameters:", ptrCommandResponse);
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
const showSite = () => {
|
|
182
|
-
const reactTag = findNodeHandle(ref.current);
|
|
183
|
-
if (reactTag) {
|
|
184
|
-
let command = new PTRSiteCommand("workplace-portland");
|
|
185
|
-
showMapWidget(reactTag, command);
|
|
186
|
-
} else {
|
|
187
|
-
console.error("Failed to find node handle for ref");
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
const showBuilding = () => {
|
|
192
|
-
const reactTag = findNodeHandle(ref.current);
|
|
193
|
-
if (reactTag) {
|
|
194
|
-
let command = new PTRBuildingCommand("workplace-portland", "office-east");
|
|
195
|
-
showMapWidget(reactTag, command);
|
|
196
|
-
} else {
|
|
197
|
-
console.error("Failed to find node handle for ref");
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
const showLevel = () => {
|
|
202
|
-
const reactTag = findNodeHandle(ref.current);
|
|
203
|
-
if (reactTag) {
|
|
204
|
-
let command = new PTRLevelCommand("workplace-portland", "office-east", 2);
|
|
205
|
-
showMapWidget(reactTag, command);
|
|
206
|
-
} else {
|
|
207
|
-
console.error("Failed to find node handle for ref");
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const showPoi = () => {
|
|
212
|
-
const reactTag = findNodeHandle(ref.current);
|
|
213
|
-
if (reactTag) {
|
|
214
|
-
let command = new PTRPoiCommand("workplace-portland", "Lobby");
|
|
215
|
-
showMapWidget(reactTag, command);
|
|
216
|
-
} else {
|
|
217
|
-
console.error("Failed to find node handle for ref");
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
const showPath = () => {
|
|
222
|
-
const reactTag = findNodeHandle(ref.current);
|
|
223
|
-
if (reactTag) {
|
|
224
|
-
let command = new PTRPathCommand("workplace-portland", "Lobby");
|
|
225
|
-
showMapWidget(reactTag, command);
|
|
226
|
-
} else {
|
|
227
|
-
console.error("Failed to find node handle for ref");
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
const showStaticPath = () => {
|
|
232
|
-
const reactTag = findNodeHandle(ref.current);
|
|
233
|
-
if (reactTag) {
|
|
234
|
-
let command = new PTRStaticPathCommand("workplace-portland", "Accessories", "Lobby");
|
|
235
|
-
showMapWidget(reactTag, command);
|
|
236
|
-
} else {
|
|
237
|
-
console.error("Failed to find node handle for ref");
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
const markMyCarLevel = () => {
|
|
242
|
-
const reactTag = findNodeHandle(ref.current);
|
|
243
|
-
if (reactTag) {
|
|
244
|
-
let command = new PTRMarkMyCarLevelCommand("workplace-portland", "office-east", 1, true);
|
|
245
|
-
showMapWidget(reactTag, command);
|
|
246
|
-
} else {
|
|
247
|
-
console.error("Failed to find node handle for ref");
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
const markMyCarSite = () => {
|
|
252
|
-
const reactTag = findNodeHandle(ref.current);
|
|
253
|
-
if (reactTag) {
|
|
254
|
-
let command = new PTRMarkMyCarSiteCommand("workplace-portland", true);
|
|
255
|
-
showMapWidget(reactTag, command);
|
|
256
|
-
} else {
|
|
257
|
-
console.error("Failed to find node handle for ref");
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
const showMyCarSite = () => {
|
|
262
|
-
const reactTag = findNodeHandle(ref.current);
|
|
263
|
-
if (reactTag) {
|
|
264
|
-
let command = new PTRShowMyCarSiteCommand("workplace-portland", true);
|
|
265
|
-
showMapWidget(reactTag, command);
|
|
266
|
-
} else {
|
|
267
|
-
console.error("Failed to find node handle for ref");
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
const startAndFocusSite = () => {
|
|
272
|
-
const reactTag = findNodeHandle(ref.current);
|
|
273
|
-
if (reactTag) {
|
|
274
|
-
const siteCommand = new PTRSiteCommand("workplace-portland");
|
|
275
|
-
const command = new PTRStartAndFocusCommand(
|
|
276
|
-
"1ee58e56-fc35-4ec4-b32e-5d49e65fb52d",
|
|
277
|
-
"af5d9431-56a3-46a9-ae0a-65d9757528d1",
|
|
278
|
-
"https://sample-app-v9.pointr.cloud",
|
|
279
|
-
0,
|
|
280
|
-
siteCommand
|
|
281
|
-
);
|
|
282
|
-
showMapWidget(reactTag, command);
|
|
283
|
-
} else {
|
|
284
|
-
console.error("Failed to find node handle for ref");
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
return (
|
|
289
|
-
<View style={{ flex: 1 }}>
|
|
290
|
-
<View style={{ flex: 1, paddingTop: insets.top, paddingLeft: insets.left, paddingRight: insets.right }}>
|
|
291
|
-
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16 }}>
|
|
292
|
-
<Button title="Show Site" onPress={showSite} />
|
|
293
|
-
<View style={{ height: 12 }} />
|
|
294
|
-
<Button title="Show Building" onPress={showBuilding} />
|
|
295
|
-
<View style={{ height: 12 }} />
|
|
296
|
-
<Button title="Show Level" onPress={showLevel} />
|
|
297
|
-
<View style={{ height: 12 }} />
|
|
298
|
-
<Button title="Show POI" onPress={showPoi} />
|
|
299
|
-
<View style={{ height: 12 }} />
|
|
300
|
-
<Button title="Show Path" onPress={showPath} />
|
|
301
|
-
<View style={{ height: 12 }} />
|
|
302
|
-
<Button title="Show Static Path" onPress={showStaticPath} />
|
|
303
|
-
<View style={{ height: 12 }} />
|
|
304
|
-
<Button title="Mark My Car Level" onPress={markMyCarLevel} />
|
|
305
|
-
<View style={{ height: 12 }} />
|
|
306
|
-
<Button title="Mark My Car Site" onPress={markMyCarSite} />
|
|
307
|
-
<View style={{ height: 12 }} />
|
|
308
|
-
<Button title="Show My Car Site" onPress={showMyCarSite} />
|
|
309
|
-
<View style={{ height: 12 }} />
|
|
310
|
-
<Button title="Start & Focus Site" onPress={startAndFocusSite} />
|
|
311
|
-
</ScrollView>
|
|
312
|
-
</View>
|
|
313
|
-
<PTRMapWidget
|
|
314
|
-
ref={ref}
|
|
315
|
-
style={{ flex: 4 }}
|
|
316
|
-
onMapWidgetDidEndLoading={handleMapWidgetDidEndLoading}
|
|
317
|
-
onWayfindingEvent={handleWayfindingEvent}
|
|
318
|
-
/>
|
|
319
|
-
</View>
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
export default App;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
-
ruby ">= 2.6.10"
|
|
5
|
-
|
|
6
|
-
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
7
|
-
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
8
|
-
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
9
|
-
gem 'xcodeproj', '< 1.26.0'
|
|
10
|
-
gem 'concurrent-ruby', '< 1.3.4'
|
|
11
|
-
|
|
12
|
-
# Ruby 3.4.0 has removed some libraries from the standard library.
|
|
13
|
-
gem 'bigdecimal'
|
|
14
|
-
gem 'logger'
|
|
15
|
-
gem 'benchmark'
|
|
16
|
-
gem 'mutex_m'
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
GEM
|
|
2
|
-
remote: https://rubygems.org/
|
|
3
|
-
specs:
|
|
4
|
-
CFPropertyList (3.0.8)
|
|
5
|
-
activesupport (6.1.7.10)
|
|
6
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
7
|
-
i18n (>= 1.6, < 2)
|
|
8
|
-
minitest (>= 5.1)
|
|
9
|
-
tzinfo (~> 2.0)
|
|
10
|
-
zeitwerk (~> 2.3)
|
|
11
|
-
addressable (2.8.7)
|
|
12
|
-
public_suffix (>= 2.0.2, < 7.0)
|
|
13
|
-
algoliasearch (1.27.5)
|
|
14
|
-
httpclient (~> 2.8, >= 2.8.3)
|
|
15
|
-
json (>= 1.5.1)
|
|
16
|
-
atomos (0.1.3)
|
|
17
|
-
benchmark (0.5.0)
|
|
18
|
-
bigdecimal (3.3.1)
|
|
19
|
-
claide (1.1.0)
|
|
20
|
-
cocoapods (1.15.2)
|
|
21
|
-
addressable (~> 2.8)
|
|
22
|
-
claide (>= 1.0.2, < 2.0)
|
|
23
|
-
cocoapods-core (= 1.15.2)
|
|
24
|
-
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
25
|
-
cocoapods-downloader (>= 2.1, < 3.0)
|
|
26
|
-
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
27
|
-
cocoapods-search (>= 1.0.0, < 2.0)
|
|
28
|
-
cocoapods-trunk (>= 1.6.0, < 2.0)
|
|
29
|
-
cocoapods-try (>= 1.1.0, < 2.0)
|
|
30
|
-
colored2 (~> 3.1)
|
|
31
|
-
escape (~> 0.0.4)
|
|
32
|
-
fourflusher (>= 2.3.0, < 3.0)
|
|
33
|
-
gh_inspector (~> 1.0)
|
|
34
|
-
molinillo (~> 0.8.0)
|
|
35
|
-
nap (~> 1.0)
|
|
36
|
-
ruby-macho (>= 2.3.0, < 3.0)
|
|
37
|
-
xcodeproj (>= 1.23.0, < 2.0)
|
|
38
|
-
cocoapods-core (1.15.2)
|
|
39
|
-
activesupport (>= 5.0, < 8)
|
|
40
|
-
addressable (~> 2.8)
|
|
41
|
-
algoliasearch (~> 1.0)
|
|
42
|
-
concurrent-ruby (~> 1.1)
|
|
43
|
-
fuzzy_match (~> 2.0.4)
|
|
44
|
-
nap (~> 1.0)
|
|
45
|
-
netrc (~> 0.11)
|
|
46
|
-
public_suffix (~> 4.0)
|
|
47
|
-
typhoeus (~> 1.0)
|
|
48
|
-
cocoapods-deintegrate (1.0.5)
|
|
49
|
-
cocoapods-downloader (2.1)
|
|
50
|
-
cocoapods-plugins (1.0.0)
|
|
51
|
-
nap
|
|
52
|
-
cocoapods-search (1.0.1)
|
|
53
|
-
cocoapods-trunk (1.6.0)
|
|
54
|
-
nap (>= 0.8, < 2.0)
|
|
55
|
-
netrc (~> 0.11)
|
|
56
|
-
cocoapods-try (1.2.0)
|
|
57
|
-
colored2 (3.1.2)
|
|
58
|
-
concurrent-ruby (1.3.3)
|
|
59
|
-
escape (0.0.4)
|
|
60
|
-
ethon (0.15.0)
|
|
61
|
-
ffi (>= 1.15.0)
|
|
62
|
-
ffi (1.17.2)
|
|
63
|
-
fourflusher (2.3.1)
|
|
64
|
-
fuzzy_match (2.0.4)
|
|
65
|
-
gh_inspector (1.1.3)
|
|
66
|
-
httpclient (2.9.0)
|
|
67
|
-
mutex_m
|
|
68
|
-
i18n (1.14.7)
|
|
69
|
-
concurrent-ruby (~> 1.0)
|
|
70
|
-
json (2.7.6)
|
|
71
|
-
logger (1.7.0)
|
|
72
|
-
minitest (5.25.4)
|
|
73
|
-
molinillo (0.8.0)
|
|
74
|
-
mutex_m (0.3.0)
|
|
75
|
-
nanaimo (0.3.0)
|
|
76
|
-
nap (1.1.0)
|
|
77
|
-
netrc (0.11.0)
|
|
78
|
-
public_suffix (4.0.7)
|
|
79
|
-
rexml (3.4.4)
|
|
80
|
-
ruby-macho (2.5.1)
|
|
81
|
-
typhoeus (1.5.0)
|
|
82
|
-
ethon (>= 0.9.0, < 0.16.0)
|
|
83
|
-
tzinfo (2.0.6)
|
|
84
|
-
concurrent-ruby (~> 1.0)
|
|
85
|
-
xcodeproj (1.25.1)
|
|
86
|
-
CFPropertyList (>= 2.3.3, < 4.0)
|
|
87
|
-
atomos (~> 0.1.3)
|
|
88
|
-
claide (>= 1.0.2, < 2.0)
|
|
89
|
-
colored2 (~> 3.1)
|
|
90
|
-
nanaimo (~> 0.3.0)
|
|
91
|
-
rexml (>= 3.3.6, < 4.0)
|
|
92
|
-
zeitwerk (2.6.18)
|
|
93
|
-
|
|
94
|
-
PLATFORMS
|
|
95
|
-
ruby
|
|
96
|
-
|
|
97
|
-
DEPENDENCIES
|
|
98
|
-
activesupport (>= 6.1.7.5, != 7.1.0)
|
|
99
|
-
benchmark
|
|
100
|
-
bigdecimal
|
|
101
|
-
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
|
|
102
|
-
concurrent-ruby (< 1.3.4)
|
|
103
|
-
logger
|
|
104
|
-
mutex_m
|
|
105
|
-
xcodeproj (< 1.26.0)
|
|
106
|
-
|
|
107
|
-
RUBY VERSION
|
|
108
|
-
ruby 2.6.10p210
|
|
109
|
-
|
|
110
|
-
BUNDLED WITH
|
|
111
|
-
2.4.22
|