Skip to content

A module for django-leaflet-storage and Leaflet.Storage which adds support for adding images to Markers

License

Notifications You must be signed in to change notification settings

arbu/leaflet-storage-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaflet-storage-images

A module for django-leaflet-storage and Leaflet.Storage (a.k.a. uMap) which adds support for adding images to Markers. If the image contains GPS-informations, the Marker position can be updated.

Installation

git clone https://github.com/arbu/leaflet-storage-images
cd leaflet-storage-images
python setup.py install

Add storage_images to you apps:

INSTALLED_APPS = (
    ...
    "storage_images",
)

Include storage_images urls:

(r'', include('storage_images.urls')),

Add Leaflet.Storage.Images scripts to your base.html:

<script src="{{ STATIC_URL }}images/js/leaflet.storage.images.js"></script>
{% if locale %}
<script src="{{ STATIC_URL }}images/locale/{{ locale }}.js"></script>
{% endif %}

Depending on your setup you may need to run:

python manage.py collectstatic

Also make sure you have configured MEDIA_URL and MEDIA_PATH.

If you want to limit the maximum filesize to upload, I recommend to configure the webserver (apache, nginx etc.) accordingly.

Dependencies

The only dependency is pillow, while django-leaflet-storage or uMap is recommended

Basic usage

When adding a new or editing an existing Marker, you can choose an image to upload under "Add image". The image is automatically uploaded. If the image contains GPS-informations, you are asked if you want to update the Marker.

About

A module for django-leaflet-storage and Leaflet.Storage which adds support for adding images to Markers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published