| |
|
|
function SetFontOutColorTest(){
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();
group = poiman.FindGroup(100);
//step1. POI group 생성
if(!group){
group = poiman.NewGroup(100);
}
var style = poiman.FindStyle(1000);
var rfontcolor = 0;
// step2. Style 생성
if(!style){
style = poiman.NewStyle(1000);
style.SetGDIFont("굴림",0,8);
style.SetFontColor(util.RGBColor(255,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);
rfontcolor = style.GetFontColor();
}
// step3. group 에 스타일 적용
group.SetStyle(style);
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var poiImage = imageman.LoadImageList("POIIMAGE", "image/CAR.png", 64, 64);
// step4. POI Item 생성
var item = group.NewItem(-1); // 아이디 자동 생성
item.SetLonLat(posLL.GetX() , posLL.GetY());
item.SetImage(poiImage);
item.SetShowImage(1);
item.SetTextStyle(util.GetConstToValue("DRAWTEXT_STYLE_BOARDOUTLINE"));
item.SetStyle(style);
item.SetCaption("POI Test");
item.SetAngle(30);
item.SetImageOffset(0);
item.SetAlpha(100);
item.SetAnimation(200);
}
|
|
|
|
CXPOIMan poiman = ctrlman.GetPOIMan();
CXPOIGroup group = poiman.FindGroup(100);
if (group.m_lpDispatch == NULL)
group = poiman.NewGroup(100);
// Step3. POI Style 을 생성 합니다.
CXPOIStyle style = poiman.FindStyle(1000);
if (style.m_lpDispatch == NULL) {
style = poiman.NewStyle(1000);
style.SetGDIFont(_T("굴림"), 0, 8);
style.SetFontColor(util.RGBColor(255, 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);
style.SetVisibleCtrl(1,1);
}
group.SetStyle(style);
|
|