|
|
var ctrlman = m_Map.GetCtrlMan();
var ctrlstate = ctrlman.GetControlState();
var layerMan = ctrlman.GetLayerMan();
var util = m_Map.GetUtility();
var centerLL = ctrlstate.GetLLCenter(); // ÁöµµÀÇ Á᫐ ÁÂÇ¥
// Step 1. Make Layer Style
var style = layerMan.FindStyle(10);
if (!style) {
style = layerMan.NewStyle(10);
style.SetPen(util.RGBColor(0, 0, 0), 3, util.GetConstToValue("PS_SOLID"));
style.SetBrush(util.RGBAColor(0, 0, 255, 100), util.GetConstToValue(" BS_SOLID"));
}
// Step 2. Make Layer PolyLine
var polygon = layerMan.FindObject(100,10);
if (!polygon) {
polygon = layerMan.NewPolygon(100,10);
polygon.BeginUpdate();
polygon.AddPoint(centerLL._X+100,centerLL._Y+100);
polygon.AddPoint(centerLL._X+100,centerLL._Y+500);
polygon.AddPoint(centerLL._X+500,centerLL._Y+500);
polygon.AddPoint(centerLL._X+500,centerLL._Y+100);
polygon.SetCanClick(1);
polygon.SetCanFocus(1);
polygon.SetClosed(1); // 0: Line, 1: Polygon
polygon.SetStyle(style);
polygon.EndUpdate();
polygon.AddEventMode(util.GetConstToValue("TMEVENTTYPE_CLICK"));
polygon.SetShowDistance(1);
polygon.SetShowArea(1);
}
|
|
|
CXLayerMan layerman = ctrlman.GetLayerMan();
CXUtility util = m_Map.GetUtility();
CXLayerStyle style = layerman.FindStyle(400);
if (style.m_lpDispatch == NULL)
{
style = layerman.NewStyle(400);
style.SetPen(util.RGBColor(255, 0, 255), 1, util.GetConstToValue(_T("PS_SOLID")));
style.SetBrush(util.RGBAColor(0, 255, 25, 100), util.GetConstToValue(_T("BS_SOLID")));
}
CXLayerCircle Obj = layerman.NewCircle(300, 3);
Obj.SetStyle(style);
Obj.SetClosed(1); // 0 : ¼±¸¸ Ç¥½Ã 1:³»ºÎ¿¡ Style Àû¿ë
Obj.SetShowDistance(1);
Obj.SetShowArea(1);
Obj.SetCanClick(1);
Obj.SetCanFocus(1);
Obj.SetRadius(300);
Obj.SetStateModeNew();
|
|