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

MapScript.Ja - classObj.insertStyle Diff

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

!!classObj.insertStyle メソッド

!!!説明
スタイルのコピーをスタイル配列の指定したインデックスに挿入する
public int insertStyle(
    styleObj style,
    int index
);

Public Function insertStyle(ByVal style As styleObj, ByVal index As Integer) As Integer

!!!サンプル
!!!!コード
Dim _map As mapObj = New mapObj("")
Dim _layer As layerObj = New layerObj(_map)
Dim _class As classObj = New classObj(_layer)
Dim _style As styleObj
Dim intRet As Integer
_class.numstyles = 4
_style = _class.getStyle(1)
_style.angle = 270
intRet = _class.insertStyle(_style, 3)

Debug.WriteLine("Retuen:" & intRet.ToString & " " & _class.getStyle(3).angle.ToString)
→結果 Retuen:3 270
!!!!マップファイル
    CLASS
      METADATA
      END
      STYLE
        ANGLE 360
        SYMBOL 0
      END
      STYLE
        ANGLE 270
        SYMBOL 0
      END
      STYLE
        ANGLE 360
        SYMBOL 0
      END
      STYLE
        ANGLE 270
        SYMBOL 0
      END
      STYLE
        ANGLE 360
        SYMBOL 0
      END
    END
!!!参照
[[classObj メンバ]] | [[(global) 名前空間|http://wiki.fdiary.net/MapScriptJa]]