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

MapScript.Ja - mapObj.drawLabelCache Diff

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

!!mapObj.drawLabelCache メソッド
!!!説明
この地図のラベルキャッシュを描画する
public int drawLabelCache(
    imageObj image
);

Public Function drawLabelCache(ByVal image As imageObj) As Integer

!!!サンプル
!!!!コード
Dim _map As mapObj = New mapObj("")
Dim _layer As New layerObj(_map)

_layer.labelcache = mapscript.MS_TRUE
_layer.postlabelcache = mapscript.MS_TRUE
_map.drawLabelCache(_img)

""ラベルを描画したいレイヤーで、ラベルキャッシュを有効にして、
""postlabelcacheも有効にした場合、drawLabelCache()を実行することで、
""描画の最後にラベルを描くことができる
!!!!マップファイル
  LAYER
    DATA "countries_simpl"
    LABELITEM "NAME"
      METADATA
      END
    NAME "World"
    POSTLABELCACHE TRUE
    SIZEUNITS PIXELS
    STATUS DEFAULT
    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]]