var ctrlman = m_Map.GetCtrlMan();
var poiman = ctrlman.GetPOIMan();
var util = m_Map.GetUtility();
var imageman = ctrlman.GetImageMan();
//Áß½ÉÁÂÇ¥ ±¸Çϱâ
var ctrlstate = ctrlman.GetControlState();
var posLL = ctrlstate.GetLLCenter();
//step1. POI Group »ý¼º
var group = poiman.FindGroup(1);
if(!group)
{
group = poiman.NewGroup(1);
}
//step2. Style »ý¼º
var style = poiman.FindStyle(1);
if(!style)
{
style = poiman.NewStyle(1);
style.SetGDIFont("±¼¸²", 0, 8);
style.SetFontColor(util.RGBColor(255, 0, 0));
style.SetFontOutColor(util.RGBColor(255,0,0));
style.SetBrush(util.RGBColor(100, 0, 255), util.GetConstToValue("BS_SOLID"));
style.SetPen(util.RGBColor(0, 0, 0), 1, util.GetConstToValue("PS_SOLID"));
}
//step3. group¿¡ Style Àû¿ë
group.SetStyle(style);
//step4. POI Item»ý¼º
var item = group.NewItem(-1) //¾ÆÀ̵ð ÀÚµ¿ »ý¼º
item.SetLonLat(posLL.GetX() , posLL.GetY());
item.SetShowImage(1);
item.SetTextStyle(util.GetConstToValue("DRAWTEXT_STYLE_BOARDOUTLINE"));
item.SetCaption("POI Test");
item.SetAngle(30);
item.SetImageOffset(0);
item.SetAlpha(100);
//À̹ÌÁö »ý¼º
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var poiImage = imageman.FindImage("POIIMAN");
if(!poiImage)
{
poiImage = imageman.LoadImageList("POIIMAGE", "image/CAR.png", 64 ,64);
}
item.SetImage(poiImage);
item.SetImageIndex(1);
item.SetAnimation(200);