[Cartoweb-users] Geostat update menu without updating map

Albert Casanovas casanovas at k2sistemas.com.br
Tue Jun 24 11:32:18 EDT 2008

Hi Oliver,

Yes I´m triggering the UpdateMenu in this select:

<select name="geostatChoroplethLayer" 
    onchange="javascript:CartoWeb.trigger('Geostat.UpdateMenu', 'doSubmit()');">
<option value="def">{t}Select geographic entities...{/t}</option>
{html_options values=$geostatChoroplethLayersId 
output=$geostatChoroplethLayersDesc selected=$geostatChoroplethLayerSelected }

The thing is that when a value is chosen and the UpdateMenu submited, I can see through the log file that it executes the methods handlePreDrawing and drawChoropleth which is supposed not to do, am I right?


  ----- Original Message ----- 
  From: Oliver Christen 
  To: Albert Casanovas ; cartoweb-users at lists.maptools.org 
  Sent: Tuesday, June 24, 2008 3:06 AM
  Subject: Re: [Cartoweb-users] Geostat update menu without updating map

  if the map is updated it means the image plugin is triggered.
  be sure you are triggering the UpdateMenu action and not  UpdateMap or UpdateAll as these actions will trigger the image plugin and the map will be refreshed.
  this is handled in ajaxHandleAction in ClientGeostats.php

  you can know which plugin is answering your action by looking at the content of the JSTraceDebugger windows content, for example:
  Plugins that gave response: location layers images query tables layerReorder bboxHistory cartoMessages 

    ----- Original Message ----- 
    From: Albert Casanovas 
    To: cartoweb-users at lists.maptools.org 
    Sent: Monday, June 23, 2008 9:22 PM
    Subject: [Cartoweb-users] Geostat update menu without updating map


    I am working with the cloropleth plugin, I have not worked a lot with AJAX. At the moment I need to update the interface SELECTS as a cascade without updating the map until the last SELECT is chosen. Looking at the following Geostat.ajax.js file seems that updating the menu updates the Map also.

    AjaxPlugins.Geostat.Actions = {};

    AjaxPlugins.Geostat.Actions.UpdateMenu =
    AjaxPlugins.Geostat.Actions.UpdateMap =
    AjaxPlugins.Geostat.Actions.UpdateAll = {
        buildPostRequest: function(argObject) {
            return AjaxHandler.buildPostRequest();
        onBeforeAjaxCall: function(argObject) {
        onAfterAjaxCall: function(argObject) {

    I have done several modifications but the error stays. Could you please give me an advise or suggestion about how show it look like if I do want to UpdateMap only with the UpdateAll option?

    Best Regards,
    Albert Casanovas


    Cartoweb-users mailing list
    Cartoweb-users at lists.maptools.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080624/58a54a6b/attachment-0001.html

More information about the Cartoweb-users mailing list