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

MapScript.Ja - mapObj.removeLayer Diff

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

!!mapObj.removeLayer メソッド
!!!説明
引数で与えられたインデックスのレイヤーを削除する
public layerObj removeLayer(
    int index
);

Public Function removeLayer(ByVal index As Integer) As layerObj
!!!サンプル
!!!!コード
Dim _map As New mapObj("")
Dim _layer As New layerObj(_map)
Dim _class As New classObj(_layer)
Dim _style As New styleObj(_class)
Dim _layer2 As New layerObj(_map)

_map.removeLayer(1)
Debug.WriteLine(_map.numlayers.ToString)

→結果 1
!!!!マップファイル
  LAYER
    DATA "countries_simpl"
    LABELITEM "NAME"
      METADATA
      END
    NAME "World"
    PROJECTION
      "init=epsg:4326"
    END
    SIZEUNITS PIXELS
    STATUS DEFAULT
    TEMPLATE "template.html"
    TOLERANCEUNITS PIXELS
    TYPE POLYGON
    UNITS METERS
    CLASS
      LABEL
        ANGLE 0.000000
        ANTIALIAS TRUE
        FONT "msgothic"
        MAXSIZE 256
        MINSIZE 4
        SIZE 12
        TYPE TRUETYPE
        BUFFER 0
        COLOR 0 0 0
        ENCODING "SJIS"
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        PARTIALS TRUE
        POSITION CL
      END
      METADATA
      END
      STYLE
        ANGLE 360
        COLOR 200 200 200
        OUTLINECOLOR 100 100 100
        SYMBOL 0
      END
    END
  END
!!!参照

[[mapObj メンバ]] | [[(global) 名前空間|http://wiki.fdiary.net/MapScriptJa]]