Skip to content

leonardo-modules/leonardo-geo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leonardo Geo Widgets

Leonardo widgets related with Geo such as Google Map Widget or photo gallery with Geolocation etc..

pip install -e git+https://github.com/leonardo-modules/leonardo-geo.git#egg=leonardo_geo

or as leonardo bundle

pip install django-leonardo["geo"]

Load new template to db

python manage.py sync_all -f

Google maps styles (example):

You can insert JSON format of Google maps styles to LIVE SETTINGS.

or

Leaflet maps styles:

Available styles: https://www.mapbox.com/api-documentation/#styles

Or you can create your own: https://www.mapbox.com/help/create-a-custom-style/

For advance widgets and features this module use GeoDjango is used so a spatial database is required. We recommend PostGIS. Django's docs include some installation instructions although it is renowned for being tricky.

Spatialite is another option although it can be tricky to set up. On Ubuntu, you can do the following:

$ sudo apt-get install spatialite-bin libspatialite3 libgeos++-dev libgdal-dev libproj0

The pysqlite python package is also required although it doesn't support C extensions by default. To work-around this, there are two options:

  1. Download the package, edit setup.cfg to enable C extensions and install:
$ pip install pysqlite --no-install
$ vim $VIRTUAL_ENV/build/pysqlite/setup.cfg
$ pip install pysqlite
  1. Use a custom branch:
$ pip install git+git://github.com/tinio/pysqlite.git@extension-enabled#egg=pysqlite