01-28-2018 07:31 AM - edited 01-30-2018 12:33 AM
Hello all ,
I am trying to add an equijoin query for 2 text files to the legend and map view in c# as follows:
The equijoin GRecordset is called "_Points_Joined_GRecordset"
The query is called "myQuery_Points"
//Test how many records are there in _Points_Joined_GRecordset?
int conta = _Points_Joined_GRecordset.RecordCount;
SWF.MessageBox.Show(conta.ToString()); gives 136 records which is true
GDO.GRecordset myQPrs = myQuery_Points.Recordset as GDO.GRecordset;
PView.LegendEntry _pointsLegendEntry = new PView.LegendEntry(); _pointsLegendEntry.InputRecordset = myQPrs; GeoMedia.MapWindow mapWindow = this._currentApplication.ActiveWindow as GeoMedia.MapWindow; MapviewLib.GMMapView mapView = mapWindow.MapView as MapviewLib.GMMapView; if (mapView.Legend.LegendEntries.Count == 0)
mapView.Legend.LegendEntries.Append(_pointsLegendEntry, null, null);
mapView.Legend.LegendEntries.Append(_pointsLegendEntry, 1, null);
} mapView.Legend.Fit(); mapView.Refresh(true);
When I run this code the join query appear at the legend to have (0) records and nothing appear on the mapview as in the picture
Also When I try Display it on, the GeoMedia crashes.