[mapguide-users] pop up window in Ajax viewer

Maciej Skorczewski maciej.skorczewski at procad.pl
Mon Feb 16 15:22:19 EST 2009


  hi!


try to use this javascript code:

FAQ

1. whit this code you can get xml of selected parcels,point etc + 
map_name + session numer....this data help you to call MG API and get 
all information about selected object. enjoy.




----code----


function show_file()
{
  params = new Array("xml",parent.ViewerFrame.mapFrame.GetSelectionXML() 
,"SESSION",parent.ViewerFrame.mapFrame.GetSessionId(), 
"MAPNAME",encodeURIComponent(parent.ViewerFrame.mapFrame.GetMapName()));

     parent.ViewerFrame.formFrame.Submit("../my_map_folder/popup.php", 
params, "scriptFrame");
     originalOnSelectionChanged();

}




function watchInitialized ()
{
  try {
   	if(ViewerFrame.mapFrame.mapInit)
    		 {
   		    clearInterval(initTimer);
    	        originalOnSelectionChanged = ViewerFrame.OnSelectionChanged;
             ViewerFrame.OnSelectionChanged = show_file;
	     }
      }
  catch(Exception) {}
}


------ end code -----


macieksk


More information about the mapguide-users mailing list