react-native-map-link 2.8.1 → 2.9.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.
Files changed (2) hide show
  1. package/package.json +14 -11
  2. package/src/index.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-map-link",
3
- "version": "2.8.1",
3
+ "version": "2.9.0",
4
4
  "description": "Open the map app of the user's choice with a specific location",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -28,22 +28,25 @@
28
28
  },
29
29
  "homepage": "https://github.com/includable/react-native-map-link#readme",
30
30
  "dependencies": {
31
- "prop-types": "^15.7.2",
32
- "react-native-modal": "^10.0.0"
31
+ "prop-types": "^15.8.1",
32
+ "react-native-modal": "^13.0.1"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=16.8.0",
36
36
  "react-native": ">=0.40.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/core": "^7.8.4",
40
- "@babel/runtime": "^7.8.4",
41
- "@react-native-community/eslint-config": "^1.1.0",
42
- "babel-jest": "^25.1.0",
43
- "eslint": "^6.5.1",
44
- "jest": "^25.1.0",
45
- "metro-react-native-babel-preset": "^0.61.0",
46
- "react-native": "^0.64.1"
39
+ "@babel/core": "^7.17.5",
40
+ "@babel/eslint-parser": "^7.17.0",
41
+ "@babel/eslint-plugin": "^7.16.5",
42
+ "@babel/runtime": "^7.17.2",
43
+ "@react-native-community/eslint-config": "^3.0.1",
44
+ "babel-jest": "^27.5.1",
45
+ "eslint": "^8.10.0",
46
+ "eslint-plugin-flowtype": "^8.0.3",
47
+ "jest": "^27.5.1",
48
+ "metro-react-native-babel-preset": "^0.69.0",
49
+ "react-native": "^0.67.3"
47
50
  },
48
51
  "jest": {
49
52
  "preset": "react-native",
package/src/index.js CHANGED
@@ -122,7 +122,7 @@ export async function showLocation(options) {
122
122
  url = prefixes['apple-maps'];
123
123
  url = useSourceDestiny
124
124
  ? `${url}?saddr=${sourceLatLng}&daddr=${latlng}`
125
- : `${url}?ll=${latlng}`;
125
+ : `${url}?sll=${latlng}`;
126
126
  url += `&q=${title ? encodedTitle : 'Location'}`;
127
127
  url += appleDirectionMode ? `&dirflg=${appleDirectionMode}` : '';
128
128
  break;
@@ -132,7 +132,7 @@ export async function showLocation(options) {
132
132
  if (useSourceDestiny || options.directionsMode) {
133
133
  // Use "dir" as this will open up directions
134
134
  url = 'https://www.google.com/maps/dir/?api=1';
135
- url += `&origin=${sourceLatLng}`;
135
+ url += sourceLatLng ? `&origin=${sourceLatLng}` : '';
136
136
  if (!options.googleForceLatLon && title) {
137
137
  url += `&destination=${encodedTitle}`;
138
138
  } else {