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

MapScript.Ja - layerObj.setProjection Diff

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

!!layerObj.setProjection メソッド
!!!説明
PROJ.4による投影法を設定します
public int setProjection(
    string proj4
);

Public Function setProjection(ByVal proj4 As String) As Integer

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

intRet = _layer.setProjection("init=epsg:4326")
Debug.WriteLine(_layer.getProjection)

→結果 +init=epsg:4326
intRet = _layer.setProjection("proj=latlong,ellps=WGS84")
Debug.WriteLine(_layer.getProjection)

→結果 +proj=latlong +ellps=WGS84
!!!!マップファイル
  LAYER
    DATA "countries_simpl"
      METADATA
      END
    NAME "World"
    PROJECTION
      "proj=latlong"
      "ellps=WGS84"
    END
    SIZEUNITS PIXELS
    STATUS DEFAULT
    TEMPLATE "template.html"
    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
!!!参照
[[layerObj メンバ]] | [[(global) 名前空間|http://wiki.fdiary.net/MapScriptJa]]