How to Get Dynamic Google Maps on the Front Panel of LabVIEW

Updated Mar 23, 2023

Environment

Software

  • LabVIEW

I need to interface Google Maps API with my LabVIEW project in order to display the map and move it (zooming, shifting the map with the mouse, and placing markers among others). How can I do that?

LabVIEW provides an example project for interfacing with the Google Maps API, but now Google makes the API keys paid.

In case you have Google Map API Key, you can go by the following link: GMaps API.

In case you don't have a Key, you can interface Google Maps through ActiveX control. Place an ActiveX Web Browser control on a front panel by right-clicking on a front panel >> .Net & ActiveX >>  Web Browser.

image.png

On the Block Diagram, place an ActiveX Invoke Node by right-clicking on the Block Diagram >> Connectivity >> ActiveX >> Invoke Node (ActiveX).

image.png

Wire WebBrowser Control to Invoke Node (ActiveX), click on the Method and select Navigate:

image.png
Add Google Maps URL to the URL input of an Active X Invoke Node 

And finally, place a Close Reference node by going Connectivity >> ActiveX >> Close Reference from the Block Diagram.

image.png

Additionally, you can place a while loop before closing the reference so that Google Maps will be able to update continuously.
 

At the end, you should have a block diagram, similar to the following screenshot:

image.png
 

Attachments