[Mapguide_users] Re: OnSelection Event?

Jim O'Leary joleary.public at gmail.com
Sat Jan 6 17:09:41 EST 2007


Has anyone come up with a solution to the original question in this thread?
How do you extract property names and values from the XML string that you
get either from GetSelectionXML? 

Jason's clever code (May 4, 2006) captures the map's OnSelectionChanged
event. You can then get the selections on the client side using
GetSelectionXML(), which yields something like: 

<?xml version="1.0" encoding="UTF-8"?><FeatureSet
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer
id="ea15105a-ffff-ffff-8003-00a0d13b3329">  <Class id="MarkupSchema:Markup">  
<ID>AQAAAA==</ID>  </Class> </Layer></FeatureSet> 

I'm assuming that you put the keys and values in this string in a query
string and submit a form to the server to recreate this XML string. You
could also write this XML to a uniquely named file and then pass the
filename to the server. 

Assuming that you can recreate this XML string one way or the other on the
server, how do you then extract name = value pairs from the feature(s) that
you have selected? 

Thanks. 


Willem Schwarte wrote:
> 
> I've just read the dev manual and want to try to create a little test
> program, to get me started on understanding the flow of events etc.. 
> 
>  
> 
> What I want is:
> 
>  
> 
> When something gets selected, read a property and call an asp-page in
> another frame (in short).
> 
>  
> 
> But how can I tell if something is selected?
> 
> I suppose there is no onSelectionChanged event like in MG6.5. So this
> would be done on a onClick? Where would I put the code for this?
> 
>  
> 
> Willem
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/OnSelection-Event--tf1561860.html#a8199139
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the Mapguide_users mailing list