[mapguide-users] Problems with xmlSelection
Jorge Rubio
j.e.rubio at gmail.com
Fri Jul 13 10:35:03 EDT 2007
Hi list
I need to pass an xmlSlection to a php class in order to be used by a member
function
Using javascript I get xmlSelection
var xmlSel = parent.parent.mapFrame.GetSelectionXML();
I post the selection like this
someParams + "&SELECTION=" + encodeURIComponent(xmlSel);
I get the params at php class file like this
$mgSessionId = ($_SERVER['REQUEST_METHOD'] == "POST")? $_POST['SESSION']:
$_GET['SESSION'];
$mapName = ($_SERVER['REQUEST_METHOD'] == "POST")? $_POST['MAPNAME']:
$_GET['MAPNAME'];
$mapSelection = rawurldecode(($_SERVER['REQUEST_METHOD'] == "POST")?
$_POST['SELECTION']: $_GET['SELECTION']);
so $mapSelection is an XML string.
Then, I need to get that selection
$featureService = $this->site->CreateService(MgServiceType::FeatureService);
$resourceService =
$this->site->CreateService(MgServiceType::ResourceService);
$map = new MgMap();
$map->Open($resourceService, $mapName);
$mgSelection = new MgSelection($map,$mapSelection);
None selection is created!!
What I'm doing wrong?
Thanks in advance.
--
Lic. Jorge Rubio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070713/576cbac9/attachment.html
More information about the mapguide-users
mailing list