[mapguide-users] Listing Active selected feature C#

Knight, Gregory Gregory.Knight.bra at cityofboston.gov
Mon Jan 22 09:47:25 EST 2007

Certainly...  Ill pull it together and post it a bit later today.



From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Andy
Sent: Sunday, January 21, 2007 2:15 PM
To: mapguide-users at lists.osgeo.org
Subject: RE: [mapguide-users] Listing Active selected feature C#



Would it be possible for you to post the example to the group?  The list
should accept plain text file attachments or you could paste it into the
message body.




From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Knight,
Sent: Sunday, January 21, 2007 10:43 AM
To: Nimrod Cnaan; mapguide-users at lists.osgeo.org
Subject: RE: [mapguide-users] Listing Active selected feature C#

I have a C# example where I am doing exactly this. I can send you the
page via separate means if you are interested.





From: mapguide-users-bounces at lists.osgeo.org on behalf of Nimrod Cnaan
Sent: Sat 1/20/2007 9:13 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Listing Active selected feature C#


I am attempting to get the list of selected parcels by using "Invoke
command, passing "$Current Selection" to my "listdwfparcels.aspx" page,
through the key & value pair.

I don't know what I'm doing wrong, getting unclassified exception
"MgSelection.FromXml" . . .

Checking the value of my mgkey content "$Current Selection" returns:


Here is portion of the code that I'm using -

String mgSessionId = GetParameters()["SESSION"];
String mgSelection = GetParameters()["mgkey"];
MgResourceIdentifier layerFeatureResource;
MgReadOnlyLayerCollection layers;
MgSelection selection;
MgLayer layer;
string layerClassName;
string selectionString;
string layerFeatureId;

  MgUserInformation userInfo = new MgUserInformation(mgSessionId);
  MgSiteConnection siteConnection = new MgSiteConnection();

  MgResourceService resourceService =
siteConnection.CreateService(MgServiceType.ResourceService) as
  MgFeatureService featureService =
siteConnection.CreateService(MgServiceType.FeatureService) as
  MgFeatureQueryOptions queryOptions = new MgFeatureQueryOptions();
  MgMap map = new MgMap();
  map.Open(resourceService, "HaifaMap");
if (GetParameters()["SESSION"] != "")
    selection = new MgSelection(map, mgSelection);

<<<<< MY ERROR >>>>>
An unclassified exception occurred.An unclassified exception occurred.
Exception occurred in method MgSelection.FromXml at line 158 in file

Nimrod Cnaan - GIS Senior Programmer
Haifa Municipality, Israel

View this message in context:
Sent from the MapGuide Users mailing list archive at Nabble.com.

mapguide-users mailing list
mapguide-users at lists.osgeo.org



The substance of this message, including any attachments, may be
confidential, legally
privileged and/or exempt from disclosure pursuant to Massachusetts
law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and
delete the material from any computer.

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

More information about the mapguide-users mailing list