Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Python module to allow for easy creation of a google maps HTML file.

Subscribe to updates I use simplemap

Statistics on simplemap

Number of watchers on Github 113
Number of open issues 2
Average time to close an issue 6 days
Main language Python
Average time to merge a PR about 1 month
Open pull requests 2+
Closed pull requests 2+
Last commit about 3 years ago
Repo Created over 4 years ago
Repo Last Updated about 2 years ago
Size 17 KB
Organization / Authorpatrick--
Page Updated
Do you use simplemap? Leave a review!
View open issues (2)
View simplemap activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating simplemap for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)




This Python library allows you to plot GPS coordinates on a standalone google map contained in an HTML file. Functionality is focused around mapping of points, so other google maps API features will not be implemented (i.e. directions, reverse geocoding, etc).

My plans for features to be implemented in the mediate future are:

  • Google map interface event callbacks
  • Custom marker labels
  • Custom marker text
  • Customer marker images



Installation is very straightforward. Simply clone the repository and install the necessary requirements

git clone https://github.com/patrick--/simplemap/
cd simplemap
pip install -r requirements.txt



Before using this library you will need to obtain a Google Maps Javascript API key. The following link has instructions on getting a key

Once you get a key, make sure to put it in the config.json file. Any problems with API authentication will result in an error popup in your output.html file.

API Error Example



First, import the simplemap library

import simplemap

Next, initialize your map object: simplemap.Map().

  • title - The title of the HTML map webpage
  • center - list of lat/lon values for map center. Default value of None auto centers map - Optional
  • zoom - Zoom level of the map, defaults to 11 - Optional
  • markers - list of markers, where a marker is a list: optional hovertext, lat and lon - Optional
  • html_template - HTML template used to generate a map. Currently the default value of basic.html is the only option - Optional
  • config_file - JSON file containing the google maps api_key, defaults to config.json - Optional

Note: By default the map will automatically center and zoom based on points given. For a custom center point, make sure to give center a lat/lon value.

Finally, write the map to an HTML file: Map.write()

  • output_file_name - Filename that HTML will be written to


In this first example, notice that zoom and center were not given values. This allows the map to center and zoom itself based on the points provided.

import simplemap

map_title = 'Example Map'
gps_markers = [ ['Example text', 34.4563,-118.1241], [34.6432,-118.1554] ]

example_map = simplemap.Map(map_title, markers=gps_markers)

This example demonstrates that markers is a property of the Map() class - so it can be given a value after initialization.

import simplemap

example_map = simplemap.Map('Test Title', [34.5124, -118.1111])
example_map.markers = [ ['Example text', 34.4563,-118.1241], [34.6432,-118.1554] ]

Finally, this example demonstrates custom values given to both center and zoom.

import simplemap

map_title = 'Example Map'
center_point  = [34.5124, -118.1111]
zoom_level = 5
gps_markers = [ ['Example text', 34.4563,-118.1241], [34.6432,-118.1554] ]

example_map = simplemap.Map(map_title, center=center_point, zoom=zoom_level, markers=gps_markers)


simplemap open issues Ask a question     (View All Issues)
  • almost 4 years Is there a port of this to python3?
  • over 4 years Map file will be blank if an empty coordinate is passed as a marker
simplemap open pull requests (View All Pulls)
  • webbrowser.open(file_url)
  • Added line functionality between markers/waypoints on map.
simplemap list of languages used
Other projects in Python