var ctrlman = m_Map.GetCtrlMan();
var util = m_Map.GetUtility();
var imageman = ctrlman.GetImageMan();
var poiman = ctrlman.GetPOIMan();
//중심좌표 구하기
var controlstate = ctrlman.GetControlState();
var posLL = controlstate.GetLLCenter();
//이미지 생성
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var poiImage = imageman.LoadImageList("POIIMAGE", "image/CAR.png", 64,64);
//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"));
//0~3레벨까지만 이미지를 지정합니다.
style.SetImage( 0, poiImage);
style.SetImage( 1, poiImage);
style.SetImage( 2, poiImage);
style.SetImage( 3, poiImage);
}
//step3. POI 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.SetAnimation(200);
item.SetImageOffset(0);
item.SetAlpha(100);
item.SetAngle(30);
item.SetScale(50);//이미지를 축소합니다.
var getScaleVal = item.GetScale();
alert(getScaleVal);