Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on [HELP]: Problem with C# and FindResults within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi; I have a problem with this code (geocode reversing) and I hope that you help me: FindResults function work ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| [HELP]: Problem with C# and FindResults I have a problem with this code (geocode reversing) and I hope that you help me: FindResults function work well and return items, but I canīt retrieve StreetAddress Location Object. Error is " Reference Objet is not establish." Note: This function is in a Class (*.dll) that use a client (windows service). ************************************************** ******** public string GetLocation(double longitud, double latitud) MapPoint.ApplicationClass mpApp = new MapPoint.ApplicationClass(); MapPoint.Map mpMap = mpApp.ActiveMap; MapPoint.Location mpLocation; MapPoint.FindResults mpResults; string addressInfo = string.Empty; mpLocation = mpMap.GetLocation( latitud, longitud, 1 ); mpLocation.GoTo(); mpResults = mpMap.ObjectsFromPoint( mpMap.LocationToX(mpLocation), mpMap.LocationToY(mpLocation) ); if( mpResults != null && mpResults.Count > 0){ // object index = 1; // MapPoint.Location oLoc = (MapPoint.Location) mpResults.get_Item( ref index ); IEnumerator ienum = mpResults.GetEnumerator(); ienum.Reset(); ienum.MoveNext(); MapPoint.Location oLoc = (MapPoint.Location) ienum.Current; if ( oLoc != null ){ addressInfo= oLoc.StreetAddress.Value; // ************ ERROR ************ return (addressInfo ); }}} ************************************************** ******** Thanks Mario Barro. |
![]() |
| Tags |
| findresults, problem |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do you read from a FindResults type in delphi? | matt1168 | MapPoint 2006/2009 Discussion | 3 | 02-27-2004 07:57 AM |
| OS Grid References - FindResults | Anonymous | MapPoint 2006/2009 Discussion | 3 | 10-14-2002 03:20 AM |
Taba Heights Holiday
Visit Egypt with your Taba Heights holiday. Book through UlookUbook and save!