I work with MS MapPoint 2002 under Delphi using TOleContainer. Everything works fine, but I have this problem: I have Lat and Long and want to search for nearest city. I need name of the city and name of the country, where it resides. I use this code:
But in Results are Hotels, Restaurants, etc. How to obtain nearest city name?Code:Dist:= 1; Loc:= self.GetLocation(X, Y); Results:= Loc.FindNearby(Dist); while (Results.Count = 0) and (Dist < CMaxDist) do begin Results:= Loc.FindNearby(Dist); Dist:= Dist*2; end; if Results.Count > 0 then //here I have all locations ...
Thanks for all replies. Bye Petr