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

MapScript.Ja - mapscript.msIO_getStdoutBufferString Diff

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

!!mapscript.msIO_getStdoutBufferString メソッド
!!!説明
現在のstdoutバッファコンテンツを取得
public static string msIO_getStdoutBufferString();

Public Shared Function msIO_getStdoutBufferString() As String
!!!サンプル
!!!!コード
Dim _map As New mapObj("")
Dim _owsRequest As New OWSRequest

  mapscript.msIO_resetHandlers()
_map.setMetaData("ows_onlineresource", "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?")
_owsRequest.setParameter("SERVICE", "WMS")
_owsRequest.setParameter("VERSION", "1.1.1")
_owsRequest.setParameter("REQUEST", "Getcapabilities")
_owsRequest.setParameter("LAYERS", "oldcity")
_owsRequest.setParameter("FORMAT", "image/png")
_owsRequest.setParameter("SRS", "EPSG:4326")
_owsRequest.setParameter("BBOX", "139.686375,35.619455,139.833112,35.739396")
_owsRequest.setParameter("WIDTH", "256")
_owsRequest.setParameter("HEIGHT", "256")
mapscript.msIO_installStdoutToBuffer()
_map.OWSDispatch(_owsRequest)
Debug.WriteLine(mapscript.msIO_getStdoutBufferString())

→結果

Content-type: application/vnd.ogc.wms_xml

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"
[
<!ELEMENT VendorSpecificCapabilities EMPTY>
]>  <!-- end of DOCTYPE declaration -->

<WMT_MS_Capabilities version="1.1.1">

<!-- MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -->

<Service>
  <Name>OGC:WMS</Name>
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
  <Title>MS</Title>
  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/>
</Service>

<Capability>
  <Request>
    <GetCapabilities>
      <Format>application/vnd.ogc.wms_xml</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Post>
        </HTTP>
      </DCPType>
    </GetCapabilities>
    <GetMap>
      <Format>image/gif</Format>
      <Format>image/png</Format>
      <Format>image/png; mode=24bit</Format>
      <Format>image/jpeg</Format>
      <Format>image/wbmp</Format>
      <Format>image/tiff</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Post>
        </HTTP>
      </DCPType>
    </GetMap>
    <GetFeatureInfo>
      <Format>text/plain</Format>
      <Format>application/vnd.ogc.gml</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Post>
        </HTTP>
      </DCPType>
    </GetFeatureInfo>
    <DescribeLayer>
      <Format>text/xml</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Post>
        </HTTP>
      </DCPType>
    </DescribeLayer>
    <GetLegendGraphic>
      <Format>image/gif</Format>
      <Format>image/png</Format>
      <Format>image/png; mode=24bit</Format>
      <Format>image/jpeg</Format>
      <Format>image/wbmp</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Post>
        </HTTP>
      </DCPType>
    </GetLegendGraphic>
    <GetStyles>
      <Format>text/xml</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"/></Post>
        </HTTP>
      </DCPType>
    </GetStyles>
  </Request>
  <Exception>
    <Format>application/vnd.ogc.se_xml</Format>
    <Format>application/vnd.ogc.se_inimage</Format>
    <Format>application/vnd.ogc.se_blank</Format>
  </Exception>
  <VendorSpecificCapabilities />
  <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0"/>
  <Layer>
    <Name>MS</Name>
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
    <Title>MS</Title>
<!-- WARNING: Mandatory mapfile parameter '(at least one of) MAP.PROJECTION, LAYER.PROJECTION or wms_srs metadata' was missing in this context. -->
    <SRS></SRS>
    <LatLonBoundingBox minx="139.686" miny="35.6061" maxx="139.833" maxy="35.7528" />
<!-- WARNING: This layer has its status set to DEFAULT and will always be displayed when doing a GetMap request even if it is not requested by the client. This is not in line with the expected behavior of a WMS server. Using status ON or OFF is recommended. -->
    <Layer queryable="0" opaque="0" cascaded="1">
        <Name>oldcity</Name>
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
        <Title>oldcity</Title>
        <SRS>EPSG:4326</SRS>
    </Layer>
  </Layer>
</Capability>
</WMT_MS_Capabilities>
!!!!マップファイル
  WEB
    IMAGEPATH "c:\temp\"
    IMAGEURL "/tmp"
      METADATA
        "ows_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/ms/ecw.map?"
      END
    QUERYFORMAT text/html
    LEGENDFORMAT text/html
    BROWSEFORMAT text/html
  END
!!!参照

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