Ticket #670 (closed enhancement: duplicate)
Expose WMS dispatching to mapscript
| Reported by: | sgillies@… | Owned by: | sdlime |
|---|---|---|---|
| Priority: | lowest | Milestone: | FUTURE |
| Component: | MapScript-SWIG | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: |
Description
The beginning is to expose the cgiRequestObj structure to mapscript
(as class OWSRequest) and add a loadOWSParameters method to mapObj
that functions like loadMapContext.
This allows us to create lightweight WMS services like this
Python example
import mapscript
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.loadOWSParameters('1.1.0', wms_request)
# Render the Map
img = wms_map.draw()
Change History
Note: See
TracTickets for help on using
tickets.
