GetSelectionXML() how to read <Class id='Default:xxx'> in PHP.

Maciej Skorczewski maciej.skorczewski at procad.pl
Thu Nov 30 14:11:44 EST 2006


hi good people!



i work on 2 layer, all are selectable and visible on map, all object on 
any of this 2 layer have a data (name,id, etc).

when user click on object it is selected , so i can get xml of this 
selection...so i get it.

First selected  object on  layer "test" ganerate this XML

<?xml version="1.0" encoding="UTF-8"?>
<FeatureSet>
<Layer id="376274-234-234-234-23-4234">
<Class id="Default:test">
<ID>BQAAAA==</ID>
</Layer>
</FeatureSet>



First selected  object on  layer "test2" ganerate this XML

<?xml version="1.0" encoding="UTF-8"?>
<FeatureSet>
<Layer id="376274-234-234-234-23-4234">
<Class id="Default:test2">
<ID>BQAAAA==</ID>
</Layer>
</FeatureSet>


question is how can i get form this 2 xml , name of cliked layer
<Class id="Default:test"> --> layer: test

..i second
<Class id="Default:test2"> --> layer: test2

if  have name of layer i can read (id,name , etc.)of selected 
object.that is what i want.

is there any MG API solution? or i must use ex. SimpleXML to work whit 
this xml.

...the best way mayby in future

$layer_name=$object->GetLayerName($xml_of_selected_object);


-- 
Maciej





More information about the Mapguide-users mailing list