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

mapObj.insertLayer

mapObj.insertLayer メソッド

説明

引数で与えられたインデックスにレイヤーを追加します

public int insertLayer(
   layerObj layer,
   int index
);
Public Function insertLayer(ByVal layer As layerObj, ByVal index As Integer) As Integer

サンプル

コード
Dim _map As New mapObj("")
Dim _layer As New layerObj(_map)
Dim _layer3 As layerObj

_layer3 = _layer.clone
_layer3.name = "New World"
_map.insertLayer(_layer3, 0)
Debug.WriteLine(_map.getLayer(0).name)
マップファイル
 LAYER
   DATA "countries_simpl"
   LABELITEM "NAME"
     METADATA
     END
   NAME "New World"
   SIZEUNITS PIXELS
   STATUS DEFAULT
   TOLERANCEUNITS PIXELS
   TYPE POLYGON
   UNITS METERS
   CLASS
     METADATA
     END
     STYLE
       ANGLE 360
       COLOR 200 200 200
       OUTLINECOLOR 100 100 100
       SYMBOL 0
     END
   END
 END

 LAYER
   DATA "countries_simpl"
     METADATA
     END
   NAME "World"
   SIZEUNITS PIXELS
   STATUS DEFAULT
   TOLERANCEUNITS PIXELS
   TYPE POLYGON
   UNITS METERS
   CLASS
     METADATA
     END
     STYLE
       ANGLE 360
       SYMBOL 0
     END
   END
 END

参照

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

Last modified:2007/02/15 16:49:37
Keyword(s):
References:[mapObj メンバ]