|
|
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);
|
|