Re-2: [mapguide-users] Selection and Zoom Problem

Jason Birch Jason.Birch at nanaimo.ca
Thu Nov 9 12:25:03 EST 2006


 
This name will vary with each dataset that you use this function for.
 
It may be more robust to take a generic approach, inspecting the class
definition -- GetClassDefinition() -- to determine the identity property
-- GetIdentityProperties(), IndexOf(), GetName().  I don't think that
MapGuide supports multiple identity columns yet (could be wrong) so you
should be safe just getting the definition of the first one.
 
You can find how to work with these calls here:
https://mapguide.osgeo.org/nonav/docs/webapi/d6/ddc/class_mg_feature_rea
der.html
 
The only one that is difficult to find is GetName(), which is a method
of the MgPropertyDefinition's parent class, MgProperty.
 
Jaosn

 
________________________________

From: Markus Roth 
Sent: Thursday, November 09, 2006 00:21
To: users at mapguide.osgeo.org
Subject: Re-2: [mapguide-users] Selection and Zoom Problem



Thanks Andy!

 

I had already tried this, without success.

But I found the error:

When I change "Key" to "Autogenerated_SDF_ID", it works:

 

Select Case features.GetPropertyType("Autogenerated_SDF_ID")

                    Case MgPropertyType.Int32

                        Selection.AddFeatureIdInt32(layer,
featureClassName, features.GetInt32("Autogenerated_SDF_ID"))

                    Case MgPropertyType.String

                        Selection.AddFeatureIdString(layer,
featureClassName, features.GetString("Autogenerated_SDF_ID"))

                End Select

            End If

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


More information about the Mapguide-users mailing list