CartoWeb implements an AJAX layer, enabling asynchronous update of the HTML GUI.
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
(orclient.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).
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
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