MapScript 4.01 classObjクラス

classObjインスタンスはlayerObjインスタンスと関連します。

+-------+ 0..*     1 +-------+
| Class | <--------> | Layer |
+-------+            +-------+

その他classObjの重要な組合はstyleObjlabelObjhashTableObj

+-------+ 1     0..* +-------+
| Class | ---------> | Style |
+-------+            +-------+

+-------+ 1     0..1 +-------+
| Class | ---------> | Label |
+-------+            +-------+

+-------+ 1        1 +-----------+
| Class | ---------> | HashTable |
+-------+            |    --     |
                     | metadata  |
                     +-----------+

MapServer V4.1より、複数クラススタイルを設定することが可能になりました。詳細はstyleObjを参照してください。

4.1.1 classObj属性

connoteadebug : int

MS_TRUE or MS_FALSE

connoteakeyimage : string

TODO

connotealabel : labelObj immutable

ラベルクラスの定義です。

connotealayer : layerObj immutable

親レイヤへの参照です。

connoteamaxscale : float

このクラス描画する最大縮尺です。

connoteametadata : hashTableObj immutable

このクラスのメッタハッシュテーブルです。

connoteaminscale : float

このクラス描画する最小縮尺です。

connoteaname : string

レイヤ内でユニークの文字列です。

connoteanumstyles : int

このクラス内のスタイル数です。

connoteastatus : int

MS_ON或いはMS_OFF。このクラスに含まれているフィーチャーを表示/非表示のフラグです。

connoteatemplate : string

検索結果用のテンプレートです。

connoteatitle : string

凡例表示用のテキストです。

connoteatype : int

親レイヤのレイヤタイプです。

4.1.2 classObjメソッド

connoteanew classObj( [ layerObj parent_layer=NULL ] ) : classObj

親レイヤインスタンス内にclassObjを新規作成して、既存クラス配列の最後に追加します。レイヤパラメータを指定により、親レイヤ以外のレイヤにもクラスインスタンスの作成が可能です。

connoteaclone( ) : classObj

独立のコピーを返します、返したコピーが親レイヤが持っていません。

connoteacreateLegendIcon( mapObj map, layerObj layer, int width, int height ) : imageObj

凡例アイコンを作成して、imageObjを返します。

connoteadrawLegendIcon( mapObj map, layerObj layer, int width, int height, imageObj image, int dstx, int dsty ) : int

指定されたイメージに(dstx, dsty)のところで凡例アイコンを描画します。戻り値はMS_SUCCESS或いはMS_FAILURE。

connoteagetExpressionString() : string

クラスオブジェクトのexpression文字列を返します。

connoteagetFirstMetaDataKey() : string

メッタハッシュテーブルから、最初のキーを返します。getNextMetaDataKey()でその他のキーも取得できます。

connoteagetMetaData( string key ) : string

キーを与えて、メッタハッシュテーブル内に該当値を返します。

connoteagetNextMetaDataKey( string lastkey ) : string

メッタハッシュテーブルの次のキーを返します、次のキーは最後のキーになる場合は、NULLを戻ります。
最後のキーはNULLになった場合は、繰り返し最初のキーを返します。
注意
現時点、getFirstMetaDataKey(), getMetaData()とgetNextMetaDataKey()は非推奨となっています、将来的に削除される可能性があります。代わりに直接metadataをアクセスしてください。hashTableObjを参照してください。

connoteagetStyle( int index ) : styleObj

インデックスを与えて、styleObjオブジェクトを返します。

connoteagetTextString() : string

Return a string representation of the text enclosed in the quote characters appropriate to the text expression type (logical or simple string).

connoteainsertStyle( styleObj style [, int index=-1 ] ) : int

引数indexは指定された位置にstyleのコピーを追加します。indexのディフォルト値は-1、配列の最後になります。
追加されたstyleの実際のインデックスを返します。

connoteamoveStyleDown( int index ) : int

indexで指定したstyleObjのインデックスを+1にします。

connoteamoveStyleUp( int index ) : int

indexで指定したstyleObjのインデックスを-1にします。

connotearemoveStyle( int index ) : styleObj

indexを与えて、該当styleObjを削除して、削除されたstyleObjのコピーを返します。

connoteasetExpression( string expression ) : int

クラスオブジェクトのexpression文字列を設定します。戻り値はMS_SUCCESS或いはMS_FAILUIRE。

connoteasetMetaData( string key, string value ) : int

classObjのmetadataに項目を追加します。戻り値はMS_SUCCESS或いはMS_FAILUIRE。
注意
現時点、setMetaData()メソッドは非推奨となっています、将来的に削除される可能性があります。代わりに直接metadataをアクセスしてください。hashTableObjを参照してください。

connoteasetText( string text ) : int

Set text string where text is a MapServer text expression. 戻り値はMS_SUCCESS或いはMS_FAILUIRE。

Add a new comment
Page tags: mapscript mapserver
page_revision: 7, last_edited: 1208528452|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License