Community of VE/MapPoint Users and Developers
This is a discussion on findNearbySpec... c# problem within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Code: FindResults foundResults; foundResults = findService.FindNearby(findNearbySpec); ViewByHeightWidth[] views = new ViewByHeightWidth[1]; views=null; views[0] = foundResults.Results[0].FoundLocation.BestMapView.ByHeightWidth; I have this exception Object ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| findNearbySpec... c# problem Code: FindResults foundResults; foundResults = findService.FindNearby(findNearbySpec); ViewByHeightWidth[] views = new ViewByHeightWidth[1]; views=null; views[0] = foundResults.Results[0].FoundLocation.BestMapView.ByHeightWidth; I cannot find the problem... There are many places found in foundResults can you help me? Thank you.. |
| |||
|
Hi, what is the offending line of code ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, You set views = null; before you assign something to views[0]. You cannot assign to a null pointer. Probably that's the reasonl. Somtthing like this is better I think: Code: FindResults foundResults;
foundResults = findService.FindNearby(findNearbySpec);
ViewByHeightWidth[] views = new ViewByHeightWidth[1];
// views=null; in comment
if (foundResults)
views[0] = foundResults.Results[0].FoundLocation.BestMapView.ByHeightWidth;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
Short Break Ski Holidays
Just want to book a short break? Short break ski holidays become great value when you book at Holiday Hypermarket. See the range of deals on offer.
Portugal Holidays
Find and book Portugal Holidays with Travel Counsellors. Holiday destinations around the world including Portugal.
Italy Holiday
An Italy Holiday is full of interesting stuff for the casual tourist and even more for the educated visitor. Check out the latest great deals at dealchecker.co.uk.
Dominican Republic Holidays
Dominican Republic holidays have something to offer for everyone. From water sports, to sun bathing and more, enjoy a holiday there!
Egypt
In Egypt you find an ancient city buzzing with life. There is an abundance of historical sites to see, not just the pyramids. The Opera House is certainly worth a visit and you can enjoy some open-air theatre too.
Cheap family holidays
To plan cheap family holidays, use Travel.co.uk to explore all the delightful possibilities that there are.
Cheap Holidays to Sharm el Sheikh
Break away to Northern Africa. Find cheap holidays to Sharm el Sheikh at On The Beach.