物探论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 444|回复: 0

MapXtreme+ASP在图层上添加折线图元

[复制链接]
发表于 2013-3-13 20:39:26 | 显示全部楼层 |阅读模式
开发环境:MapXtreme for Windows
代码:
创建折线图元
Function ObjMulLine(PointNums,byref x(),byref y(),layername,byref obj)
dim bresult
dim pts
dim i
dim style
set style=Session(SESN_COURIER).CreateMapXStyle
set pts=Session(SESN_COURIER).createmapxpoints
for i=0 to PointNums-1
pts.addxy x(i),y(i),i+1
next
set obj=Session(SESN_MAPPER).FeatureFactory.createline(pts,style)
end function
将折线图元添加到图层
sub DrawMulLine(PointNums,byref x(),byref y(),layername,style)
dim f
dim bresult
if pointnums= 0 then
exit sub
end if
bresult=ObjMulLine(PointNums,x,y,layername,f)
f.style=style
Session(SESN_MAPPER).Layers(layername).addfeature f
end sub
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|物探论坛 ( 鄂ICP备12002012号 微信号:iwutan )

GMT+8, 2024-5-12 23:54 , Processed in 0.063801 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表