LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GMap.Net in LabVIEW now requires API Key

Solved!
Go to solution

As of 2017, I had GMap.Net working fine in LabVIEW 2014, but at some point a number of GMap.Net functions, for example: the the GetPoint function to get Latitude and Longitude coordinates of an address suddenly stopped working.

 

After searching online, I determined that Google changed their geocode implementation policy to require a user API key. I went ahead and registered to get and implement this API key but GMap still throws an error. This error is about failure to load Newtonsoft.json framework or file. See the attached error dialog.

 

Has anyone been able to continue using GMap.Net in LabVIEW with API key implementation?

 

Regards

 

Anthony L.

0 Kudos
Message 1 of 5
(5,106 Views)

Hello:

 

I had LabVIEW compiled app working with GMap.NET dll core library for four years from 2015 to 2019. Then the very same LabVIEW app just suddenly stopped working.

 

Looks like Google changed their geocode server requests policy to require an API Key. Got the API Key from Google console but the code throws errors about not finding or unable to load Newtonsoft.json dll ver: 12.0.0.0. I saved the Newtonsoft.json dll in the data folder for the app but still get same error.

 

Has anyone encountered this scenario and resolved it ?

 

Error code is attached

 

Anthony

0 Kudos
Message 2 of 5
(5,048 Views)
Solution
Accepted by topic author Anthony_L

Hello LV Community:

 

After so much time searching, I installed Visual Studio 2019 and used that to download the GMap.NET nuget package files from the internet. It so happens that Visual Studio 2019 will search for any .NET package on the internet by keyword. Once related packages are found, you will be given a list to select-from. This method ensures that all dependent files get downloaded from whatever package that you select. I have attached a menu that shows how to access the menu:  Manage NuGet packages.

 

In any case, once the package was downloaded, I went and chose all those components, dll, and xml, for .NET 4.0 and copied those to the LabVIEW project folder. Once this was done, the LabVIEW VI with GMap.NET methods and properties were re-linked, the API Key applied, and the geolocation method to get Lat/Long tested which worked OK.

 

Attached are all the files that I added to the Project folder to allow the LabVIEW VI with new GMap.NET function calls to work. I am not sure if all those .NET dll and xml file components are needed but I really do not care at this point as long as things are working.

 

Anthony

 

 

0 Kudos
Message 3 of 5
(4,994 Views)

One more thing:

 

GMap.NET version 1.9.9 map front panel (GUI) control for embedding to LabVIEW .NET container would not load or container became broken after running the VI. This was solved by adding the following dll in the supporting .NET framework folder.

 

After this step both google maps geocode functions and Embedded GMap.NET control continued to work.

0 Kudos
Message 4 of 5
(4,987 Views)

That is great that you solved your problem. Make me want to try it out too.

And I could help notice the location in your screen shot 🙂

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 5 of 5
(4,965 Views)