@mappedin/react-native-sdk 4.0.4-alpha.6 → 4.0.6
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 +4 -13
- package/dist/index.d.ts +1076 -1295
- package/dist/index.js +203 -207
- package/package.json +3 -3
- package/dist/index.js.map +0 -7
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ const App = () => {
|
|
|
164
164
|
ref={mapView}
|
|
165
165
|
options={options}
|
|
166
166
|
onFirstMapLoaded={() => {
|
|
167
|
-
mapView.current!.
|
|
167
|
+
mapView.current!.Camera.set({ positionOptions: { rotation: 90 });
|
|
168
168
|
}}
|
|
169
169
|
/>
|
|
170
170
|
);
|
|
@@ -317,10 +317,7 @@ Example:
|
|
|
317
317
|
title="Get Directions"
|
|
318
318
|
onPress={async () => {
|
|
319
319
|
try {
|
|
320
|
-
const directions =
|
|
321
|
-
from: selectedLocation,
|
|
322
|
-
to: destinationLocation,
|
|
323
|
-
});
|
|
320
|
+
const directions = selectedLocation.directionsTo(destinationLocation);
|
|
324
321
|
console.log(directions);
|
|
325
322
|
} catch (e) {
|
|
326
323
|
console.error(e);
|
|
@@ -372,10 +369,7 @@ const App = () => {
|
|
|
372
369
|
onPress={async () => {
|
|
373
370
|
try {
|
|
374
371
|
// get Directions
|
|
375
|
-
const directions =
|
|
376
|
-
from: departuer,
|
|
377
|
-
to: destination,
|
|
378
|
-
});
|
|
372
|
+
const directions = departure.directionsTo(destination);
|
|
379
373
|
// draw path on map
|
|
380
374
|
await controller.current?.Journey.draw(directions);
|
|
381
375
|
// focus on the path
|
|
@@ -609,10 +603,7 @@ const App = () => {
|
|
|
609
603
|
onPress={async () => {
|
|
610
604
|
try {
|
|
611
605
|
// get Directions
|
|
612
|
-
const directions =
|
|
613
|
-
from: nearestNode.current,
|
|
614
|
-
to: selectedLocation,
|
|
615
|
-
});
|
|
606
|
+
const directions = nearestNode.current.directionsTo(selectedLocation);
|
|
616
607
|
// draw path and connections on map
|
|
617
608
|
await controller.current?.Journey.draw(directions);
|
|
618
609
|
// focus on the path
|