var ctrlman = m_Map.GetCtrlMan();
var poiman = ctrlman.GetPOIMan();
var util = m_Map.GetUtility();
var imageman = ctrlman.GetImageMan();
//중간좌표 구하기
var controlstate = ctrlman.GetControlState();
var posLL = controlstate.GetLLCenter();
//step1. POI Group 생성
var group = poiman.FindGroup(10);
if(!group){
group = poiman.NewGroup(10);
}
//step2. POI 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.FindItem(1);
if(!item){
item = group.NewItem(1);
item.SetLonLat(posLL.GetX(),posLL.GetY());
item.SetShowImage(1);
item.SetTextStyle(util.GetConstToValue("DRAWTEXT_STYLE_BOARD"));
item.SetCaption("POI TEST");
item.SetAngle(30);
item.SetImageOffset(0);
item.SetAlpha(100);
}
//image 생성
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var poiImage = imageman.LoadImageList("POIIMAGE","image/CAR.png", 64,64);
item.SetImage(poiImage);
item.SetImageIndex(1); //XImageMan.LoadImageList로 생성한 이미지 객체에서만 적용 됩니다.
item.SetAnimation(200);
var getImageOffsetVal = item.GetImageOffset();
alert(getImageOffsetVal);