Create  Edit  Diff  FrontPage  Index  Search  Changes  History  Source  RSS  wikifarm  Login

layerObj.getNumFeatures

layerObj.getNumFeatures メソッド

説明

インラインで追加された地物の数を返します

public int getNumFeatures();
Public Function getNumFeatures() As Integer

サンプル

コード
Dim _map As New mapObj("")
Dim _layer As New layerObj(_map)
Dim _shape As New shapeObj(MS_LAYER_TYPE.MS_LAYER_POLYGON)
Dim _line As New lineObj()
Dim _pt1 As New pointObj(-141, 42, 0, 0)
Dim _pt2 As New pointObj(-52, 83, 0, 0)
Dim _pt3 As New pointObj(-51, 82, 0, 0)
Dim _pt4 As New pointObj(-51, 41, 0, 0)

intRet = _line.add(_pt1)
intRet = _line.add(_pt2)
intRet = _line.add(_pt3)
intRet = _line.add(_pt4)
intRet = _line.add(_pt1)

intRet = _shape.add(_line)
intRet = _layer.addFeature(_shape)

Debug.WriteLine(_layer.getNumFeatures.ToString)

→結果 1
マップファイル
 LAYER
   DATA "countries_simpl"
     METADATA
     END
   NAME "World"
   SIZEUNITS PIXELS
   STATUS ON
   TOLERANCEUNITS PIXELS
   TYPE POLYGON
   UNITS METERS
   CLASS
     METADATA
     END
     STYLE
       ANGLE 360
       COLOR 200 200 200
       OUTLINECOLOR 100 100 100
       SYMBOL 0
     END
   END
   FEATURE
     POINTS
       -142 41
       -142 82
       -51 82
       -51 41
       -142 41
     END
   END
 END

参照

layerObj メンバ | (global) 名前空間

Last modified:2007/02/15 14:11:04
Keyword(s):
References:[layerObj メンバ]