< Locate Plugin

Geostatistics >

20. AJAX

20.1. Introduction

CartoWeb implements an AJAX layer, enabling asynchronous update of the HTML GUI.

20.1.1. Browser Compatibility

Browser compatibility:

  • Mozilla 1.7+
  • Firefox 1.0.7+
  • Internet Explorer 6+
  • Safari 1.3.2+

Known browser incompatibility:

  • Opera
  • Internet Explorer 5 for Mac
  • Konqueror

20.2. Make Your Project AJAX Enabled

To enable your project with AJAX, it is recommended that you build your project based on demoCW3 or test_main projects (CartoWeb version 3.3.0 or higher). A project based on demoCW3 won't need any tuning. A project based on test_main will require the following:

  • Enable AJAX in your client.ini (or client.ini.in):

If you have a project running since version 3.2.0 or before, and want to enable AJAX, you'll need to:

  • Enable AJAX in your client.ini (or client.ini.in)
  • Adapt your cartoclient.tpl, mainmap.tpl and all redefined plugin templates (if they are based on test_main or demoCW3 project templates from CartoWeb version <= 3.2.0).

20.2.1. Client.ini Configuration

Add the ajaxOn directive and set it to true in your /project/[yourProjectName]/client_conf/client.ini or /project/[yourProjectName]/client_conf/client.ini.in

ajaxOn = true

20.2.2. Templates Adaptation

Warning

Adapting your templates is a tricky bit. Unless you customized your templates thoroughly, we recommend that you start over again your templates customization using demoCW3 or test_main as a basis, as these projects templates are AJAX ready.

We recommend that you diff your cartoclient.tpl, mainmap.tpl and all redefined plugin templates with the upstream. This is the best way to be up to date, especially if you use the latest CVS version of CartoWeb.

Tip

Also, you can have a look at the templates patch: http://bugzilla.maptools.org/attachment.cgi?id=126&action=view

valid xhtml 1.0 valid css