MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




[HELP]: Problem with C# and FindResults

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-27-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
[HELP]: Problem with C# and FindResults

Hi;

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 09:53 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51