Plotting GPS locations in Google Maps from NMEA based GPS Module

Python is a simple language to learn. We may get the GPS locations from GPS modules in the form of NMEA data stream. Using python library the location can be plotted on a Google map and viewed in web browser.

0218210 (1)


The program is tested in Linux and Windows OS.

For running the demo code described in the post user has to install python libraries such as pyserial and pygmaps from here.

Note: You need net connection for viewing the location in a browser.

The source code can be downloaded from our GITHUB repository.

After installing the required python libraries, user may connect the GPS to your laptop through USB2Serial converter. Assuming the COM port is at “/dev/ttyUSB0” run the code.

Note: Windows users have to change the /dev/ttyUSB0 to COM1, COM2 etc. Please check your Device Manager for the corresponding entry.

In your command prompt run the command as follows


On successful running of the code a file named mymap.html will be written in the same directory as of the code. Open the HTML file in a browser and wait for Google_maps loaded in it. The location is also plotted in the map. User needs Internet connection for viewing the map.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s