DevExpress 地圖的控件使用方法


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、程序運行界面如圖所示:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM