Community of VE/MapPoint Users and Developers
This is a discussion on VS c++ and Mappoint 2006 Questions within the Development forums, part of the MapPoint 2006/2009 Discussion category; Hi ! I have some questions I need to have an answer, so please help me: 1.- How can I ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| VS c++ and Mappoint 2006 Questions I have some questions I need to have an answer, so please help me: 1.- How can I get the window in wich thee Latitude and the Longitude are shown, is there an method or something to get this? (Tools\Coordinates in French version of Mappoint 2006) 2.- Is it possible to display 2 routes (roads?) or more at the same time, if yes how can I do? That is all for the moment, Thank you in advance for your answers. Kemanke |
| ||||
| Re: VS c++ and Mappoint 2006 Questions
No you can only display one route at a time. Note that there is only ever one Route object - the one accessed through the Map's "ActiveRoute" property. Some of us have looked at trying to "capture" the coordinates of a route so that it can be drawn as a polyline (open freeform shape), but this doesn't work. The coordinates in a Route are given per direction and are chosen to give an "ideal view" of that direction. Ie. there is no guarantee that they'll even be on the route. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
| Re: VS c++ and Mappoint 2006 Questions
Thanks a lot for these informations, any ideas about the first question? and another question comes to my mind: is it possible to get addresses information of one point wich we know the latitude and the longitude? I tried with the method ObjectFromPoint like this but it does'nt work (nothing in strResult) Code: if ((m.LocationToX(loc[0]) != -1) && (m.LocationToY(loc[0]) != -1)) {
mpFindResults = m.ObjectsFromPoint(m.LocationToX(loc[0]),m.LocationToY(loc[0]));
nFound = mpFindResults.GetCount();
if (nFound > 0)
{
locTemp = mpFindResults.GetItem(&vItem); //What do I have to put in vItem???
saddrLocation = locTemp.GetStreetAddress();
if (saddrLocation.m_lpDispatch != NULL)
{
strResult = saddrLocation.GetValue();
}
else AfxMessageBox("m_lpDispatch NULL");
}
else AfxMessageBox("Add Pas Trouvée");
}
else AfxMessageBox("Position X & Y Invalide"); Kemanke |
| |||
| Re: VS c++ and Mappoint 2006 Questions
Hi! Somebody knows how can I get the exact addresse (in C++) of one pushpin or waypoint which I know the Latitude and the longitude. And Is it possible to get the window in wich is displays the longitude and the latitude (Tools/coordinates). Thanks a lot in advance Kemanke |
| ||||
| Re: VS c++ and Mappoint 2006 Questions
I don't think you can switch the Tool/Coords on automatically - I don't recall seeing a property for this. As for finding street addresses, MapPoint doesn't do it directly, but it is possible by searching for nearby addresses near the location - search mp2kmag.com, I know there are some articles on the subject. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
| Re: VS c++ and Mappoint 2006 Questions
Thank you Richards! It's true, concerning the tool to show latitude and latitude, I made by myself a display of the current position of the mouse! But another question: I searched some solution to get the actuel street of one given position but I can't translate one part of code in c++, can you help me please?? Code: foreach (object o in StreetResults) {
Location StreetLoc = o as Location;
Kemanke |
| ||||
| Re: VS c++ and Mappoint 2006 Questions
foreach simply iterates through objects in a collection - it is a feature of many modern languages. I've seen project-specific implementations in C++ using macros. You need to replace it with a conventional for loop that iterates ver each object (probably accessed with .Item( ) ) and with a limit of .Count Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
![]() |
| Tags |
| mappoint 2006, questions |
| ||||
| Posted By | For | Type | Date | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 09-05-2008 09:14 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mappoint 2006 ActiveX Questions | ben_dillon | MapPoint 2006/2009 Discussion | 3 | 01-31-2007 07:16 AM |
| MapPoint 2004 - a few questions | mikey | MapPoint 2006/2009 Discussion | 2 | 04-18-2006 09:34 AM |
| New to Mappoint... Having some questions... | Anonymous | MapPoint 2006/2009 Discussion | 2 | 02-25-2005 08:27 AM |
| Many Questions about Mappoint | Anonymous | MapPoint 2006/2009 Discussion | 8 | 01-08-2004 11:25 PM |
| i have two questions: i am using mappoint 2001 an.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-03-2002 02:01 PM |