Long-running GIS web application: ideas needed

Tags: gis, django, python

I’m working on a Django web application that displays a map and lots of GIS data from various sources. A pretty elaborate mapping application, so two things are a priority:

  • Interaction must be fast.

  • The map’s current viewpoint should stay mostly intact. So: if you’re zoomed in to an area, you should stay zoomed in on that area next time.

The current solution is to build up almost the entire page with a javascript library (Isomorphic’s SmartClient) in an iframe. So sidebar with tree-like navigation, main content area, bar at the top: all handled by SmartClient. In the main content area, OpenLayers shows the map. If there’s other content to be shown, an iframe with the other content (mostly html) is shown over the map. So the actual map stays loaded with the current location, zoom level and everything intact.

I have several problems with this solution:

  • Reloading a page takes a long time. Reloading is not what’s supposed to be happening, but anyway: initial load takes 30 seconds. I suspect SmartClient instead of the map, but I can’t do a real comparison test yet.

  • The UI is handled by SmartClient, so poof goes most of Django’s default template handling. I’d much prefer to use Django’s template system to build up my UI instead of some javascript library.

  • All the usual iframe drawbacks like non-bookmarkable URLs.

My questions in search of ideas/feedback:

  • Is there a recommended way to keep track of a bunch of map settings? Zoom level, center, enabled layers? In a Django and OpenLayers environment? Continuously sending the data via ajax back to the server and storing it in the user’s settings or whatever?

  • Is there an alternative to keep a map alive between requests? Perhaps some dirty hack with a separate window?

  • Should I be afraid of re-loading maps or is that normally not a problem?

  • I’m wondering about ajaxifying most of the django interface: replacing divs (or hiding existing divs) and injecting the main content from another django page into it. Is that practical?

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):