From 733a4a0267a3df65a33ab26e552c320c46ab83cc Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Fri, 13 May 2011 19:56:57 +0000 Subject: [PATCH] Inclusão da ferramenta "tela remota" --- admin/admin.db | Bin 71680 -> 0 bytes classesphp/mapa_googleearth.php | 61 +++++++++++++++++++++++++++++++++++++------------------------ ferramentas/telaremota/googleearth1.php | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ferramentas/telaremota/googlemaps1.php | 42 ++++++++++++++++++++++++++++++++++++++++++ ferramentas/telaremota/index.js.php | 3 +++ ferramentas/telaremota/openlayers1.php | 42 ++++++++++++++++++++++++++++++++++++++++++ ferramentas/telaremota/recuperamapa.php | 35 +++++++++++++++++++++++++++++++++++ 7 files changed, 332 insertions(+), 24 deletions(-) create mode 100644 ferramentas/telaremota/googleearth1.php diff --git a/admin/admin.db b/admin/admin.db index 637391a..e70a9b2 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/classesphp/mapa_googleearth.php b/classesphp/mapa_googleearth.php index cef4456..577152d 100644 --- a/classesphp/mapa_googleearth.php +++ b/classesphp/mapa_googleearth.php @@ -74,6 +74,9 @@ function retornaKml(){ //$url = $servidor.'http://localhost:80/cgi-bin/mapserv.exe?map=c:/ms4w/tmp/ms_tmp/rPzBHuOtQa/rPzBHuOtQa.map&width=1500&height=1500&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4291&STYLES=&FORMAT=image/jpeg&TRANSPARENT=TRUE&layers=estadosl'; $serv = strtolower($protocolo[0]) . '://'.$_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] ? ':'.$_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF']; $url = $serv."?g_sid=".$_GET["g_sid"]."&WIDTH=1500&HEIGHT=1500&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE&layer=".$_GET["layer"]."&TIPOIMAGEM=".$_GET["TIPOIMAGEM"]; + if(isset($_GET["telaR"])){ + $url .= "&telaR=".$_GET["telaR"]; + } $kml = ' @@ -136,44 +139,54 @@ function retornaWms($map_file,$postgis_mapa){ {$mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} } $layersNames = $mapa->getalllayernames(); - foreach ($layersNames as $layerName) - { - $l = $mapa->getLayerByname($layerName); - if ($l->getmetadata("classesnome") != "") - { - include_once("funcoes_gerais.php"); - autoClasses(&$l,$mapa); - } - if($layerName != $_GET["layer"]) - {$l->set("status",MS_OFF);} - if($layerName == $_GET["layer"] || $l->group == $_GET["layer"] && $l->group != "") + $o = $mapa->outputformat; + $o->set("imagemode",MS_IMAGEMODE_RGBA); + if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alterado + foreach ($layersNames as $layerName) { - $l->set("status",MS_DEFAULT); - if (isset($postgis_mapa) && ($postgis_mapa != "") && ($postgis_mapa != " ")) + $l = $mapa->getLayerByname($layerName); + if ($l->getmetadata("classesnome") != "") + { + include_once("funcoes_gerais.php"); + autoClasses(&$l,$mapa); + } + if($layerName != $_GET["layer"]) + {$l->set("status",MS_OFF);} + if($layerName == $_GET["layer"] || $l->group == $_GET["layer"] && $l->group != "") { - if ($l->connectiontype == MS_POSTGIS) + $l->set("status",MS_DEFAULT); + if (isset($postgis_mapa) && ($postgis_mapa != "") && ($postgis_mapa != " ")) { - $lcon = $l->connection; - if (($lcon == " ") || ($lcon == "") || (in_array($lcon,array_keys($postgis_mapa)))) + if ($l->connectiontype == MS_POSTGIS) { - if(($lcon == " ") || ($lcon == "")) - {$l->set("connection",$postgis_mapa);} - else - {$l->set("connection",$postgis_mapa[$lcon]);} + $lcon = $l->connection; + if (($lcon == " ") || ($lcon == "") || (in_array($lcon,array_keys($postgis_mapa)))) + { + if(($lcon == " ") || ($lcon == "")) + {$l->set("connection",$postgis_mapa);} + else + {$l->set("connection",$postgis_mapa[$lcon]);} + } } - } + } } + $l->set("template","none.htm"); } - $l->set("template","none.htm"); + } + else{ + $mapa->selectOutputFormat("jpeg"); + $of = $mapa->outputformat; + $of->set("imagemode",MS_IMAGEMODE_RGBA); + $of->set("driver","AGG/PNG"); + $of->set("transparent",MS_ON); } $mapa->setsize($_GET["WIDTH"],$_GET["HEIGHT"]); if(isset($_GET["mapext"])){ $mapext = explode(" ",$_GET["mapext"]); $mapa->setExtent($mapext[0],$mapext[1],$mapext[2],$mapext[3]); } - $o = $mapa->outputformat; - $o->set("imagemode",MS_IMAGEMODE_RGBA); + $legenda = $mapa->legend; $legenda->set("status",MS_OFF); $escala = $mapa->scalebar; diff --git a/ferramentas/telaremota/googleearth1.php b/ferramentas/telaremota/googleearth1.php new file mode 100644 index 0000000..19c2585 --- /dev/null +++ b/ferramentas/telaremota/googleearth1.php @@ -0,0 +1,173 @@ + + + + + + + + + + + + + +
+ + + diff --git a/ferramentas/telaremota/googlemaps1.php b/ferramentas/telaremota/googlemaps1.php index b0c0606..22f07a9 100644 --- a/ferramentas/telaremota/googlemaps1.php +++ b/ferramentas/telaremota/googlemaps1.php @@ -12,6 +12,47 @@