MapScript 4.17 OWSRequest
MapServerでOWSサポートするためのクラスです。簡単なWMSサービスを作成できます。
wms_map = mapscript.mapObj('wms.map') wms_request = mapscript.OWSRequest() # Convert application request parameters (req.args) for param, value in req.args.items(): wms_request.setParam(param, value) # Map loads parameters from OWSRequest, adjusting its SRS, extents, # active layers accordingly wms_map.loadWMSRequest('1.1.0', wms_request) # Render the Map img = wms_map.draw()
4.17.1 OWSRequest 属性
NumParams : int immutable
パラメータの数です。
postrequest : string
type : int
MS_GET_REQUEST或いはMS_POST_REQUEST。
4.17.2 OWSRequest メソッド
new OWSRequest( ) : OWSRequest
新インスタンスを作成します。
setParameter( string name, string value ) : void
パラメータ設定します。例:
request.setParameter('REQUEST', 'GetMap')
request.setParameter('BBOX', '-107.0,40.0,-106.0,41.0')
注:MapServerのOWSRequestは単一値だけサポートしています。
getName( int index ) : string
indexを与えてパラメータの名前を返します。
getValue( int index ) : string
indexを与えてパラメータの値を返します。
getValueByName( string name) : string
パラメータの名前を与えてパラメータの値を返します。
loadParams() : int
cgi環境変数(REQUEST_METHOD、QUERY_STRING、HTTP_COOKIE)よりOWSRequestオブジェクトを初期します。
集められる名前/値組の数を返します。
Add a new comment
page_revision: 3, last_edited: 1208672754|%e %b %Y, %H:%M %Z (%O ago)






