|
TalMap SDK Libary Reference |
XAdminItem::GetAdminName |
ÇàÁ¤µ¿ ¸íĪÀ» È®ÀÎÇÕ´Ï´Ù. |
|
|
|
Parameters
|
Sep |
¸íĪ ±¸ºÐÀÚ, ±âº»°ª: " " |
Type |
Çü½Ä 0: ±âº»°ª. 1: µµ/±¤¿ª½Ã, 2: ½Ã/±º/±¸, 3: µ¿ |
|
|
|
|
Return Value
|
|
Remarks
|
GetAdminName ´Â XAdminItem ÀÇ Method·Î Á¦°øµË´Ï´Ù.
»ç¿ëÀÚ´Â ÀÌ ¸Þ¼Òµå¸¦ ÇàÁ¤µ¿ ¸íÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
GetAdminName ¸Þ¼ÒµåÀÇ Ã¹¹øÂ° ÀÎÀÚÀÎ Sep ´Â ºÐ¸®ÇÒ ¹®ÀÚ¸¦ °¡¸®Åµ´Ï´Ù.
¿¹¸¦ µé¾î ºÐ¸® ¹®ÀÚ¸¦ "/"·Î ÇßÀ» °æ¿ì ÇàÁ¤µ¿ ÁÖ¼Ò´Â ´ÙÀ½°ú °°ÀÌ Ç¥½ÃµÉ °ÍÀÔ´Ï´Ù.
"¼¿ïƯº°½Ã/°³²±¸/´ëÄ¡µ¿"
GetAdminName ¸Þ¼ÒµåÀÇ µÎ¹øÂ° ÀÎÀÚÀÎ TypeÀº ÁÖ¼Ò Ç¥Ãâ ·¹º§À» °áÁ¤ÇÕ´Ï´Ù.
(1: µµ/±¤¿ª½Ã ·¹º§±îÁö Ç¥Ãâ, 2: ½Ã/±º/±¸ ·¹º§±îÁö Ç¥Ãâ, 3: µ¿ ·¹º§±îÁö Ç¥Ãâ)
¿¹¸¦ µé¾î Sep¸¦ " " À¸·Î ÇßÀ» ¶§ Type °ª¿¡ µû¸¥ ÁÖ¼Ò Ç¥ÃâÀº ´ÙÀ½°ú °°½À´Ï´Ù.
Type => 1: ¼¿ïƯº°½Ã
Type => 2: ¼¿ïƯº°½Ã °³²±¸
Type => 3: ¼¿ïƯº°½Ã °³²±¸ ´ëÄ¡µ¿
|
|
|
|
Example
|
|
function TestBtn()
{
var ctrlMan = m_Map.GetCtrlMan();
var adminman = ctrlMan.GetAdminMan();
var ctrlstate = ctrlMan.GetControlState();
var centerLL = ctrlstate.GetLLCenter(); // ÁöµµÀÇ Á᫐ ÁÂÇ¥
var adm = adminman.GetAdminItem(centerLL.GetX(), centerLL.GetY());
if (adm)
{
var admcode = adm.GetAdminCode(); // ÇàÁ¤µ¿ ÄÚµå ¾ò±â
alert(admcode);
var admname = adm.GetAdminName(" ", 3);
alert(admname);
adm.Destroy();
}
}
|
|
|
#include "CXCtrlMan.h"
#include "CXAdminMan.h"
#include "CXControlState.h"
#include "CXPoint.h"
#include "CXAdminItem.h"
void CTestTalMapXDlg::OnBnClickedButton3()
{
CXCtrlMan ctrlman = m_Map.GetCtrlMan();
CXAdminMan adminman = ctrlman.GetAdminMan();
CXControlState ctrlstate = ctrlman.GetControlState();
CXPoint centerLL = ctrlstate.GetLLCenter(); // ÁöµµÀÇ Á᫐ ÁÂÇ¥
CXAdminItem admitem = adminman.GetAdminItem(centerLL.GetX(), centerLL.GetY());
if (admitem.m_lpDispatch != NULL)
{
CString admcode = admitem.GetAdminCode(); // ÇàÁ¤µ¿ ÄÚµå ¾ò±â
CString admname = admitem.GetAdminName(_T(" "), 3); // ÇàÁ¤µ¿ À̸§ ¾ò±â
CString strTmp(_T(""));
strTmp.Format(_T("admin code : %s\nadmin name : %s\n"), admcode, admname);
AfxMessageBox(strTmp);
admitem.Destroy();
}
}
|
|
|
|
See Also
|