MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




How to get Lat, Lon from a Location object?

This is a discussion on How to get Lat, Lon from a Location object? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Is there a function in C++ to get Lat, Lon from a Location object? Say after you FindNearby and using ...


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

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



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-31-2005
Van Van is offline
Junior Member
White Belt
 
Join Date: Jan 2005
Posts: 8
How to get Lat, Lon from a Location object?

Is there a function in C++ to get Lat, Lon from a Location object?

Say after you FindNearby and using the index thru the FindResults to get Location object (example: A restaurant), how to get Lat, lon for this restaurant?
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 01-31-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
this is what u can do

Location obj = new Location(); // I assume this object u r already having
obj.getLatLong().getLatitude();
obj.getLatLong().getLongitude();
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 01-31-2005
Van Van is offline
Junior Member
White Belt
 
Join Date: Jan 2005
Posts: 8
Hi Kalradeepak,

The strang thing is that, I could not find where this function is
obj.getLatLong().getLatitude();

Below is the class wrapper imported by the typelib. Please explain where this function comes from.

Van



// Location wrapper class

class Location : public COleDispatchDriver
{
public:
Location() {} // Calls COleDispatchDriver default constructor
Location(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
Location(const Location& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}

// Attributes
public:

// Operations
public:
LPDISPATCH GetApplication();
LPDISPATCH GetParent();
CString GetName();
void GoTo();
LPDISPATCH GetLocation();
LPDISPATCH GetPlaceCategory();
LPDISPATCH FindNearby(double Distance);
BOOL GetHighlight();
void SetHighlight(BOOL bNewValue);
BOOL GetIsHighlightable();
double DistanceTo(LPDISPATCH From);
void Select();
void Copy();
LPDISPATCH GetStreetAddress();
long GetType();
};
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 02-01-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Re: How to get Lat, Lon from a Location object?

Hi,

Quote:
Originally Posted by Van
Is there a function in C++ to get Lat, Lon from a Location object?
Yes. Check this one: http://www.mp2kmag.com/articles.asp?...xtract.lat.lon
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 02-01-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thanks alot Wilfried .
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 02-01-2005
Van Van is offline
Junior Member
White Belt
 
Join Date: Jan 2005
Posts: 8
That was me to say Thanks to Wilfried (I forgot to log in).
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 02-01-2005
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
I've added the answer to the FAQ. It is a very common question, and I'll have to admit Gilles article is a very useful solution!


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
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 02-01-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Quote:
Originally Posted by Van
I forgot to log in.
Youre not married !

otherwise you never should forget to
  • -login
    -prepare the workstation (registry etc)
    -do what you have to do
    -clean up the mess
    -logout

just joking of course...
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
lat, location, lon, object


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
Persisting a Location object to disk Anonymous MapPoint 2006/2009 Discussion 1 07-16-2004 12:04 PM
Country-information from Location-object C72831 MapPoint 2006/2009 Discussion 0 01-03-2004 06:27 PM
Getting Location Object by only the ZipCode Anonymous MapPoint 2006/2009 Discussion 1 07-30-2003 03:02 PM
Getting address information of location object in delphi? Sheridan MapPoint 2006/2009 Discussion 1 03-07-2003 08:37 AM
Decode Location Object to Latitude, Longtitude positions? Anonymous MapPoint 2006/2009 Discussion 1 10-16-2002 05:29 AM


All times are GMT -5. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Florida Holiday
Book your Florida holiday through UlookUbook and save cash!



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 56 57 58 59