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?
This is a discussion on How to get Lat, Lon from a Location object? within the MapPoint Desktop 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 ...
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?
this is what u can do
Location obj = new Location(); // I assume this object u r already having
obj.getLatLong().getLatitude();
obj.getLatLong().getLongitude();
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();
};
Hi,
Yes. Check this one: http://www.mp2kmag.com/articles.asp?...xtract.lat.lonOriginally Posted by Van
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Thanks alot Wilfried .
That was me to say Thanks to Wilfried (I forgot to log in).![]()
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
Youre not married !Originally Posted by Van
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...![]()
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)