[Cartoweb-dev] edit_sel works incorrectly - news

Igor Evdokimov igev at mail.ru
Fri Apr 6 01:35:03 EDT 2007

Hi, List!

I continue to detect an error in my project:

>I have one error while working with Edit plugin.
>I have 2 PostGIS layers in my map (point and line).
>I can create points and lines with attributes - all is fine, no problems.
>QUERY tool on these inserted objects - works well.
>But selection tool ('edit_sel') does not.

The news are:

I had commented some lines in <pluins/edit/client/ClientEdit.php>:

     public function getTools() {
         $editRoles = $this->getArrayFromIni('general.allowedRoles', true);
         $allowed = SecurityManager::getInstance()->hasRole($editRoles);

         $toolsArray = array();

         if (!$allowed) return $toolsArray;

         $layersInit = $this->cartoclient->getMapInfo()->layersInit;
         $layersCorePlugin = $this->cartoclient->getPluginManager()->getPlugin('layers');

         // if (isset($this->editState->layer) && // COMMENTED BY ME
         //    !$layersCorePlugin->isLayerVisibleAtCurrentScale($this->editState->layer)) // COMMENTED BY ME
         //    return $toolsArray; // COMMENTED BY ME


And EDIT_SEL now Works in <myProject>!
It works also if I change to MINSCALE=0 in editable layer.

Then I set MINSCALE=10000 of EDITPOINT layer in <demoEdit> project
and now in <demoEdit> project 'edit_sel' function does not work TOO (scale on screen = 1:62992)!!!
You can test it by yourself.
So I think the problem is in calculating <currentScale> variable in Edition plugin.

Best regards, Igor.

More information about the Cartoweb-dev mailing list