<div>Hi list</div>
<div> </div>
<div>I need to pass an xmlSlection to a php class in order to be used by a member function</div>
<div> </div>
<div>Using javascript I get xmlSelection</div>
<div> </div>
<div>var xmlSel = parent.parent.mapFrame.GetSelectionXML();<br> </div>
<div>I post the selection like this</div>
<div> </div>
<div>someParams + "&SELECTION=" + encodeURIComponent(xmlSel);<br><br clear="all">I get the params at php class file like this</div>
<div> </div>
<div>$mgSessionId = ($_SERVER['REQUEST_METHOD'] == "POST")? $_POST['SESSION']: $_GET['SESSION'];<br>$mapName = ($_SERVER['REQUEST_METHOD'] == "POST")? $_POST['MAPNAME']: $_GET['MAPNAME'];
<br>$mapSelection = rawurldecode(($_SERVER['REQUEST_METHOD'] == "POST")? $_POST['SELECTION']: $_GET['SELECTION']);<br> </div>
<div>so $mapSelection is an XML string.</div>
<div> </div>
<div>Then, I need to get that selection</div>
<div> </div>
<div>
<p>$featureService = $this->site->CreateService(MgServiceType::FeatureService);<br>$resourceService = $this->site->CreateService(MgServiceType::ResourceService);</p>
<p>$map = new MgMap();<br>$map->Open($resourceService, $mapName);<br>$mgSelection = new MgSelection($map,$mapSelection);<br></p>
<p>None selection is created!!</p>
<p>What I'm doing wrong?</p>
<p>Thanks in advance.</p></div>
<div><br>-- <br>Lic. Jorge Rubio </div>