[Cartoweb-users] edit and search plugin in the same project

Oliver Christen oliver.christen at camptocamp.com
Wed Feb 20 04:11:16 EST 2008


Hi

the easiest would be to deactivate the ajax query (triggered by the search 
plugin) when any edition tool is selected.

function initializeCountry() {

    if (selected_tool.indexOf('edit') < 0){
        search('countries');
    }
}
in Search.ajax.js

and add : var selected_tool = '{$selected_tool}'; in the toolbar.tpl <script 
.. > header or add a new <script .. >var selected_tool = 
'{$selected_tool}';</script> in your cartoclient.tpl

this is only a workaround, the problem is mainly that the edit plugin is 
quite old and was never intended to be used with a project with ajax enabled

regards
Oliver

> hi list
>
> i have a problem with the edit and search plugins in the same project 
> under cartoweb340. i started on the demoCW3 project and added the edit 
> plugin.
> at the moment i select a polygon/line/point feature to edit the geometry 
> (in the edit plugin), the shape is just selected for a little moment and i 
> can't modify the geometry. when i disable the search plugin, the selection 
> works fine and i can edit/move the points of the geometry. it seems to me 
> that the Search.DoIt call of the search plugin makes the correct selection 
> of the geometry shape impossible.
>
> is there a possibility to do the shape selection after the search plugin 
> calls? are there any known workarounds?
>
> thanks for help
>
> christoph
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list