全国高分辨率土地利用数据服务 土地利用数据服务 土地覆盖数据服务 坡度数据服务 土壤侵蚀数据服务 全国各省市DEM数据服务 耕地资源空间分布数据服务 草地资源空间分布数据服务 林地资源空间分布数据服务 水域资源空间分布数据服务 建设用地空间分布数据服务 地形、地貌、土壤数据服务 分坡度耕地数据服务 全国大宗农作物种植范围空间分布数据服务
多种卫星遥感数据反演植被覆盖度数据服务 地表反照率数据服务 比辐射率数据服务 地表温度数据服务 地表蒸腾与蒸散数据服务 归一化植被指数数据服务 叶面积指数数据服务 净初级生产力数据服务 净生态系统生产力数据服务 生态系统总初级生产力数据服务 生态系统类型分布数据服务 土壤类型质地养分数据服务 生态系统空间分布数据服务 增强型植被指数数据服务
多年平均气温空间分布数据服务 多年平均降水量空间分布数据服务 湿润指数数据服务 大于0℃积温空间分布数据服务 光合有效辐射分量数据服务 显热/潜热信息数据服务 波文比信息数据服务 地表净辐射通量数据服务 光合有效辐射数据服务 温度带分区数据服务 山区小气候因子精细数据服务
全国夜间灯光指数数据服务 全国GDP公里格网数据服务 全国建筑物总面积公里格网数据服务 全国人口密度数据服务 全国县级医院分布数据服务 人口调查空间分布数据服务 收入统计空间分布数据服务 矿山面积统计及分布数据服务 载畜量及空间分布数据服务 农作物种植面积统计数据服务 农田分类面积统计数据服务 农作物长势遥感监测数据服务 医疗资源统计数据服务 教育资源统计数据服务 行政辖区信息数据服务
Landsat 8 高分二号 高分一号 SPOT-6卫星影像 法国Pleiades高分卫星 资源三号卫星 风云3号 中巴资源卫星 NOAA/AVHRR MODIS Landsat TM 环境小卫星 Landsat MSS 天绘一号卫星影像
Private Sub showLegend()
If Not pGroupElement Is Nothing Then
pGroupElement.ClearElements()
End If
Dim graphicsContainer As IGraphicsContainer
graphicsContainer = frmMain.AxPageLayoutCtl.GraphicsContainer
Dim pLegend As ILegend
Dim pLegendItem As ILegendItem
Dim mapSurround As IMapSurround
Dim mapFrame As IMapFrame
mapFrame =
graphicsContainer.FindFrame(frmMain.AxPageLayoutCtl.ActiveView.FocusMap)
If mapFrame Is Nothing Then Exit Sub
Dim uID As UID = New UIDClass
uID.Value = "esriCarto.Legend"
Dim mapSurroundFrame As IMapSurroundFrame
mapSurroundFrame = mapFrame.CreateSurroundFrame(uID, Nothing)
If mapSurroundFrame Is Nothing Then Return
If mapSurroundFrame.MapSurround Is Nothing Then Return
mapSurroundFrame.MapSurround.Name = "Legend"
mapSurround = mapSurroundFrame.MapSurround
pLegend = mapSurround
pLegend.Title = txtLegendTitle.Text
Dim pLForm As ILegendFormat
pLForm = New LegendFormat
If Not Me.mAreaStyleItem Is Nothing Then
pLForm.DefaultAreaPatch = Me.mAreaStyleItem.Item
End If
If Not Me.mLineStyleItem Is Nothing Then
pLForm.DefaultLinePatch = Me.mLineStyleItem.Item
End If
With pLForm
.DefaultPatchWidth = CDbl(txtWidth3.Text)
.DefaultPatchHeight = CDbl(txtHeight3.Text)
.HeadingGap = CDbl(Me.txtHeadingGap.Text)
.TitleGap = CDbl(Me.txtTitleGap.Text)
.TextGap = CDbl(Me.txtTextGap.Text)
.VerticalPatchGap =
CDbl(Me.txtPatch.Text)
.VerticalItemGap = CDbl(Me.txtVerticalItemGap.Text)
.HorizontalItemGap = CDbl(Me.txtColumn.Text)
.HorizontalPatchGap = CDbl(Me.txtPatchLabel.Text)
If Me.rbtLeft.Checked = True Then
.TitlePosition =
esriRectanglePosition.esriLeftSide
ElseIf Me.rbtRight.Checked = True Then
.TitlePosition =
esriRectanglePosition.esriRightSide
End If
End With
Dim pTextSym As ITextSymbol
pTextSym = New TextSymbol
Dim pColor As IRgbColor
pColor = New RgbColor
With txtLegendTitle.ForeColor
pColor.Red = .R
pColor.Green = .G
pColor.Blue = .B
End With
pTextSym.Color = pColor
pTextSym.Font =
ESRI.ArcGIS.ADF.COMSupport.OLE.GetIFontDispFromFont(txtLegendTitle.Font)
pLForm.TitleSymbol = pTextSym
pLegend.Format = pLForm
pLegend.ClearItems()
Dim i As Integer
For i = 0 To lbxLayerLegend.Items.Count - 1
pLegendItem = New HorizontalLegendItem
With pLegendItem
.Columns =
Me.nudColumnNum.Value
Dim temp As String
temp =
lbxLayerLegend.GetItemText(lbxLayerLegend.Items.Item(i))
Dim j As Integer
Dim pFeatlyr As IFeatureLayer
For j = 0 To
frmMain.AxPageLayoutCtl.ActiveView.FocusMap.LayerCount - 1
pFeatlyr =
frmMain.AxPageLayoutCtl.ActiveView.FocusMap.Layer(j)
If pFeatlyr.Name = temp
Then
Exit For
End If
Next
.Layer =
frmMain.AxPageLayoutCtl.ActiveView.FocusMap.Layer(j)
.ShowDescriptions = True
.ShowHeading = True
.ShowLabels = True
.ShowLayerName = True
End With
pLegend.AddItem(pLegendItem)
Next
Dim pFrameProp As IFrameProperties
pFrameProp = mapSurroundFrame
If Not Me.mFrameStyleItem Is Nothing Then
pFrameProp.Border = Me.mFrameStyleItem.Item
End If
If Not Me.mBackColorStyleItem Is Nothing Then
pFrameProp.Background =
Me.mBackColorStyleItem.Item
End If
If Not Me.mShadowStyleItem Is Nothing Then
pFrameProp.Shadow = Me.mShadowStyleItem.Item
End If
Dim envelope As IEnvelope = New EnvelopeClass
envelope.PutCoords(1, 1, 3.4, 2.4)
Dim element As IElement
element = mapSurroundFrame
element.Geometry = envelope
pGroupElement.AddElement(element)
frmMain.AxPageLayoutCtl.AddElement(pGroupElement, Type.Missing,
Type.Missing, "Legend", 0)
frmMain.AxPageLayoutCtl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics,
Nothing, Nothing)
End Sub