var ctrlman = m_Map.GetCtrlMan();
var poiman = ctrlman.GetPOIMan();
var imageman = ctrlman.GetImageMan();
var util = m_Map.GetUtility();
//Áß½ÉÁÂÇ¥±¸Çϱâ
var controlstate = ctrlman.GetControlState();
var posLL = controlstate.GetLLCenter();
//POI Group»ý¼º
var group = poiman.FindGroup(10);
if(!group){
group = poiman.NewGroup(10);
}
//POI style »ý¼º
var style = poiman.FindStyle(2);
if(!style){
style = poiman.NewStyle(2);
style.SetGDIFont("±¼¸²", 0, 8);
style.SetFontColor(util.RGBColor(0,0,0));
style.SetFontOutColor(util.RGBColor(255,255,255));
style.SetBrush(util.RGBColor(100,0,255),0);
style.SetPen(util.RGBColor(0,0,0),1,0);
}
//À̹ÌÁö »ý¼º
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var poiImage = imageman.LoadImageList("POI_IMAGE","image/CAR.png",64,64);
if(poiImage.IsValid() !=true) alert('Image ÀÌ»ó');
var angle = 0;
var itemCount = 4;
//POI Item »ý¼º
for(var i=0; i < itemCount;i++){
var item = group.NewItem(-1);
item.SetLonLat(posLL.GetX()+i*100,posLL.GetY()+i*100);
item.SetShowImage(1);
item.SetImageIndex(14);
item.SetImageOffset(4);
item.SetTextStyle(0x12);
item.SetStyle(style);
item.SetContents("["+i+"]Contents\nHello");
item.SetCaption("["+i+"]POI TEST");
item.SetSyncAngle(1);
item.SetAlpha(100);
item.SetScale(70);
item.SetImage(poiImage);
var getCaptionVal = item.GetCaption();
alert(getCaptionVal);
}