Skip to content

Commit 9cc8cf9

Browse files
committed
Initial version
0 parents  commit 9cc8cf9

20 files changed

+6323
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pyc

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include README.rst
2+
recursive-include leaflet/static *.js
3+
recursive-include leaflet/static *.css
4+
recursive-include leaflet/static *.png

README.rst

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
*django-leaflet* allows you to use `Leaflet <leaflet.cloudmade.com>`_ (*version 0.3*)
2+
in your `Django <https://www.djangoproject.com>`_ projects.
3+
4+
5+
=======
6+
INSTALL
7+
=======
8+
9+
::
10+
11+
pip install django-leaflet
12+
13+
=====
14+
USAGE
15+
=====
16+
17+
* Add ``leaflet`` to your ``INSTALLED_APPS``
18+
19+
* Add the HTML header :
20+
21+
::
22+
23+
{% load leaflet_tags %}
24+
25+
<head>
26+
...
27+
{% leaflet_js %}
28+
{% leaflet_css %}
29+
</head>
30+
31+
32+
* Add the map in your page :
33+
34+
::
35+
36+
...
37+
<body>
38+
...
39+
{% leaflet_map "yourmap" %}
40+
...
41+
</body>
42+
43+
* Use the *Leaflet* API as usual on the resulting ``yourmap`` object :
44+
45+
::
46+
47+
<script type="text/javascript">
48+
...
49+
// Add background layer from MapBox
50+
yourmap.addLayer(new L.TileLayer('http://{s}.tiles.mapbox.com/v3/mapbox.mapbox-light/{z}/{x}/{y}.png'));
51+
...
52+
</script>
53+
54+
* Give your maps a size (**mandatory**) :
55+
56+
::
57+
58+
<style>
59+
60+
.leaflet-container {
61+
width: 600px;
62+
height: 400px;
63+
}
64+
65+
#specialbigmap {
66+
height: 800px;
67+
}
68+
69+
</style>
70+
71+
=======
72+
AUTHORS
73+
=======
74+
75+
* Mathieu Leplatre <[email protected]>
76+
77+
|makinacom|_
78+
79+
.. |makinacom| image:: http://depot.makina-corpus.org/public/logo.gif
80+
.. _makinacom: http://www.makina-corpus.com
81+
82+
=======
83+
LICENSE
84+
=======
85+
86+
* Lesser GNU Public License
87+
* Leaflet Copyright - 2010-2011 CloudMade, Vladimir Agafonkin
88+

leaflet/__init__.py

Whitespace-only changes.

leaflet/models.py

Whitespace-only changes.

leaflet/static/images/layers.png

3.85 KB
Loading
1.61 KB
Loading

leaflet/static/images/marker.png

2.46 KB
Loading

leaflet/static/images/popup-close.png

1.1 KB
Loading

leaflet/static/images/zoom-in.png

963 Bytes
Loading

leaflet/static/images/zoom-out.png

959 Bytes
Loading

0 commit comments

Comments
 (0)