brh55 / react-native-open-maps

🗺 A simple react-native library to perform cross-platform map actions (Google, Apple, or Yandex Maps)
MIT License
359 stars 47 forks source link

Expected 'end' parameter in navigation, defaulting to preview mode. #63

Closed bartvanandel closed 1 month ago

bartvanandel commented 2 years ago

When adding latitude and longitude, a confusing warning is issued when navigate is set to true saying "Expected 'end' parameter in navigation, defaulting to preview mode.". This warning has very little to do with end being set. Whether this parameter is set isn't even checked.

If combining latitude and longitude with navigate: true is problematic (haven't checked), the warning should say so.

If, on the other hand, the warning should be about end, better check the existence of end.

I was actually trying to provide both latitude and longitude (precise, known location) as well as end (readable address), and even with this warning, it works just fine, so for the moment I'm going to ignore it. However, it is confusing and should probably be fixed.

Note: #52 has a similar title but the "fix" suggested by @Irfanwani is provably wrong, judging by the source code.