[OpenLayers-Users] map scope problem

S.Reena reena at indiamail.com
Wed Oct 22 01:52:04 EDT 2008


I have used AJAX to load a php file "showmap.php" which makes a database
table based on selections . I have used that table to create a layer in
init() function itself which makes the map and rendered it false there using
wms[8].setVisibility(false). I want that  in openmap() function I just make
that layer visible...but all the functions called after that php file is
executed takes map ,vector,wms etc as undefined. How to deal with this?

 function showmap(queryString)
        {

          var xmlHTTP;
          xmlHTTP=GetXmlHttpObject();

          if (xmlHTTP==null)
          {
              alert ("Your browser does not support AJAX!");
              return;
          }
          xmlHTTP.onreadystatechange=function()
          {
             if((xmlHTTP.readyState==4) || (xmlHTTP.readyState=="complete"))
             {
                var res=xmlHTTP.responseText;
                if(res==0)
                {
                        openmap();
                }
             }
          }
         // alert(queryString);
          xmlHTTP.open("GET", "showmap.php"+queryString, true);
          xmlHTTP.send(null);

        }

-- 
View this message in context: http://www.nabble.com/map-scope-problem-tp20104382p20104382.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list