Simple Geodjango application to display spatial data with Openlayers. Layers are stored in spatial database (postgis) and rendered to kml files with django. Kml files are displayed on the map with js openlayers.
Related links: Geodjango, Openlayers 3, Openlayers layer switcher, Postgis.
In settings.py setup your postgres database and run:
python manage.py syncdb
Create tables with spatial data in database:
python manage.py makemigrations geoportal
python manage.py sqlmigrate geoportal 0001
python manage.py migrate
Add shapefiles to database.
To use different shapefiles, modify models.py first. To change layers styles and add controls, edit /static/main.js.
To run application type:
python manage.py runserver
####Default view: