110,534
社区成员
发帖
与我相关
我的任务
分享
//首先是创建动画图层
Layer AnimationLayer = this.axMap.Layers.CreateLayer("AnimationLayer", null, 0, 50, new CoordSysClass());
this.axMap.Layers.AnimationLayer= AnimationLayer ;
Feature feature = new FeatureClass();
MapXLib.Point pt = new PointClass();
pt.Set(x, y);
Style style = new StyleClass();
//使用飞机图片
if (imgurl == "")
{
imgurl = "AMBU1-32.BMP";
}
style.SymbolType = SymbolTypeConstants.miSymbolTypeBitmap;
style.SymbolBitmapSize = 24; //飞机大小
style.SymbolBitmapTransparent = true;
style.SymbolBitmapName = imgurl;
feature = this._mapObject.FeatureFactory.CreateSymbol(pt, style);
feature.KeyValue = "飞机";
this.axMap.Layers.AnimationLayer.AddFeature(feature, Type.Missing);
feature.Update(Type.Missing, Type.Missing);