Changes between Version 13 and Version 14 of WMSWrapper


Ignore:
Timestamp:
2021-12-22T12:12:45-04:00 (3 years ago)
Author:
Jeff McKenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WMSWrapper

    v13 v14  
    22
    33 - source: https://lists.ms4w.com/pipermail/ms4w-users/2019-May/000343.html
    4  - note: likely solution is included in next !MapServer release ([[https://github.com/mapserver/mapserver/pull/5778/files#diff-127c91f36292dd4e75e861fb07c29f1f|diff]])
    54
    6 == SWIG !MapScript [ This is now working and is resolved :) ] ==
     5== SWIG !MapScript (MS4W 5.x) ==
     6
    77{{{
    88#!php
    99<?php
    1010
    11 include("../includes/phpmapscriptng-swig/mapscript.php");
    1211$oMap= new mapObj($mymapfile);
    1312
     
    4948?>
    5049}}}
    51 
    52 == Old !MapScript ==
    53 
    54 {{{
    55 #!php
    56 <?php
    57 
    58 $oMap= ms_newMapObj($mymapfile);
    59 
    60 ms_ioinstallstdouttobuffer();
    61 
    62 $request = ms_newowsrequestobj();
    63 
    64 //Get Request
    65 foreach ($_GET as $k=>$v) {
    66     $request->setParameter($k, $v);
    67 }
    68 
    69 $oMap->owsdispatch($request);
    70 $oMap->free();
    71 unset($oMap);
    72 
    73 $contenttype = strtolower(ms_iostripstdoutbuffercontenttype());
    74 
    75 //Capabilities Request
    76 if ($contenttype == "application/vnd.ogc.wms_xml; charset=utf-8"){
    77     header('Content-type: application/xml; charset=utf-8');
    78     echo ms_iogetstdoutbufferstring();
    79 }
    80 
    81 //getMap jpeg
    82 else if ($contenttype == 'image/jpeg'){
    83     header('Content-type: image/jpeg');
    84     echo ms_iogetStdoutBufferBytes();
    85 }
    86 
    87 ?>
    88 }}}