From your notation, I guess that you use PHP.
The ID is Base64 encoded, but it is not a string, it is an integer.
To decode it properly, you must get the bytes (not the string), and
"transform" it into a 32bit integer.
It is encoded in little endian.
If you search the archives, there was a complete explanation earlier,
with PHP code.
Regards, Kenneth, GEOGRAF A/S
Jim O'Leary skrev:
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
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users