EddyVerbruggen / nativescript-directions

:point_up_2: :point_right: :point_down: :point_left: Open the Maps app to show directions to anywhere you like
MIT License
83 stars 21 forks source link

Problem with current location #14

Closed pagyx93 closed 6 years ago

pagyx93 commented 7 years ago

Hi, I've a problem when I'm using the default "from" (current location). The problem is when maps app start, it doesn't automatically recognize my current location generating an error. There's a screenshot of what I'm trying to explain. Thanks

photo_2017-10-27_15-48-14

EddyVerbruggen commented 7 years ago

Ehm, that's a problem in Google Maps then..

mohammed-alsiddeeq commented 6 years ago

Hi @EddyVerbruggen I had the same problem, when running on other languages it breaks.( Tried it on android only) but i managed to get it working by setting the source variable to null in directions.common.js file in line 7 and changed the following

            qs += encodeURIComponent(source)

To this

        if(source){
            qs += encodeURIComponent(source)
        };

But i don't know if it works on IOS What do you think? I am willing to make a pull request if you wish. Thanks

lordrepha1980 commented 6 years ago

Your solution works in IOS too. Thanks

EddyVerbruggen commented 6 years ago

Thanks for sharing you experiences, and @mosid, thanks a LOT for sharing that solution 💯

Fix available in 1.1.2 from npm.