碰到了难题,mapx(50分)

  • 主题发起人 zqs10597249
  • 开始时间
Z

zqs10597249

Unregistered / Unconfirmed
GUEST, unregistred user!
mapx怎么实现,标尺和整图显示及前视图
请高手指点
就是要实现象mapinfo上的功能
 
全图: map1.Bounds :=map1.Layers.Bounds;
前视图就要记下前一视图的bound,恢复时在赋予map对象就行了
标尺的问题帮助里好像有个简单的例子
 
to:峻祁连,
谢谢!
交个朋友好吗?
QQ:49427523
 
接受答案了.
 
前视图就要记下前一视图的bound,恢复时在赋予map对象就行了
前一视图的bound是怎么取得?
我在漫游时
if MapEdit.Layers.Count>0 then

P_Bounds :=MapEdit.Bounds;//这样不都是全图??
SetCurrentTool(MapEdit,miPanTool);
 
MapEdit.Layers.Bounds是全图,
MapEdit.Bounds是当前的Bounds。
不过上述方法只能恢复一次前视图,采用堆栈可以实现多次恢复前视图
 
峻祁连,请问
创建线时,style设置时要注意什么?
我想把线的样式存到数据库里
然后再从数据库了建出来,可是当我一直放大时出现error float point 操作错误
具体代码请看
存入数据库
I_Sty:Variant
query.SQL.Add('LineColor='+inttostr(I_Sty.LineColor)+',');
if I_sty.LineInterleaved then

query.SQL.Add('LineInterleaved='+''''+'1'+''''+',')
else

query.SQL.Add('LineInterleaved='+''''+'0'+''''+',');
query.SQL.Add('LineStyle='+inttostr(I_Sty.LineStyle)+',');
query.SQL.Add('LineWidth='+inttostr(I_Sty.LineWidth)+',');
query.SQL.Add('LineWidthUnit='+inttostr(I_Sty.LineWidthUnit)+',');
读出创建时
V_sty:CMapxStyle;
v_data:Variant;
V_Sty:=CoStyle.Create;
V_Data:=V_Sty;
V_Data.LineStyle:=query.fieldByName('LineStyle').AsInteger;
V_Data.LineColor:=query.fieldByName('LineColor').AsInteger;
V_Data.LineWidth:=query.fieldByName('LineWidth').AsInteger;
V_Data.LineWidthUnit:=query.fieldByName('LineWidthUnit').AsInteger;
V_Data.LineInterleaved:=query.fieldByName('LineInterleaved').AsInteger;
 
MapEdit.Bounds是当前的Bounds。
是要在MapEditToolUsed赋值吗?
if MapEdit.Layers.Count>0 then

P_Bounds :=MapEdit.Bounds;

还是在设置工具前赋值
 
哈哈,不好意思。
前视图搞定了,真的很感谢!
 
to:峻祁连大侠
你数据绑定都用miDataSetADO,adoquery1.recordset吗?
如果我想用TClientDataSet怎么样用?Map.Datasets.Add的Type和SourceData
怎么设置,很急,谢谢!
 

Similar threads

D
回复
0
查看
681
DelphiTeacher的专栏
D
D
回复
0
查看
666
DelphiTeacher的专栏
D
D
回复
0
查看
620
DelphiTeacher的专栏
D
顶部