[mapguide-users] MgFdo Exception
padmini godavarthi
godavarthi.padmini at gmail.com
Tue Mar 31 00:44:36 EDT 2009
Hi,
iam using mapguide opensource 2.0 (with .net 2.0 +IIS 5.1)
Now i want to apply the thematic color for the layer
for that i have written a code but it gives me some error in the following line
Dim dataReader1 As MgDataReader = featureService.SelectAggregate(resId, layer.GetFeatureClassName(), aggregateOptions1)
"An exception of type 'OSGeo.MapGuide.MgFdoException' occurred in MapGuideDotNetApi.DLL but was not handled in user code"
My code was as follows:
-----------------------------------------------------------------------------------------------------
Dim value As String = ""
Dim filterText As String = ""
Dim areaRuleXML As String = ""
Dim areaDoc As XmlDocument = Nothing
Dim areaNode As XmlNode = Nothing
Dim portion As Double = 0.0
Dim parcelstring As String
Dim areaRuleTemplate As String = File.ReadAllText(GetThemeXmlTemplatePath())
Dim aggregateOptions1 As MgFeatureAggregateOptions = New MgFeatureAggregateOptions()
aggregateOptions1.AddFeatureProperty("PARCEL_ID")
Dim query2 As String = "PARCEL_ID='708_584'"
aggregateOptions1.SetFilter(query2)
Dim increment1 As Double = IIf((5 > 1), 1.0 / (5 - 1), 1.0)
Dim str As String = layer.GetFeatureClassName()
Dim dataReader1 As MgDataReader = featureService.SelectAggregate(resId, layer.GetFeatureClassName(), aggregateOptions1)
While dataReader1.ReadNext()
value = GetFeaturePropertyValue(dataReader1, "PARCEL_ID")
' value = "'785_1000'"
filterText = """ + "PARCEL_ID" + "" = "
filterText = filterText + value
areaRuleXML = String.Format(areaRuleTemplate, "PARCEL_ID" + ":" + value, filterText, InterpolateColor(portion, startcolor, startcolor, 0), InterpolateColor(portion, startcolor, startcolor, 0))
areaDoc = New XmlDocument()
areaDoc.LoadXml(areaRuleXML)
areaNode = doc.ImportNode(areaDoc.DocumentElement, True)
areaTypeStyle.AppendChild(areaNode)
portion = portion + increment1
End While
dataReader1.Close()
can anyone plz tell me the solution
Thanks and Regards,
Padmini G.
--
View this message in context: http://n2.nabble.com/MgFdo-Exception-tp2561165p2561165.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list