|
阅读:1486回复:1
请各位大侠帮帮忙:Mapx中图元如何删除??
<P>我在VB中实现了在已知坐标的情况下在地图上标明5个点的位置,代码如下:</P>
<P>Dim ggLayer As MapXLib.Layer<BR>Dim ggStyle As MapXLib.Style<BR>Dim gg As MapXLib.Feature</P> <P>Set ggLayer = Map1.Layers.CreateLayer("ggLayer", , 1)<BR>Set Map1.Layers.AnimationLayer = ggLayer<BR>Set ggStyle = Map1.Layers(1).Style</P> <P>With ggStyle<BR> .SymbolFont.Name = "mapinfo transportation"<BR> .SymbolCharacter = 97<BR> .SymbolFont.Size = 25<BR> .SymbolFontColor = miColorBlue<BR>End With</P> <P>Dim f As MapXLib.Feature<BR>Dim p As New MapXLib.Point<BR>Dim x, y As Double</P> <P>x = 104.123<BR>y = 28.211</P> <P>For i = 1 To 5<BR> p.Set x, y<BR> Set gg = Map1.FeatureFactory.CreateSymbol(p, ggStyle)<BR> Set f = Map1.Layers("ggLayer").AddFeature(gg)<BR> x = x + 0.09<BR> y = y + 0.05<BR>Next</P> <P>现在的问题是,我应该如何将其中的一个点删除?比如说第三个点,坐标为X=104.141,y=28.229,应该如何处理??</P> <P>万望赐教,不胜感激!!</P> |
|
|
1楼#
发布于:2006-06-29 13:33
Map1.Layers.DeleteFeature (i)
|
|