CartoWeb 3.5.0
Download Now!


CartoWeb
Advanced Geographical Information System for the Web

This page details some changes that occured between versions 3.0.0 and 3.1.0 and gives instructions on how to update your projects if necessary.

DHTML Update

Please visit the dedicated DhtmlUpdate page.

New Toolbar Rendering

If you changed something in carto.js:

  • FormItemSelected() is changed: call doSubmit() function (shows the loading bar)

  • setActiveButton() is deprecated

  • setActiveToolButton() is added,

  • checkRadio() is changed: now using the DOM element id

If you customized your toolbar.tpl, add the following code (see upstream file), otherwise the toolbar won't be selected on load:

{strip}
{foreach from=$tools item=tool name=tool}
  {if $smarty.foreach.tool.first}cw3_tools = new Array("{$tool->id}",
  {elseif $smarty.foreach.tool.last}"{$tool->id}");
  {else}"{$tool->id}",
  {/if}
{/foreach}
{/strip}
cw3_initial_selected_tool = "mainmap.{$selected_tool}('map');";
{if $toolbar_rendering != 'radio'}
cw3_initial_selected_tool += "setActiveToolButton('{$selected_tool}');";
{/if}

PHP Files are No More Allowed in Plugins htdocs/ Directories

The PluginManager::getCurrentPlugin() method no more exists. And PHP files in plugins htdocs/ should not be used anymore, because they duplicate the exception and security mechanisms of Cartoclient. The new way of doing this is to use the normal CartoWeb flow of operations inside plugins with:

$formRenderer = $this->getCartoclient()->getFormRenderer();
$formRenderer->setCustomForm(false);
$this->getCartoclient()->setInterruptFlow(true);
print $this->drawSearchFrame();

Method parseArray() Moved to Utils

Method parseArray() was moved from class ConfigParser to class Utils (same file common/Utils.php). Upstream code was updated but some outdated parseArray() calls may remain in various projects.

Class Serializable Renamed to CwSerializable

The Serializable name is now reserved since PHP 5.0.4, so the class name had to be changed. You may have to search and replace the filename in some include() (use CwSerializable.php instead of Serializable.php) and the class name as well.

Renamed CARTO{CLIENT,COMMON,SERVER}_HOME Constants

This change is backward compatible. Use CARTOWEB_HOME instead of CARTO{CLIENT,COMMON,SERVER}_HOME.

CartoWeb Wiki: Migration300To310 (last edited 2020-09-22 08:17:09 by AlexSaunier)

© 2002-2007 CartoWeb by Camptocamp SA - Wiki powered by MoinMoin