$v) { $req->setParameter($k, $v); if(strtolower($k) == "layers") {$tema = $v;} if(strtolower($k) == "layer") {$tema = $v;} } $listaepsg = $srs." EPSG:4291 EPSG:4326 EPSG:22521 EPSG:22522 EPSG:22523 EPSG:22524 EPSG:22525 EPSG:29101 EPSG:29119 EPSG:29120 EPSG:29121 EPSG:29122 EPSG:29177 EPSG:29178 EPSG:29179 EPSG:29180 EPSG:29181 EPSG:29182 EPSG:29183 EPSG:29184 EPSG:29185 EPSG:4674"; if(!isset($version)) {$req->setParameter("VeRsIoN","1.1.0");} $oMap = ms_newMapobj("../../aplicmap/ogcws.map"); $proto = "http" . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://"; $server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; $or = $proto.$server.$_SERVER['PHP_SELF']; // //parametros no nível maior // $oMap->setmetadata("ows_onlineresource",$or); $oMap->setmetadata("wms_onlineresource",$or); $oMap->setmetadata("wms_attribution_onlineresource",$proto.$server.dirname($_SERVER['PHP_SELF'])); $e = $oMap->extent; $extensaoMap = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); $codigoTema = "mascararegiao"; $nmap = ms_newMapobj("../../temas/".$codigoTema.".map"); $l = $nmap->getlayerbyname("mascararegiao"); $l->setmetadata("wms_extent",$extensaoMap); $l->setmetadata("ows_title","mascararegiao"); $l->setmetadata("ows_srs",$listaepsg); $l->set("status",MS_OFF); $c = $l->getclass(0); $c->setexpression('("['.$campo.']" != "'.$valor.'")'); ms_newLayerObj($oMap, $l); ms_ioinstallstdouttobuffer(); $oMap->owsdispatch($req); $contenttype = ms_iostripstdoutbuffercontenttype(); header("Content-type: $contenttype"); ms_iogetStdoutBufferBytes(); ms_ioresethandlers(); ?>