古龙潭
路人甲
路人甲
  • 注册日期2005-02-24
  • 发帖数51
  • QQ
  • 铜币139枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1492回复:1

mapcontrol中点击显示自定义符号问题

楼主#
更多 发布于:2006-04-24 10:29
请问如何将批量的bmp图导入到style文件中,如何在mapcontrol中点击显示这些符号呢?
喜欢0 评分0
天生我材必有用
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2006-04-26 17:01
<P>下面给出了如何搜索和显示符号</P>
<P>        Dim pStyleGalleryItem As IStyleGalleryItem<BR>        Dim pEnumStyleGallery As IEnumStyleGalleryItem<BR>        Dim pStyleGallery As IStyleGallery</P>
<P>        pStyleGallery = New ServerStyleGalleryClass</P>
<P><BR>        Dim pSymbol As ISymbol<BR>        Dim bmp As Bitmap<BR>        Dim imgIndex As Integer<BR>        imgIndex = -1</P>
<P><BR>        Dim pStylStor As IStyleGalleryStorage<BR>        pStylStor = pStyleGallery<BR>        pStylStor.TargetFile = pServerStylePath<BR>        pStylStor.AddFile(pServerStylePath)</P>
<P>        pEnumStyleGallery = pStyleGallery.Items(pSymbolType, "", "") 'pServerStylePath,Default</P>
<P>        'If Not IsNothing(pEnumStyleGallery) Then<BR>        pEnumStyleGallery.Reset()<BR>        'pStyleGalleryItem = Nothing<BR>        pStyleGalleryItem = pEnumStyleGallery.Next<BR>        'Else<BR>        '    Exit Sub<BR>        'End If<BR>        While Not pStyleGalleryItem Is Nothing<BR>            pSymbol = pStyleGalleryItem.Item<BR>     '这里你可以根据符号建立图片,添加到你的程序中显示</P>
<P><BR>            pStyleGalleryItem = pEnumStyleGallery.Next<BR>        End While</P>
<P>        System.Runtime.InteropServices.Marshal.ReleaseComObject(pEnumStyleGallery)<BR>        pServerStylePath = Nothing<BR>        pSymbolType = Nothing<BR>        pStyleGalleryItem = Nothing<BR>        pEnumStyleGallery = Nothing<BR>        pStyleGallery = Nothing</P>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
游客

返回顶部