Find objects distance

May 14, 2010 at 7:38 AM
Edited May 14, 2010 at 7:48 AM
Hi, How can i find the objects within a given distance to given coordinate? M. Hararci
Coordinator
May 14, 2010 at 7:56 AM

var objectsInArea = from p in objects
                             where GMaps.Instance.GetDistance(center, p.Point) <= areaRadius
                             select new
                             {
                                Obj = p,
                                Dist = GMaps.Instance.GetDistance(center, p.Point)
                             };
         if(objectsInArea.Any())
         {
                     ....

May 14, 2010 at 9:12 AM
Hi radioman, Thanks for fast reply. I try it but I don't worked. Error 1 Could not find an implementation of the query pattern for source type 'GMap.NET.WindowsForms.GMapOverlay'. 'Where' not found. F:\greatmaps\Demo.WindowsForms\Forms\MainForm.cs 508 43 Demo.WindowsForms
Coordinator
May 14, 2010 at 9:15 AM

?

May 14, 2010 at 10:37 AM
Pardon me. I didn't check the framework of the demo application. Changing the target framework of the application and it works. That's great. Thanks for helping.
Coordinator
May 14, 2010 at 11:00 AM

happy to help, se ya ;}