- 积分
- 142
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-18
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
VectorLayer layer = new VectorLayer(ShapeTypes.Polygon);
layer.LegendScheme = LegendManage.CreateSingleSymbolLegendScheme(ShapeTypes.Polygon, Color.Transparent, 0);
layer.Visible = true;
layer.EditAddField("value", typeof(string));
int index = 0;
for (int j = 0; j < minlist.Count; j++)
{
double x = Convert.ToDouble(minlist[j].dm_long);
double y = Convert.ToDouble(minlist[j].dm_lat);
PolygonShape pp = new PolygonShape();
pp.Extent = new MeteoInfoC.Global.Extent(x, x, y, y);
layer.EditAddShape(pp);
layer.EditCellValue("value", index++, index);
}
layer.LabelSet.FieldName = "value";
layer.LabelSet.LabelFont = new Font("Tahoma", 10);
layer.LabelSet.LabelColor = Color.Red;
layer.LabelSet.YOffset = 0;
layer.AddLabels();
map.Layers.Add(layer);
//保存图片
map.ZoomToExtent(map.Extent);
map.ExportToPicture(config.hour_image_save + @"\" + filename + ".jpg");
叠加值然后导出图片,但是发现一个问题,如果MapView的宽和高设置比较小,有一些值显示不出来,如何始终显示? |
|