Skip to main content

Create beautiful JavaScript maps with one line of Python

Project description

Create beautiful JavaScript maps with one line of Python. No more fighting with mapping libraries!

See it in action

For charts, check out

Build Status



pip install mapkick

Mapkick uses Mapbox GL JS v1. To use tiles from Mapbox, create a Mapbox account to get an access token and set MAPBOX_ACCESS_TOKEN in your environment.

Then follow the instructions for your web framework:



    # ...

Load the JavaScript

{% load static %}

<script src="{% static 'mapkick.bundle.js' %}"></script>

Create a map in a view

from mapkick.django import Map

def index(request):
    map = Map([{'latitude': 37.7829, 'longitude': -122.4190}])
    return render(request, 'home/index.html', {'map': map})

And add it to the template

{{ map }}


Point map

Map([{'latitude': 37.7829, 'longitude': -122.4190}])

Area map (experimental)

AreaMap([{'geometry': {'type': 'Polygon', 'coordinates': ...}}])


Data can be a list

Map([{'latitude': 37.7829, 'longitude': -122.4190}])

Or a URL that returns JSON (same format as above)


Point Map

Use latitude or lat for latitude and longitude, lon, or lng for longitude

You can specify a label, tooltip, and color for each data point

  'latitude': ...,
  'longitude': ...,
  'label': 'Hot Chicken Takeover',
  'tooltip': '5 stars',
  'color': '#f84d4d'

Area Map

Use geometry with a GeoJSON Polygon or MultiPolygon

You can specify a label, tooltip, and color for each data point

  'geometry': {'type': 'Polygon', 'coordinates': ...},
  'label': 'Hot Chicken Takeover',
  'tooltip': '5 stars',
  'color': '#0090ff'


Width and height

Map(data, width='800px', height='500px')

Marker color

Map(data, markers={'color': '#f84d4d'})

Show tooltips on click instead of hover

Map(data, tooltips={'hover': False})

Allow HTML in tooltips (must sanitize manually)

Map(data, tooltips={'html': True})

Map style

Map(data, style='mapbox://styles/mapbox/outdoors-v12')

Zoom and controls

Map(data, zoom=15, controls=True)

Refresh data from a remote source every n seconds

Map(url, refresh=60)


View the changelog


Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone
pip install -r requirements.txt

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mapkick-0.1.2-py2.py3-none-any.whl (218.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page