publicBitmapPointStyle(
stringstrName,
BitmapStylesstyle,
Colorcolor,
doublepointSize
);
strName 图片的相对路径加上名称。一般图片的根路径是 X:\Program Files\Common Files\MapInfo\MapXtreme\6.x\CustSymb X为安装盘。同时图片也放在那里。mapxtreme
style 图片的样式。
None: 按默认的状态显示。并且白色部分将透明。
ShowWhiteBackground: 显示白色部分。
ApplyColor: 在标识中的透明部分将用第三个参数的颜色填充.
NativeSize: 按标识的真实大小和象素显示,第四项参数将无效.
color 白色部分的填充色
pointSize 标识大小
下面分别介绍这几种图标如何在Web中添加展示,下面列出相关代码。
Code
protectedvoidPage_Load(objectsender,System.EventArgse)
{
if(StateManager.IsManualState())
{
MapInfo.Mapping.MapmyMap=GetMapObj();
if(Session.IsNewSession)
{
MapInfo.WebControls.MapControlModelcontrolModel=MapControlModel.SetDefaultModelInSession();
//instanciateAppStateManagerclass
AppStateManagermyStateManager=newAppStateManager();
//putcurrentmapaliastostatemanagerdictionary
myStateManager.ParamsDictionary[StateManager.ActiveMapAliasKey]=this.MapControl1.MapAlias;
//putstatemanagertosession
StateManager.PutStateManagerInSession(myStateManager);
#region测试代码
if(myMap!=null)
{
if(myMap.Layers["TempLayerAlias"]!=null)
{
myMap.Layers.Remove("TempLayerAlias");
}
}
//Needtocleanup"dirty"temptableleftbyothercustomerrequests.
MapInfo.Engine.Session.Current.Catalog.CloseTable("TempTableAlias");
//NeedtocleartheDefautlSelection.
MapInfo.Engine.Session.Current.Selections.DefaultSelection.Clear();
//CreatatemptableandAddPintPointCommandwilladdfeaturesintoit.
MapInfo.Data.TableInfoMemTableti=newMapInfo.Data.TableInfoMemTable("TempTableAlias");
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-36540-2.html
这蛆培养的这么肥
长长中国军人的血性劲儿
期待宋歌手