真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb.net中的map VBNET中的COMBBox屬性

請問vb.net添加了ARCGIS的mapcontrol控件后如何添加shp文件然后顯示出來?

你好 ,試下下面代碼,希望對你有用

讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務(wù)項目有:主機(jī)域名、網(wǎng)頁空間、營銷軟件、網(wǎng)站建設(shè)、鐵嶺網(wǎng)站維護(hù)、網(wǎng)站推廣。

//這是直接根據(jù)路徑名稱加載

private voidmenuAddShp_Click(object sender, EventArgs e)

{

IWorkspaceFactory pWorkspaceFactory = new ShapefileWorkspaceFactory();

IWorkspace pWorkspace = pWorkspaceFactory.OpenFromFile(@"D:\GIS-Data",0);

IFeatureWorkspace pFeatureWorkspace =pWorkspace as IFeatureWorkspace;

IFeatureClass pFC =pFeatureWorkspace.OpenFeatureClass("continent.shp");

IFeatureLayer pFLayer = new FeatureLayerClass();

pFLayer.FeatureClass = pFC;

pFLayer.Name = pFC.AliasName;

ILayerpLayer = pFLayer as ILayer;

IMappMap = axMapControl1.Map;

pMap.AddLayer(pLayer);

axMapControl1.ActiveView.Refresh();

}

//這段是利用對話框添加

從工具箱往窗體上添加一個OpenFileDialog控件。

private voidmenuAddShp_Click(object sender, EventArgs e)

{

IWorkspaceFactorypWorkspaceFactory = new ShapefileWorkspaceFactory();

openFileDialog1.Filter = "shapefile文件(*.shp)|*.shp";

openFileDialog1.InitialDirectory = @"D:\GIS-Data";

openFileDialog1.Multiselect = false;

DialogResultpDialogResult = openFileDialog1.ShowDialog();

if(pDialogResult != DialogResult.OK)

return;

stringpPath = openFileDialog1.FileName;

stringpFolder = Path.GetDirectoryName(pPath);

stringpFileName = Path.GetFileName(pPath);

IWorkspacepWorkspace = pWorkspaceFactory.OpenFromFile(pFolder,0);

IFeatureWorkspacepFeatureWorkspace = pWorkspace as IFeatureWorkspace;

IFeatureClasspFC = pFeatureWorkspace.OpenFeatureClass(pFileName);

IFeatureLayerpFLayer = new FeatureLayerClass();

pFLayer.FeatureClass = pFC;

pFLayer.Name = pFC.AliasName;

ILayerpLayer = pFLayer as ILayer;

IMap pMap =axMapControl1.Map;

pMap.AddLayer(pLayer);

axMapControl1.ActiveView.Refresh();

}

vb.net桌面中bitmap類如何直接繪制到屏幕?

可以直接顯示的。你看下面的示例,使用vb.net畫的齒輪:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

b = New Bitmap(PictureBox1.Width, PictureBox1.Height)

g = Graphics.FromImage(b)

'g.RotateTransform(90)

g.Clear(Color.White)

g.TranslateTransform(PictureBox1.Width / 2, PictureBox1.Height / 2)

g.ScaleTransform(1, -1)

'g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias

g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality

DrawCL(g, New PointF(Val(TextBox1.Text), Val(TextBox2.Text)), Val(TextBox3.Text), Val(TextBox4.Text), Val(TextBox5.Text), Val(TextBox6.Text), Val(TextBox7.Text), Val(TextBox8.Text), Val(TextBox9.Text))

DrawCL(g, New PointF(Val(TextBox18.Text), Val(TextBox17.Text)), Val(TextBox16.Text), Val(TextBox15.Text), Val(TextBox14.Text), Val(TextBox13.Text), Val(TextBox12.Text), Val(TextBox11.Text), Val(TextBox10.Text))

PictureBox1.Image = b

End Sub

vb.net程序(VS2010開發(fā))中如何嵌入百度地圖?求編程大神指導(dǎo)

這個說簡單也簡單,百度google都有自己的地圖接口,去找一下接口調(diào)用說明,里面都有案例。在程序里面調(diào)用即可。至于調(diào)用后具體的功能則需要查詢接口函數(shù)。我以前做過google的,百度的實際上也是一樣

vb.net 如何嵌入地圖

新建一個文件,寫入下面的代碼:

!doctype?html

html

head

meta?name="viewport"?content="initial-scale=1.0,?user-scalable=no"?/

meta?http-equiv="Content-Type"?content="text/html;?charset=gbk"?/

titleBaidu?Map?V1.2/title

script?type="text/javascript"?src=";services=true"

!--?add?baidu?map?api?--

/script

/head

body

div?id="container"?style="width:?600px;?height:?400px;"

/div

/body

/html

script?type="text/javascript"

var?map?=?new?BMap.Map("container");???????????? ????//?new?Map

var?point?=?new?BMap.Point(116.397128,?39.916527);??????//?Location,?(經(jīng)度,?緯度)

map.centerAndZoom(point,?15);??????????????????? ????//?show?Map

//?添加縮放功能

map.enableScrollWheelZoom();

map.enableKeyboard();

/script

保存到程序exe同一目錄下,文件名:map.html

然后BUTTON點擊事件:

WebBrowser1.Navigate(Application.StartupPath??"\map.html")

這樣就可以了

ps:經(jīng)緯度可以到百度地圖官網(wǎng)去獲取

或者到: ?去生成代碼


名稱欄目:vb.net中的map VBNET中的COMBBox屬性
網(wǎng)站鏈接:http://weahome.cn/article/hjsjho.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部