DevExpress 地图的控件使用方法

本文详细介绍了如何使用DevExpress的地图控件dxmapcontrol1创建并显示地图。通过设置地图图层为OpenStreetMapImageryDataProvider,添加自定义标记点及绘制路径线。此教程适合初学者快速掌握DevExpress地图应用开发。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、放置1个dxmapcontrol1在窗体上,设置align:=alclient
2、右键dxmapcontrol1控件,添加dxMapControl1ImageTileLayer1,设置Provider:=OpenStreetMapImageryDataProvider
3、右键dxmapcontrol1控件,添加dxMapControl1ItemLayer1,设置MapItems,添加2个 Custom Element
对象,并分别设置
dxMapControl1ItemLayer1CustomElement1.Text:='DevExpress Office'
dxMapControl1ItemLayer1CustomElement1.Location.Latitude:=34.1532
dxMapControl1ItemLayer1CustomElement1.Location.Longitude:=-118.2555

dxMapControl1ItemLayer1CustomElement2.Text:='Training Event'
dxMapControl1ItemLayer1CustomElement2.Location.Latitude:=50.3305
dxMapControl1ItemLayer1CustomElement2.Location.Longitude:=7.7300

4、右键dxMapControl1ItemLayer1,设置MapItems,添加1个 dxMapControl1ItemLayer1Polyline1对象,在GeoPoints属性中添加两个对象:
dxMapControlGeoPointCollection[0].Latitude:=34.1532
dxMapControlGeoPointCollection[0].Longitude:=-118.2555

dxMapControlGeoPointCollection[1].Latitude:=50.3305
dxMapControlGeoPointCollection[1].Longitude:=7.7300

5、设置属性如图所示:


6、程序运行界面如图所示:

转载于:https://www.cnblogs.com/windel/p/7634299.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值