P
pyg666
Unregistered / Unconfirmed
GUEST, unregistred user!
var
p: CMapXPoint;
TextFeature: variant;
temp_Point: variant;
begin
for i:=0 to m
begin
pts := CreateOleObject('MapX.Points.4');
XPoint := FXPoint + 1;
YPoint := FYpoint + i * 1;
pts.AddXY(XPoint, YPoint);
XPoint := 5 * 1 + FZhuangHNum * FZhUnit / 100;
pts.AddXY(XPoint, YPoint);
newObj := Map1.FeatureFactory.CreateLine(pts, EmptyParam);
newObj.Style.LineWidth := 1;
//newObj.Style.LineColor := clred;
newObj.Style.LineStyle := 1;
Map1.Layers.Item('Xie').AddFeature(newObj, EmptyParam);
temp_Point := CreateOleObject('MapX.Style.4');
temp_Point.TextFontColor := TextColor;
temp_Point.TextFont.Name := '宋体';
temp_Point.TextFont.Size := Size;
temp_Point.TextFont.Bold := true;
p := CoPoint.Create;
// miPositionCC
p.Set_(x, y);
TextFeature := Map1.FeatureFactory.CreateText(p, Text, aType, temp_Point);
TextFeature.Style.TextFontRotation := Angel;
Map1.Layers.Item('text').AddFeature(TextFeature, EmptyParam)
end;
如果m变大的话程序就变的很慢,
p: CMapXPoint;
TextFeature: variant;
temp_Point: variant;
begin
for i:=0 to m
begin
pts := CreateOleObject('MapX.Points.4');
XPoint := FXPoint + 1;
YPoint := FYpoint + i * 1;
pts.AddXY(XPoint, YPoint);
XPoint := 5 * 1 + FZhuangHNum * FZhUnit / 100;
pts.AddXY(XPoint, YPoint);
newObj := Map1.FeatureFactory.CreateLine(pts, EmptyParam);
newObj.Style.LineWidth := 1;
//newObj.Style.LineColor := clred;
newObj.Style.LineStyle := 1;
Map1.Layers.Item('Xie').AddFeature(newObj, EmptyParam);
temp_Point := CreateOleObject('MapX.Style.4');
temp_Point.TextFontColor := TextColor;
temp_Point.TextFont.Name := '宋体';
temp_Point.TextFont.Size := Size;
temp_Point.TextFont.Bold := true;
p := CoPoint.Create;
// miPositionCC
p.Set_(x, y);
TextFeature := Map1.FeatureFactory.CreateText(p, Text, aType, temp_Point);
TextFeature.Style.TextFontRotation := Angel;
Map1.Layers.Item('text').AddFeature(TextFeature, EmptyParam)
end;
如果m变大的话程序就变的很慢,