query by rect

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

query by rect

Eduardo Zenaide
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
Reply | Threaded
Open this post in threaded view
|

Re: query by rect

Eduardo Zenaide
ok, after trying a lot, it worked with auto_rect. don't know where the error was but it's working. i restarted apache and windows too.

thanks anyway.

2007/7/10, Eduardo Zenaide < [hidden email]>:
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 = "<a href="http://localhost:82/zaal/al.php?" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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



--
Eduardo Zenaide