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
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to