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

MapScript.Ja - layerObj.addFeature Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

!!layerObj.addFeature メソッド
!!!説明
このレイヤーにインラインで地物を追加する(動的なレイヤー)
public int addFeature(
    shapeObj shape
);

Public Function addFeature(ByVal shape As shapeObj) As Integer

!!!サンプル
!!!!コード
Dim _map As New mapObj("")
Dim _layer As New layerObj(_map)
Dim _shape As New shapeObj(MS_LAYER_TYPE.MS_LAYER_LINE)
Dim _line As New lineObj()
Dim _pt1 As New pointObj(-141, 42, 0, 0)
Dim _pt2 As New pointObj(-52, 83, 0, 0)

intRet = _line.add(_pt1)
intRet = _line.add(_pt2)
intRet = _shape.add(_line)
intRet = _layer.addFeature(_shape)
!!!!マップファイル
  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
        -141 42
        -52 83
      END
    END
  END
!!!参照
[[layerObj メンバ]] | [[(global) 名前空間|http://wiki.fdiary.net/MapScriptJa]]