MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




VS c++ and Mappoint 2006 Questions

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


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-05-2008
Junior Member
Yellow Belt
 
Join Date: Jul 2008
Posts: 18
VS c++ and Mappoint 2006 Questions

Hi !

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-05-2008
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 901
Blog Entries: 10
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 09-05-2008
Junior Member
Yellow Belt
 
Join Date: Jul 2008
Posts: 18
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"); 
Thanks a lot for your answers.

Kemanke
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 09-08-2008
Junior Member
Yellow Belt
 
Join Date: Jul 2008
Posts: 18
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 09-08-2008
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 901
Blog Entries: 10
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 09-08-2008
Junior Member
Yellow Belt
 
Join Date: Jul 2008
Posts: 18
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;
Thank you in advance.

Kemanke
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 09-08-2008
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 901
Blog Entries: 10
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-09-2008
Junior Member
Yellow Belt
 
Join Date: Jul 2008
Posts: 18
Re: VS c++ and Mappoint 2006 Questions

Ok thank you, I found the solution yesterday evening, but I didn't have time to post.

anyway thank you again.

Kemanke
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

Tags
mappoint 2006, questions


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/vs-c-mappoint-2006-questions-8426.html

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

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


All times are GMT -5. The time now is 07:00 AM.


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


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 52 53 54 55