Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on Custom location returns null when using find nearby in route within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; When using the find nearby method I am having problems retrieving the custom data that I have imported into a ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Custom location returns null when using find nearby in route The Import data is included in the total count and the custom data is found using the interface but not programmatically. I am just interested in finding the custom location on a particular route. Is there a better solution or does anyone know what I am doing wrong? Any help is appreciated. Here is my code. Code: oResults = oMap.ActiveRoute.Directions.FindNearby(0.1);
int i = oResults.Count;
IEnumerator ienum = oResults.GetEnumerator();
ienum.Reset();
//Loop through the enumerator
while(ienum.MoveNext())
{
MapPoint.Location loc = ienum.Current as MapPoint.Location;
if(loc != null)
{
//process the location
ssCat = loc.Location.PlaceCategory.Name.ToString();
ssName = loc.Name.ToString();
}
|
| |||
| Re: Custom location returns null when using find nearby in r Quote:
I know it's been a while, but did you find a solution to this? I am experiencing the same problem with custom imported data. My code is nearly identical to yours - I am getting a "Count" of results, but I can't seem to iterate the results by casting them as Location objects. Any help would be appreciated. keith.mcgill@gmail.com |
| |||
|
Hi, Code: MapPoint.Location loc = ienum.Current as MapPoint.Location;
if(loc != null)
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| custom, find, location, nearby, null, returns, route |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find nearby operation | edwong | MapPoint Web Service and Virtual Earth | 0 | 10-03-2005 01:41 PM |
| Find Nearby Places... | Labtek | MapPoint 2006/2009 Discussion | 6 | 08-16-2004 02:39 AM |
| Find Places Nearby Tool | Anonymous | MapPoint 2006/2009 Discussion | 0 | 03-29-2004 10:27 AM |
| In my application, i am doing a find nearby at a p.... | Anonymous | MapPoint 2006/2009 Discussion | 3 | 03-03-2004 01:50 PM |
| Export "Find nearby places" along a route? | Anonymous | MapPoint 2006/2009 Discussion | 4 | 11-06-2003 09:56 AM |
Hurghada Holiday
Enjoy sunny Egypt when you book a Hurghada holiday through UlookUbook at a good price!