[mapguide-users] Problems with xmlSelection
Scott Hameister
scotth at mpower-tech.com
Fri Jul 13 11:07:33 EDT 2007
The map needs to be saved and refreshed before a selection can show
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jorge Rubio
Sent: Friday, July 13, 2007 9:35 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] Problems with xmlSelection
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/9a890815/attachment.html
More information about the mapguide-users
mailing list