[mapguide-users] Get ID from base64 selectionXML
Jim O'Leary
jo at pat.ca
Sat Feb 16 19:13:30 EST 2008
Is there a way to get the ID of a feature that the user has selected on the
map directly from the selectionXML rather than create a selection object?
I have a toolbar invoke URL button with a key=value pair and the value is
$CurrentSelection. When the user clicks that button, it sends a URL-encoded
string to my server-side program, which, decoded, looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<FeatureSet>
<Layer id="88faff12-ffff-ffff-8001-005056c00001">
<Class id="SHP_Schema:Parcels">
<ID>RiQAAA==</ID>
</Class>
</Layer>
</FeatureSet>
Using simplexml, I can extract the value of the ID node in two lines:
$sxe=simplexml_load_string($selectionXML);
$id = (string)$sxe->Layer->Class->ID;
If $id (RiQAAA==) is really base64, I should be able to call
base64_decode($id);
to get the value of the id, but all I get is F$. What am I missing?
Thanks.
-----
Jim O’Leary
Technical
Consultant
Pacific Alliance
Technologies
2nd Floor, 24 East 4th Ave, Vancouver
BC, Canada
V5T1E8
TEL 604.676.6000 TOL 877.691.9171 FAX 604.682.0962
WEB http://www.pat.ca/ www.pat.ca
--
View this message in context: http://www.nabble.com/Get-ID-from-base64-selectionXML-tp15518904s16610p15518904.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list