Opened 16 years ago
Closed 13 years ago
#745 closed defect (fixed)
Error Theming Layer using data source with feature joins
Reported by: | CivilEng | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Web API | Version: | 2.0.1 |
Severity: | critical | Keywords: | Theming, feature joins |
Cc: | brucedechant | External ID: |
Description (last modified by )
The error is raised when individual distribution is requested.
MgFeatureAggregateOptions aggregateOptions = new MgFeatureAggregateOptions(); aggregateOptions.AddFeatureProperty(UFunctions.GetParameter(this.args, "PROPERTYNAME")); aggregateOptions.SelectDistinct(true); // this line raises the exception dataReader = featureService.SelectAggregate(resId, layer.GetFeatureClassName(), aggregateOptions); Error: Index is out of range. StackTrace: - MgFeatureServiceHandler.ProcessOperation line 83 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.16\mgdev\server\src\services\feature\FeatureServiceHandler.cpp - MgOpSelectFeaturesSpatial.Execute line 110 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.16\mgdev\server\src\services\feature\OpSelectFeaturesSpatial.cpp - MgServerSelectFeatures.SelectFeatures line 249 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.16\mgdev\server\src\services\feature\ServerSelectFeatures.cpp - GetItem line 81 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.16\mgdev\common\foundation\System/DisposableCollection.cpp Index is out of range.
I am attaching mgp file and access database in order to replicate the error. the mgp contains the flexible(fusion) and basic layout. Both layouts invoke to thememain.aspx (It's the same that comes with the dotnetviewersample).
I have tested for manage and unmanage data source, just as SHP, SDF, and SQL2008 providers.
Attachments (2)
Change History (7)
by , 16 years ago
Attachment: | dataCH.mdb added |
---|
by , 16 years ago
Attachment: | From_SiteServer_20081030_TestTheming.mgp added |
---|
comment:1 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
Cc: | added |
---|
comment:3 by , 16 years ago
Milestone: | 2.1 |
---|
comment:4 by , 15 years ago
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Try this:
MgFeatureAggregateOptions aggregateOptions = new MgFeatureAggregateOptions(); aggregateOptions.AddComputedProperty("UniqueValue", "UNIQUE(" + UFunctions.GetParameter(this.args, "PROPERTYNAME") + ")"); dataReader = featureService.SelectAggregate(resId, layer.GetFeatureClassName(), aggregateOptions);
UNIQUE() is an undocumented special function that returns a list of unique values for the given property.
Each unique value will be present under the "UniqueValue" computed property as you iterate through the data reader.
Solution tested on 2.4 preview.
Please re-test against 2.1 and let us know if this is still an issue (or close if has been fixed). Will close this ticket if no response by next ticket cleanup cycle.