[mapguide-users] OnSelection Event?

Willem Schwarte willem at giskit.nl
Fri May 5 03:21:37 EDT 2006


Ok, I came across a short sample in one of the documentations and
created this very simple page:

 

<?

// testing the getXMLSelection...

// testframe

// ViewerFrame (map contents)

?>

 

<html>

<head>

</head>

 

<script>

 

function doXml()

{

            xmlSel = parent.ViewerFrame.mapFrame.GetSelectionXML();

            params = new Array("test","1", "SEL", xmlSel);

 
parent.ViewerFrame.formFrame.Submit("http://localhost/sites/viewer/mytes
t.php", params, "taskPaneFrame"); 

}

 

</script>

 

<body>

<?

if($_POST['test']==1)

{

            echo $_POST['SEL'];

}else

{

 

?>

<a href="#" onClick="doXml();">Show it!</a>

<?

}

?>

</body>

</html>

 

 

First I will select an object on the map, next I will click the  'Show
it!' link...

 

In the taskpaneframe the mytest.php file is loaded. If I look at the
source there is a piece of XML:

 

<?xml version="1.0" encoding="UTF-8"?>

<FeatureSet>

<Layer id="8fa14c82-ffff-ffff-8000-0014a40277a1">

<Class id="Default:lki_v">

<ID>rBAAAA==</ID>

</Class>

</Layer>

</FeatureSet>

 

 

How can I use this to get the properties from this object on the map?

 

Is still need this mytest page to be executed automatically on selection
of the object..

 

 

Thanks

 

 

 

 

 

 

 

________________________________

Van: Willem Schwarte [mailto:willem at giskit.nl] 
Verzonden: vrijdag 5 mei 2006 7:33
Aan: users at mapguide.osgeo.org
Onderwerp: [mapguide-users] OnSelection Event?

 

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060505/785b3f50/attachment.html


More information about the Mapguide-users mailing list