AddPoints won't work

theresia freska frezzz_54 at YAHOO.COM
Thu Mar 1 05:12:32 PST 2007


hi list,
i have a function to add points dynamically. it works on the A data, but not on the B data. yet i have copied the same code. this function works as user selects the nquery mode.

if (($_POST['mode']) == "nquery") {
   do_the_function;
}

the strange thing is that when i eliminate the if condition, it works just fine. i don't know where i did the wrong code. can someone point that out for me? i use mapserver 4.8.3. i use this code to debug. thanks in advance.

if ($_POST['mode'] == "nquery") {
        /*$inputLayer = $_POST['slcQlayer'];
        $radius = abs($_POST['radius']);
        
        if (!(in_array($inputLayer, $tesLayer))) {
            echo "<script language='Javascript'>alert('Layer $inputLayer tidak aktif. Query tidak akan dilanjutkan.')</script>";
        } else {
            $nearby = nearbyResto($qpoint, $map, $radius, $inputLayer);
            $arrRes = getInfo($inputLayer, $nearby);
            $result_table = tabelResto($arrRes);*/
            
            $conn = pg_connect("dbname=$database user=$user password=$password host=$host");
            $m=0;
            $res_layer = pg_query("select gid from point where kategori='Pasar'");
            while($row_layer = pg_fetch_row($res_layer)) {
                $arr_layer[$m] = $row_layer;
                $m++;
            }
                    
            for ($i=0;$i<count($arr_layer);$i++) {
                $baris = $arr_layer[$i];
                $res = pg_query("select kategori, x(the_geom), y(the_geom) from point where gid=$baris[0]");
                $row = pg_fetch_row($res);
                $arr[$i] = $row;
            }

            AddPoints($map, $arr);
            
    }

 
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070301/12faefd3/attachment.htm>


More information about the MapServer-users mailing list