Message ID for the Request "SetMapCenter":
RI_MESSAGE_SETMAPCENTER
Write Memory:
RI_SetMapCenter_WriteData(LPARAM id, RI_CSetMapCenter data );
Return Values for SetMapCenter:
RI_NOERROR = change MapRect success
RI_NODESC = AutoPanning is deactivated.
Description:
Sets the map center to the given position if m_panning is true. There is no automatic switch back to the current gps position on the map, so be sure to call this message again with m_panning = false to center the map to the current position !
Possible coordinate formats are mercator and geodecimal (see also the data-struct description).
Example:
#define USE_LOADLIBRARY
#include "TNSRemoteInterfaceDll.h"
LPARAM GetUniqueID()
{
static LPARAM id = 0;
if (++id == 0) ++id;
return id;
}
inline LRESULT RI_MESSAGE( const UINT request, HWND h_client, LPARAM id )
{
PostMessage(
RI_GetTNS(), request, WPARAM(h_client),
id );
}
LRESULT CDlgMFC_SetMapCenter::WindowProc ( UINT message , WPARAM wParam , LPARAM lParam )
{
{
}
return CDialog::WindowProc( message, wParam, lParam );
}
void CDlgMFC_SetMapCenter::foo()
{
wcscpy(data.
m_PosX, L
"937170");
wcscpy(data.
m_PosY, L
"6270165");
LPARAM id = GetUniqueID();
return;
else
}