function open layer MyGis query

Daniel Lagos dlagos at FDCCONSULT.COM
Thu Mar 3 15:46:37 EST 2005


Hi list,

I've recently been trying to get php-mapscript version 4 .4.1 up and running.

When I try to query clicking on one layer with connection type MYGIS I cannot get any data back from the feature data base table because I get error in function: 

$layer->open();

The old version php-mapscript 4.0 working fine with the same code.

The MapServer 4.4.1 released (2004-12-22) say: Fixed MyGIS build error introduced when adding msLayerIsOpen() (bug 1116). Is there some relations between the error and  the bug fixing?.

The layer defined in map file and query code are given below. I would
be most grateful if anyone could offer any advise.

Thank's.

query code:
    
    $point = $this->createPoint($x,$y);
    @$q_object = $this->map->queryByPoint($point,MS_SINGLE,-1);
    $cur_layer = $this->map->getLayerByName($layerName);
    $res_layer = $cur_layer->getNumResults();
    
    if($res_layer)
    {
        $cur_layer->open(); <-------------------------------------------------------------------- The function error upgrade 4.0 to 4.4.1
        $cur_res = $cur_layer->getResult(0);
        $result = $cur_res->shapeindex;
        $cur_layer->close();
        return $result;
    }


Layer defined:

LAYER
    NAME "layer_10"
    TYPE POINT
    LABELMAXSCALE 100000
    STATUS OFF
    TOLERANCE 10
    CONNECTIONTYPE mygis
    CONNECTION "localhost:web:user_web:dbGis:bin:"
    DATA "geometry from G_Punto feature, G_Punto_bin geometry"

    TEMPLATE void
 
    CLASS
        NAME "class_1"  
        SYMBOL "symbol_5"
        TEXT ([nombre] - [sucursal])
        
        STYLE
            OUTLINECOLOR 0 0 0
            COLOR 0 0 255
            SIZE 18
            MINSIZE 8
            MAXSIZE 20
        END
        
        LABEL
            OUTLINECOLOR 255 255 255
            COLOR 127 0 0
            SIZE MEDIUM
            POSITION AUTO
            PARTIALS FALSE
        END
    END
END

______________________________________
Daniel A. Lagos H.
Fernández y De Cea Ingenieros Ltda.
Av. Apoquindo 3650, Of. 902, Las Condes
Santiago, Chile
Tel:  +56 (2) 435 0099
Fax: +56 (2) 435 0258
www.fdcconsult.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050303/720c81a5/attachment.html


More information about the mapserver-users mailing list