[mapguide-users] Features Are Not Highlighted
Ivan Milicevic
Ivan.Milicevic at supranet.hr
Wed Feb 25 07:11:18 EST 2009
Hello,
You need to refresh mapFrame.
Look at this:
1. Put this in head of file
<script type="text/javascript">
function select(xml)
{
parent.mapFrame.SetSelectionXML(xml);
parent.mapFrame.ZoomSelection();
}
</script>
...and this at the end of file...
map.Save();
RegisterStartupScript("start", "<script>select('" + selectionXml +
"');</script>");
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of
ravinder.singh at BIRLASOFT.COM
Sent: Wednesday, February 25, 2009 12:57 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Features Are Not Highlighted
Hi,
I have written the following code to select/highlight the features on
the map.
MgMap map = new MgMap(myConnection);
map.Open("MyMap");
MgFeatureQueryOptions queryOptions = new
MgFeatureQueryOptions();
queryOptions.SetFilter("ID<4");
MgLayer layer = map.GetLayers().GetItem(0) as MgLayer;
MgFeatureReader featureReader =
layer.SelectFeatures(queryOptions);
MgSelection selection = new MgSelection(map);
selection.AddFeatures(layer, featureReader, 0);
selectionXml = selection.ToXml();
The code runs perfectly. And in viewer it also shows that 2 Features
Selected. But features are not highlighted on the map.
Please assist...
Thanks & Regards,
Ravinder
************************************************************************
******************************************************
"This message and any attachments are solely for the intended recipient
and may contain Birlasoft confidential or privileged information. If you
are not the intended recipient,any disclosure,copying, use, or
distribution of the information included in this message and any
attachments is
prohibited. If you have received this communication in error, please
notify us by reply e-mail(administrator at birlasoft.com) immediately and
permanently delete this message and any attachments. Thank you."
************************************************************************
******************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090225/3a6e59c9/attachment.html
More information about the mapguide-users
mailing list