Search code examples
openlayersgeodjango

PostGIS+Geodjango+OpenLayer


I want create programm with map viewing. I use http://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/. I upload data from .shp file to database now i want to display my gis data. For that i decide to use OpenLayer. Can i do that without WMS server just using Geodjango?


Solution

  • Why do you want to use GeoDjango at all? Will it help your requirements.

    If you have the data in PostGIS then you can write a simple program to get the data from the database and return it as GeoJSON for OpenLayers to consume. The advantage is that you can control what is happening if that's what your requirements need.

    Otherwise, yes, you'll need some kind of WMS to do that job for you.