Hi,
I'm trying to get features from the map with a mouse click. I use GetFeaturesNearestTo method. It used to work fine until I added a RotateProjection. Now when I click the item on the map and try to get its feature I get InvalidoperationException: Cannot get the projection’s InternalGeographyUnit, please provide it by overriding the Projection’s GetInternalGeographyUnitCore() method. I found that rotateProjection.GetInternalGeographyUnit method returns 'Unknown' and that's apparently is the source of the problem. There seems to be very similar bug fixed in version 5.0.0.0 of ThinkGeo.MapSuite.Core Namespace: "Fixed a bug where the GetInternalGeographyUnit always return Unknown when using FeatureSource.GetFeaturesWithinDistance with the RotationProjection". However it's only listed in release notes of WMS server, Silverlight and Services editions. And I use Desktop edition. I downloaded the latest daily build libraries (5.0.0.19) but the problem still persists. Is it not fixed yet in the Desktop edition or am I doing something wrong? Should I set the geography unit of rotate projection manually or something?
Here's some sample code:
InMemoryFeatureLayer dirLayer = (InMemoryFeatureLayer)winformsMap.FindFeatureLayer(LayerName);
Collection<string> columnNames = new Collection<string>();
columnNames.Add("Id");
Collection<Feature> features = dirLayer.FeatureSource.GetFeaturesNearestTo(new PointShape(e.WorldX, e.WorldY),
winformsMap.MapUnit, 1, columnNames, distanceBuffer, DistanceUnit.Meter);
Regards,
Oleg