Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Sep 3, 2013
1 parent 1fa80ac commit 4d8995d
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ It embeds Leaflet in version *0.6.4*.
:target: https://coveralls.io/r/makinacorpus/django-leaflet


Main purposes of having a python package for the Leaflet Javascript library :

* Install and enjoy ;
* Do not embed Leaflet assets in every Django project ;
* Enjoy geometry edition with Leaflet form widget ( *Django* >= 1.6 ) ;
* Control apparence and settings of maps from Django settings (e.g. at deployment) ;
* Reuse Leaflet map initialization code (e.g. local projections) ;


=======
INSTALL
=======
Expand Down Expand Up @@ -43,7 +52,7 @@ USAGE
...
</body>

* Your maps shows up!
* Your map shows up!


Use Leaflet API
Expand All @@ -57,6 +66,8 @@ grab a reference on the just initialized map and options.

Simple brutish way :

::

<script type="text/javascript">
function map_init_basic (map, options) {
...
Expand Down Expand Up @@ -99,6 +110,8 @@ Add it in ``<head>`` this way ::
Customize map size
------------------

CSS is your friend:

::

<style>
Expand Down Expand Up @@ -126,6 +139,8 @@ settings::
# conf here
}

And add some of the following entries.


Spatial extent
--------------
Expand Down Expand Up @@ -244,7 +259,7 @@ To include all plugins configured in ``LEAFLET_CONFIG['PLUGINS']``, use::
Forms
=====

With Django>=1.6, a Leaflet widget is provided to edit geometry fields.
With *Django* >= 1.6, a Leaflet widget is provided to edit geometry fields.
In previous versions, it falls back to simple text areas.

It embeds *Leaflet.draw* in version *0.2.1dev*.
Expand Down Expand Up @@ -308,7 +323,9 @@ everywhere: ::

LEAFLET_CONFIG = {
'PLUGINS': {
'auto-include': True
'forms': {
'auto-include': True
}
}
}

Expand Down

0 comments on commit 4d8995d

Please sign in to comment.