Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetDirections() throws json exception #22

Closed
AltoControl opened this issue Oct 25, 2018 · 12 comments
Closed

GetDirections() throws json exception #22

AltoControl opened this issue Oct 25, 2018 · 12 comments

Comments

@AltoControl
Copy link

I dont understand what am i doing wrong to be honest, GetDirections() is throwing a 'Newtonsoft.Json.JsonReaderException' in Newtonsoft.Json.dll
tried to upgrade my json version but that didnt do the trick

@AltoControl
Copy link
Author

Im using the nuget package, an api key and the google providers, actually the SetPositionByKeywords and GetPoint methods works fine. The problem is with the GetDirections that throws me an exceptionincode {8}, the debuggers tells me its a JsonReaderException, GetRoute doesnt work neither. I leave an example of the code:

Dim Start as New PointLatLng(Latitud, Longitud)
Dim End as New PointLatLng(Latitud2, Longitud2)

Dim Direction as GDirections
Dim Status As DirectionsStatusCode = DirectionsStatusCode.NOT_FOUND
Status = GMap.NET.MapProviders.GoogleMapProvider.Instance.GetDirections(Direction , Start , End , False, False, False, False, True) ---Boom

Same problem if i use String instead of PointLatLng

GetRoute doesnt throw me an exception but the list of points it returns is empty

@judero01col
Copy link
Owner

publish a new version with this correction, could you tell me if your problem is solved.

@judero01col judero01col added bug fix and removed bug labels Nov 2, 2018
@AltoControl
Copy link
Author

GetDirections(GDirections, PointLatLng, PointLatLng, Boolean, Boolean, Boolean, Boolean) is working fine now (Thank you very much!!!)

GetDirections(GDirections, String, String, Boolean, Boolean, Boolean, Boolean, Boolean) is still throwing an exceptionincode {8}

@judero01col
Copy link
Owner

Thank you very much for the warning, the correction was made, update to version 1.8.8

@AltoControl
Copy link
Author

AltoControl commented Nov 2, 2018

Update it, but im getting a Unable to load DLL 'SQLite.Interop.DLL', i tried to uninstall it and install it again with all the dependencies, but no luck.

P.S: i downgrade it to 1.8.5 (the highest version i was able) and the error is gone

@judero01col
Copy link
Owner

These are the libraries and the versions that you should have installed, please check and confirm.

image

@AltoControl
Copy link
Author

checked and confirmed, i could downgrade to 1.8.7 and it was the same problem, i could compile with 1.8.6

@judero01col
Copy link
Owner

I created a new project and I had no problem. could you create a new project and try

@AltoControl
Copy link
Author

AltoControl commented Nov 5, 2018

This is what i did and the results:

*Started a new proyect, download and installed the nuget package -- No problem there.
*New WPF window with a WPF gmap control -- Unable to load DLL 'SQLite.Interop.DLL'
*New Forms window with a Forms gmap control - No problem there.
*New WPF window with a Forms gmap control -- Unable to load DLL 'SQLite.Interop.DLL'

Edit:
*New WPF window with a Forms gmap control - No problem there
This is what i use in my project, so im doing something wrong, i will fix it and try GetDirections as soon as i can

@AltoControl
Copy link
Author

AltoControl commented Nov 6, 2018

Found out the problem, our project use Net Framework 4.0 which is the max in windows xp and sqlite 1.0.109.2 needs 4.5 (Not that sure, actually), so we will probably stay in 1.8.6.
Thanks for you patience and hard work, cheers

@judero01col
Copy link
Owner

Greetings, thanks for your report, I made some changes in the project to be compatible with the framework 4.0, please try and tell me.

@AltoControl
Copy link
Author

1.9 work great in both GetDirection, so i will close this issue.
Again, thanks for your hard work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants