Community of VE/MapPoint 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 ...
| |||||||
| 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. |
![]() |
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 |
Oberau Ski
Oberau ski holidays are great for beginners and families wanting to learn how to ski and board. Book with Holiday Hypermarket to have a taste of authentic Austrian village life.
City Breaks
Book a city break with Travel Counsellors. A personal travel advisor will help you make the most of your city break.
Holidays Jamaica
Holidays to Jamaica are a great way to immerse yourself in a different culture. Soak up some sun, indulge in some shopping, and relax at a beach resort. Use dealchecker.co.uk.
Jamaica Holidays
Jamaica holidays give you the chance to enjoy the vibrant cultural heritage and wonderful laid back atmosphere of the Caribbean. Book here!
Canaries
Find out all about the Canaries when you check out the ulookubook.com travel guides. Not only can you get a great holiday deal but you can find out useful information about potential holiday destinations.
All inclusive holidays
To plan all inclusive holidays, use Travel.co.uk to explore all the possibilities.
Cheap holidays to Portugal
Enjoy a spectacular country at a fraction of the cost. Find information on cheap holidays to Portugal at On The Beach.