[mapguide-users] GetSelectionXML() how to read <Class id='Default:xxx'> in PHP.

Maciej Skorczewski maciej.skorczewski at procad.pl
Fri Dec 1 09:44:34 EST 2006


hi Alain !

i have one guestion - when i create new layer on my map (ParcelMarker).

ex. add a marker of BUS. and i click on it(market is selectable) i get 
this message.
------
Fatal error: Uncaught exception 'mginvalidpropertytypeexception' in 
Unknown on line 0
------

this is strange, on static layer i have no problem whit this.

what is wrong?

Maciej Skorczewski
PROCAD SA - Autodesk Systems Center
www.procad.pl


> Hi Maciej,
> 
> Have you looked at the MgSelection class? It can parse the XML text
> representing the selection and give you the list of layers that are part
> of this selection.
> 
> The following code output the name of the selected layers
> 
>   $sel = new MgSelection($map, $xmlSelText);
>   $layers = $sel->GetLayers();
>   for($i = 0; $i < $layers->GetCount(); $i++)
>   {
>      $layer = $layers->GetItem($i);
>      echo $layer->GetName() . "\n";
>   }
>  
> 





More information about the Mapguide-users mailing list