Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > Django Plugins

    django-leaflet 0.5.0

    Download button

    No screenshots available
    Downloads: 136  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mathieu Leplatre | More programs
    GPL / FREE
    September 24th, 2012, 04:16 GMT [view history]
    ROOT / Internet / Django Plugins

     Read user reviews (0)  Refer to a friend  Subscribe

    django-leaflet description

    Use Leaflet in your Django projects

    django-leaflet is a Django app that allows you to use Leaflet (version 0.3) in your Django projects.

    INSTALL

    pip install django-leaflet

    USAGE

     Add leaflet to your INSTALLED_APPS
     Add the HTML header :

    {% load leaflet_tags %}

    < head >
     ...
     {% leaflet_js %}
     {% leaflet_css %}
    < /head >


     Add the map in your page :

    ...
    < body >
     ...
     {% leaflet_map "yourmap" %}
     ...
    < /body >


     Use the Leaflet API as usual on the resulting yourmap object :

    < script type="text/javascript" >
     ...
     // Add background layer from MapBox
     yourmap.addLayer(new L.TileLayer('http://{s}.tiles.mapbox.com/v3/mapbox.mapbox-light/{z}/{x}/{y}.png'));
     ...
    < /script >


     Give your maps a size (mandatory) :

    < style >

     .leaflet-container {
     width: 600px;
     height: 400px;
     }

     #specialbigmap {
     height: 800px;
     }

    < /style >



    Product's homepage

    Requirements:

    · Python
    · Django

    What's New in This Release: [ read full changelog ]

    · Add minimap support
    · Drop Leaflet version switching
    · Update Leaflet to 0.5.1

      


    TAGS:

    Django Leaflet | Django projects | Django | Leaflet | projects

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM