S.Vishwakarma
S.Vishwakarma

Reputation: 129

Apple maps shows "directions not available" when launched from react-native app

I building a react-native app in which i have used map to show certain locations. I have marked pins for each location on map. Now i want that if user select a marker and click on navigation button(which i have provided on map) it should launch apple map(for ios) and google maps(for android) and show navigation from user's current location to the latitude and longitude that i have passed in the map url.

But on apple maps it always show "direction not available" message.

Here is how i call map url for navigation:

Platform.select({
      ios: () => {
             Linking.openURL('http://maps.apple.com/maps?daddr='+latitude+','+longitude+'&dirflg=d&t=m');
          
      },
      android: () => {
          Linking.openURL('http://maps.google.com/maps?daddr=' +latitude+ ',' +longitude);
      }
  })();

enter image description here

Can anyone please help me out here..

Thanks

Upvotes: 1

Views: 6653

Answers (1)

Indrajeet
Indrajeet

Reputation: 5666

Currently directions feature is not available in India because of this map is not showing you directions. You have to use Google Map.

For more clarification follow this link

https://www.apple.com/in/ios/feature-availability/#maps-directions

This link shows which feature is available in which country.

Upvotes: 5

Related Questions