query by rect

Eduardo Zenaide ezenaide at GMAIL.COM
Tue Jul 10 10:57:22 PDT 2007


hi list.

i'm using some javascript to do a query. it gets information from html combo
boxes.

##############################

       function determinaQSTRING() {
        //converting everything into variables:
        //host information:
        var hostPar = "http://localhost:82/zaal/al.php?";
        //keymap:
        var keymapPar = "KEYMAPXSIZE=100&KEYMAPYSIZE=75&";
        //fixed layers:
        var layerFixa = "Limite_Estadual_AL=Y&grid=Y&";
        //get layer used on query from combobox:
        var layer = document.pesquisa.layersList.value;

        var modePar = "&CMD=QUERY_POINT&INPUT_TYPE=submit&";

        //map image attributes:
        var imagePar = "imagewidth=760&imageheight=570";

        //get query string from combobox:
        var queryEntry = document.pesquisa.nameList.option;
        //get operator from combobox:
        var operador = document.pesquisa.operadores.value;

        //get coordinates from combobox:
        var allComboValue = document.pesquisa.nameList.value;
        var allComboValueArray = allComboValue.split(',');
        var minx = "minx=" + allComboValueArray['0'] + "&";
        var miny = "miny=" + allComboValueArray['1'] + "&";
        var maxx = "maxx=" + allComboValueArray['2'] + "&";
        var maxy = "maxy=" + allComboValueArray['3'] + "&";

        //query string:
        document.pesquisa.qstring.value = "(\"[NOME]\" "+ operador +" /"+
queryEntry +"/)";

        //reload map:
        window.opener.document.location = hostPar + keymapPar + layerFixa +
layer + "=Y&" + minx + miny + maxx + maxy + imagePar + modePar +
"INPUT_COORD=390%2C285%3B390%2C285";
    }

############################

ok, its very ugly, but i though it would work. my problem is in the type of
query.

        var modePar = "&CMD=QUERY_POINT&INPUT_TYPE=submit&";

it only does query by point, i'm trying to use query by rect.
already tried auto_rect but didn't work too.

what can i do?


thanks in advance :)


-- 
Eduardo Zenaide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070710/f3257655/attachment.htm>


More information about the MapServer-users mailing list