<div>My problems begin before to show selection. $mgSelection is not initialized!</div>
<div><br> </div>
<div><span class="gmail_quote">2007/7/13, Scott Hameister <<a href="mailto:scotth@mpower-tech.com">scotth@mpower-tech.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d">The map needs to be saved and refreshed before a selection can show</span></p>
<p><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org
</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Jorge Rubio<br><b>
Sent:</b> Friday, July 13, 2007 9:35 AM<br><b>To:</b> MapGuide Users Mail List<br><b>Subject:</b> [mapguide-users] Problems with xmlSelection</span></p></div>
<div><span class="e" id="q_113c01f169b7679c_1">
<p> </p>
<div>
<p>Hi list</p></div>
<div>
<p> </p></div>
<div>
<p>I need to pass an xmlSlection to a php class in order to be used by a member function</p></div>
<div>
<p> </p></div>
<div>
<p>Using javascript I get xmlSelection</p></div>
<div>
<p> </p></div>
<div>
<p>var xmlSel = parent.parent.mapFrame.GetSelectionXML();<br> </p></div>
<div>
<p>I post the selection like this</p></div>
<div>
<p> </p></div>
<div>
<p>someParams + "&SELECTION=" + encodeURIComponent(xmlSel);<br><br clear="all">I get the params at php class file like this</p></div>
<div>
<p> </p></div>
<div>
<p>$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> </p></div>
<div>
<p>so $mapSelection is an XML string.</p></div>
<div>
<p> </p></div>
<div>
<p>Then, I need to get that selection</p></div>
<div>
<p> </p></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);</p>
<p>None selection is created!!</p>
<p>What I'm doing wrong?</p>
<p>Thanks in advance.</p></div>
<div>
<p><br>-- <br>Lic. Jorge Rubio </p></div></span></div></div></div><br>_______________________________________________<br>mapguide-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mapguide-users@lists.osgeo.org">
mapguide-users@lists.osgeo.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users
</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Lic. Jorge Rubio