react-native-map-link 2.10.2 → 2.11.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/index.d.ts CHANGED
@@ -49,6 +49,7 @@ interface Options extends SharedOptions {
49
49
  /** optional, true will always add Google Maps to iOS and open in Safari, even if app is not installed (default: false) */
50
50
  alwaysIncludeGoogle?: boolean;
51
51
  googleForceLatLon?: boolean;
52
+ appleIgnoreLatLon?: boolean;
52
53
  googlePlaceId?: string;
53
54
  title?: string;
54
55
  /** optionally specify specific app to use */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-map-link",
3
- "version": "2.10.2",
3
+ "version": "2.11.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": {
package/src/index.js CHANGED
@@ -125,10 +125,13 @@ export async function showLocation(options) {
125
125
  case 'apple-maps':
126
126
  const appleDirectionMode = getDirectionsModeAppleMaps();
127
127
  url = prefixes['apple-maps'];
128
- url = useSourceDestiny
129
- ? `${url}?saddr=${sourceLatLng}&daddr=${latlng}`
130
- : `${url}?ll=${latlng}`;
131
- url += `&q=${title ? encodedTitle : 'Location'}`;
128
+ if (useSourceDestiny) {
129
+ url = `${url}?saddr=${sourceLatLng}&daddr=${latlng}`;
130
+ } else if (!options.appleIgnoreLatLon) {
131
+ url = `${url}?ll=${latlng}`;
132
+ }
133
+ url += useSourceDestiny || !options.appleIgnoreLatLon ? '&' : '?';
134
+ url += `q=${title ? encodedTitle : 'Location'}`;
132
135
  url += appleDirectionMode ? `&dirflg=${appleDirectionMode}` : '';
133
136
  break;
134
137
  case 'google-maps':