Commit a37e0a41e46c3c33f63edf753f1bd1f39a14822e

Authored by Edmar Moretti
1 parent 01d2d4de

Correção em ogc.htm e inclusão de metaestat na nova página em bootstrap

@@ -276,10 +276,16 @@ A:hover { @@ -276,10 +276,16 @@ A:hover {
276 temaOgc = temp[1]; 276 temaOgc = temp[1];
277 temaOgc = temaOgc.split("&"); 277 temaOgc = temaOgc.split("&");
278 temaOgc = temaOgc[0]; 278 temaOgc = temaOgc[0];
  279 + var name = temaOgc;
  280 + var value = temaOgc;
  281 + //verifica se eh metaestat
  282 + if(temaOgc.split("_")[0] == "metaestat"){
  283 + name = "metaestat";
  284 + }
279 var botao = { 285 var botao = {
280 checked: false, 286 checked: false,
281 - name: temaOgc,  
282 - value: temaOgc 287 + name: name,
  288 + value: value
283 }; 289 };
284 ogc_endereco(botao); 290 ogc_endereco(botao);
285 } 291 }
ogc/dicionario.js 0 → 100755
@@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
  1 +//veja em index.js o objeto que utiliza essa traducao
  2 +g_traducao_ogc =
  3 +{
  4 + "acesso" : [{
  5 + pt : "Endereços de acesso:",
  6 + en : "",
  7 + es : ""
  8 + }],
  9 + "wstodas" : [{
  10 + pt : "Webservice com todas as camadas",
  11 + en : "",
  12 + es : ""
  13 + }],
  14 + "wscamada" : [{
  15 + pt : "Webservice dessa camada",
  16 + en : "",
  17 + es : ""
  18 + }],
  19 + "linkpagina" : [{
  20 + pt : "Link para essa página",
  21 + en : "",
  22 + es : ""
  23 + }],
  24 + "getmap" : [{
  25 + pt : "Testar getmap",
  26 + en : "",
  27 + es : ""
  28 + }],
  29 + "legenda" : [{
  30 + pt : "Testar getLegendGraphic",
  31 + en : "",
  32 + es : ""
  33 + }],
  34 + "downwfs" : [{
  35 + pt : "Download shapefile via WFS",
  36 + en : "",
  37 + es : ""
  38 + }],
  39 + "vOl" : [{
  40 + pt : "visualizar com openLayers",
  41 + en : "",
  42 + es : ""
  43 + }],
  44 + "downCgeo" : [{
  45 + pt : "Download CSV via WFS com geometria",
  46 + en : "",
  47 + es : ""
  48 + }],
  49 + "downSgeo" : [{
  50 + pt : "Download CSV via WFS mas sem a geometria",
  51 + en : "",
  52 + es : ""
  53 + }],
  54 + "kmz" : [{
  55 + pt : "Download KMZ",
  56 + en : "",
  57 + es : ""
  58 + }],
  59 + "kml" : [{
  60 + pt : "Download KML",
  61 + en : "",
  62 + es : ""
  63 + }],
  64 + "explore" : [{
  65 + pt : "Explore a tabela de atributos",
  66 + en : "",
  67 + es : ""
  68 + }],
  69 + "jumbotron" : [{
  70 + pt : "Navegue pela &aacute;rvore ao lado para localizar o tema desejado. Clicando-se em um tema, &eacute; mostrado o endere&ccedil;o do servi&ccedil;o OGC. Os servi&ccedil;os s&atilde;o Web Wervices que possibilitam o acesso aos dados dispon&iacute;veis nessa instala&ccedil;&atilde;o do i3Geo. A lista de temas baseia-se nas configura&ccedil;&otilde;es espec&iacute;ficas de cada servidor onde o i3Geoest&aacute; instalado. Voc&ecirc; pode usar um Web Service para acessar os dados configurados nesse servidor por meio de outros softwares de geoprocessamento, como o <a href='http://www.gvsig.gva.es/index.php?id=gvsig&L=0'>gvSIG.</a> Para maiores informa&ccedil;&otilde;es sobre o uso de web services, veja <a href='http://www.opengeospatial.org/standards' target=blank>http://www.opengeospatial.org/standards</a>",
  71 + en : "",
  72 + es : ""
  73 + }],
  74 + "lista" : [{
  75 + pt : "Lista completa",
  76 + en : "",
  77 + es : ""
  78 + }],
  79 + "nomemeta" : [{
  80 + pt : "Cartogramas",
  81 + en : "",
  82 + es : ""
  83 + }],
  84 + "1" : [{
  85 + pt : "",
  86 + en : "",
  87 + es : ""
  88 + }]
  89 +};
1 function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templateCamadas){ 1 function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templateCamadas){
2 var r = function(retorno) { 2 var r = function(retorno) {
3 - var menus = retorno.data;  
4 - var nmenus = menus.length;  
5 - var i = 0;  
6 - var s = []; 3 + var menus = retorno.data,
  4 + nmenus = menus.length, i = 0, s = [], camadasRaiz, dataMenu, htmlMenus, grupos;
7 for(i=0; i<nmenus; i++){ 5 for(i=0; i<nmenus; i++){
8 - var camadasRaiz = "",  
9 - dataMenu = menus[i]; 6 + camadasRaiz = "";
  7 + dataMenu = menus[i];
10 if(dataMenu.temas){ 8 if(dataMenu.temas){
11 - camadasRaiz = ckCamada(dataMenu.temas,templateCamadas); 9 + camadasRaiz = ckCamada(dataMenu.temas,templateCamadas,"tema");
12 dataMenu["camadas"] = camadasRaiz; 10 dataMenu["camadas"] = camadasRaiz;
13 } 11 }
14 - var htmlMenus = Mustache.to_html( 12 + htmlMenus = Mustache.to_html(
15 templateMenus, 13 templateMenus,
16 dataMenu 14 dataMenu
17 ); 15 );
@@ -20,21 +18,22 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templat @@ -20,21 +18,22 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templat
20 $("#arvore").html(s.join("")); 18 $("#arvore").html(s.join(""));
21 //pega os grupos do menu 19 //pega os grupos do menu
22 for(i=0; i<nmenus; i++){ 20 for(i=0; i<nmenus; i++){
23 - var grupos = function(retorno){ 21 + grupos = function(retorno){
24 if(retorno.data){ 22 if(retorno.data){
25 - var gr = retorno.data.grupos; 23 + var gr = retorno.data.grupos,
  24 + c, i = 0, g = [], camadas, htmlGrupos, subgrupos, nsubgrupos, j, htmlSubGrupos;
26 //verifica se existem dados na raiz e grupos 25 //verifica se existem dados na raiz e grupos
27 if(gr[0].length == 0 && gr[1].temasraiz.length == 0){ 26 if(gr[0].length == 0 && gr[1].temasraiz.length == 0){
28 $("#gruposMenu"+retorno.data.idmenu).html(""); 27 $("#gruposMenu"+retorno.data.idmenu).html("");
29 return; 28 return;
30 } 29 }
31 - var c = gr.length - 3;  
32 - var g = [];  
33 - var i = 0; 30 + c = gr.length - 3;
  31 + g = [];
  32 + i = 0;
34 //camadas na raiz do grupo 33 //camadas na raiz do grupo
35 for (i = 0; i < c; i++) { 34 for (i = 0; i < c; i++) {
36 if(gr[i].temasgrupo){ 35 if(gr[i].temasgrupo){
37 - var camadas = ckCamada(gr[i].temasgrupo,templateCamadas); 36 + camadas = ckCamada(gr[i].temasgrupo,templateCamadas,"tema");
38 gr[i]["camadas"] = camadas; 37 gr[i]["camadas"] = camadas;
39 } else { 38 } else {
40 gr[i]["camadas"] = ""; 39 gr[i]["camadas"] = "";
@@ -42,23 +41,23 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templat @@ -42,23 +41,23 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templat
42 g.push(gr[i]); 41 g.push(gr[i]);
43 } 42 }
44 if(g){ 43 if(g){
45 - var htmlGrupos = Mustache.to_html( 44 + htmlGrupos = Mustache.to_html(
46 "{{#grupos}}" + templateGrupos + "{{/grupos}}", 45 "{{#grupos}}" + templateGrupos + "{{/grupos}}",
47 {"grupos":g} 46 {"grupos":g}
48 ); 47 );
49 } 48 }
50 $("#gruposMenu"+retorno.data.idmenu).html(htmlGrupos); 49 $("#gruposMenu"+retorno.data.idmenu).html(htmlGrupos);
51 for (i = 0; i < c; i++) { 50 for (i = 0; i < c; i++) {
52 - var subgrupos = gr[i].subgrupos; 51 + subgrupos = gr[i].subgrupos;
53 id_n1 = gr[i]["id_n1"]; 52 id_n1 = gr[i]["id_n1"];
54 53
55 - var nsubgrupos = subgrupos.length;  
56 - var j = 0; 54 + nsubgrupos = subgrupos.length;
  55 + j = 0;
57 for( j = 0; j < nsubgrupos; j++){ 56 for( j = 0; j < nsubgrupos; j++){
58 subgrupos[j]["id_n1"] = id_n1; 57 subgrupos[j]["id_n1"] = id_n1;
59 subgrupos[j]["idmenu"] = retorno.data.idmenu; 58 subgrupos[j]["idmenu"] = retorno.data.idmenu;
60 } 59 }
61 - var htmlSubGrupos = Mustache.to_html( 60 + htmlSubGrupos = Mustache.to_html(
62 "{{#s}}" + templateSubGrupos + "{{/s}}", 61 "{{#s}}" + templateSubGrupos + "{{/s}}",
63 {"s":subgrupos} 62 {"s":subgrupos}
64 ); 63 );
@@ -70,35 +69,73 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templat @@ -70,35 +69,73 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templat
70 }; 69 };
71 i3GEO.php.pegalistadegrupos(grupos, menus[i]["idmenu"], "sim"); 70 i3GEO.php.pegalistadegrupos(grupos, menus[i]["idmenu"], "sim");
72 } 71 }
73 - //$.material.init();  
74 }; 72 };
75 i3GEO.php.pegalistademenus(r); 73 i3GEO.php.pegalistademenus(r);
76 } 74 }
77 function listaCamadasSubgrupo(idmenu,id_n1,id_n2){ 75 function listaCamadasSubgrupo(idmenu,id_n1,id_n2){
78 //console.info(id_n2) 76 //console.info(id_n2)
79 - var corpo = $("#corpoSubGrupo"+id_n2); 77 + var corpo = $("#corpoSubGrupo"+id_n2),
  78 + camadas;
80 if(corpo.html().trim()+"x" == "x"){ 79 if(corpo.html().trim()+"x" == "x"){
81 corpo.html('<div class="panel-body"><i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span></div>') 80 corpo.html('<div class="panel-body"><i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span></div>')
82 81
83 } 82 }
84 var r = function(retorno){ 83 var r = function(retorno){
85 - var camadas = ckCamada(retorno.data.temas,$("#templateCamadas").html()); 84 + camadas = ckCamada(retorno.data.temas,$("#templateCamadas").html(),"tema");
86 corpo.html('<div class="panel-body">' + camadas + "</div>"); 85 corpo.html('<div class="panel-body">' + camadas + "</div>");
87 } 86 }
88 i3GEO.php.pegalistadetemas(r, idmenu, id_n1, id_n2); 87 i3GEO.php.pegalistadetemas(r, idmenu, id_n1, id_n2);
89 } 88 }
90 -function ckCamada(camadas,templateCamadas){  
91 - //remove as camadas que nao sao ogc  
92 - var ncamadas = []; 89 +function listaMetaestat (onde,templateCamadas){
  90 + var r, p;
  91 + r = function(d){
  92 + var html = "", n, camadas = [], i, t;
  93 + n = d.length;
  94 + if(n > 0){
  95 + for(i=0; i<n; i++){
  96 + t = d[i];
  97 + camadas.push({
  98 + "nome": t.nomemedida,
  99 + "hidden": "",
  100 + "codigo_tema": t.id_medida_variavel
  101 + });
  102 + }
  103 +
  104 + html = Mustache.to_html(
  105 + onde.html(),
  106 + {
  107 + "nomemeta":$trad("nomemeta",g_traducao_ogc),
  108 + "camadasmeta": ckCamada(camadas,templateCamadas,"meta"),
  109 + "hidden": "hidden"
  110 + }
  111 + );
  112 + }
  113 + onde.html(html);
  114 + };
  115 + //cpJSON vem de class_php.js
  116 + cpJSON.call("../admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel=&g_sid=", "foo", r);
  117 +
  118 +
  119 +}
  120 +function ckCamada(camadas,templateCamadas,tipo){
  121 + var ncamadas = [],
  122 + html;
  123 + //marca as camadas que nao sao ogc
93 $(camadas).each(function() { 124 $(camadas).each(function() {
94 - if(this.ogc_tema != "NAO"){ 125 + if(tipo == "tema" && this.ogc_tema != "NAO"){
95 if(this.link_tema == ""){ 126 if(this.link_tema == ""){
96 this.hidden = "hidden"; 127 this.hidden = "hidden";
97 } 128 }
  129 + this.tipo = tipo;
  130 + ncamadas.push(this);
  131 + }
  132 + if(tipo == "meta"){
  133 + this.hidden = "hidden";
  134 + this.tipo = tipo;
98 ncamadas.push(this); 135 ncamadas.push(this);
99 } 136 }
100 }); 137 });
101 - var html = Mustache.to_html( 138 + html = Mustache.to_html(
102 "{{#data}}" + templateCamadas + "{{/data}}", 139 "{{#data}}" + templateCamadas + "{{/data}}",
103 {"data":ncamadas} 140 {"data":ncamadas}
104 ); 141 );
@@ -109,38 +146,20 @@ function ckCamada(camadas,templateCamadas){ @@ -109,38 +146,20 @@ function ckCamada(camadas,templateCamadas){
109 return ""; 146 return "";
110 } 147 }
111 } 148 }
112 -function mostraDadosServico(tema){  
113 - ins = "<H1>Endere&ccedil;os de acesso:</H1>";  
114 - var re = new RegExp(".htm", "g");  
115 - var servico = window.location.href.replace(re, '.php?');  
116 - //remove variaveis adicionais, se houver  
117 - servico = servico.split("?")[0]+"?"; 149 +function mostraLinksServico(tema,tipo){
  150 + var html;
118 151
119 - ins += "<p>Webservice com todas as camadas: <a href='" + servico + "' target='_blank' >" + servico + "</a>";  
120 - ins += "<p>Webservice dessa camada: <a href='" + servico + "tema=" + tema + "&' target='_blank' >" + servico + "tema=" + tema + "&</a>";  
121 - ins += "<p>Link para essa p&aacute;gina: <a href='"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "'>"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "</a>";  
122 - ins +=  
123 - "<p><a target=blank href='"+servico+"service=wms&version=1.1.1&request=getcapabilities&layers="+tema+"' />GetCapabilities</a>";  
124 - ins +=  
125 - "<p><a target=blank href='"+servico+"SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers="+tema+"' />testar getmap</a>";  
126 - ins +=  
127 - "<p><a target=blank href='"+servico+"SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&FORMAT=image/png&service=wms&version=1.1.0&request=getlegendgraphic&layers="+tema+"' />testar getLegendGraphic</a>";  
128 - ins +=  
129 - "<p><a target=blank href='"+servico+"format=application/openlayers&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&layers="+tema+"' />visualizar com openLayers</a>";  
130 - ins +=  
131 - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=shape-zip&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />download shapefile via WFS</a>";  
132 - ins +=  
133 - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=csv&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"&ows_geomtype=AS_WKT' />download CSV via WFS com geometria</a>";  
134 - ins +=  
135 - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=csv&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"&ows_geomtype=none' />download CSV via WFS mas sem a geometria</a>";  
136 - ins +=  
137 - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=kmz&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />download KMZ</a>";  
138 - ins +=  
139 - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=kml&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />download KML</a>";  
140 - ins +=  
141 - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=geojson&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />GeoJson</a>";  
142 - ins +=  
143 - "<p><a target=blank href='ferramentas/recline/default.php?tema="+tema+"' />Explore a tabela de atributos</a>"; 152 + if(tipo == "meta"){
  153 + tradLinks["tema"] = "metaestat_"+tema;
  154 + tradLinks["id_medida_variavel"] = "&id_medida_variavel="+tema;
  155 + }
  156 + else{
  157 + tradLinks["tema"] = tema;
  158 + }
144 159
145 - $(".modal-body").html(ins); 160 + html = Mustache.to_html(
  161 + $("#templateLinks").html(),
  162 + tradLinks
  163 + );
  164 + $(".modal-body").html(html);
146 } 165 }
147 \ No newline at end of file 166 \ No newline at end of file
1 <?php 1 <?php
2 define ( ONDEI3GEO, ".." ); 2 define ( ONDEI3GEO, ".." );
3 include (dirname ( __FILE__ ) . "/../ms_configura.php"); 3 include (dirname ( __FILE__ ) . "/../ms_configura.php");
  4 +// pega a extensao geografica
  5 +if ($ogcwsmap == "") {
  6 + $ogcwsmap = $locaplic . "/aplicmap/ogcws.map";
  7 +}
  8 +$map = ms_newMapObj ( $ogcwsmap );
  9 +$mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy;
4 error_reporting ( 0 ); 10 error_reporting ( 0 );
5 include "../init/head.php"; 11 include "../init/head.php";
6 ?> 12 ?>
@@ -28,9 +34,26 @@ include &quot;../init/head.php&quot;; @@ -28,9 +34,26 @@ include &quot;../init/head.php&quot;;
28 transform: rotate(90deg); 34 transform: rotate(90deg);
29 } 35 }
30 </style> 36 </style>
  37 +<script id="templateLinks" type="x-tmpl-mustache">
  38 +<h3>{{{acesso}}}</h3>
  39 +<p>{{{wstodas}}}: <a href="{{{servico}}}" target="_blank" >{{{servico}}}</a>
  40 +<p>{{{wscamada}}}: <a href="{{{servico}}}tema={{{tema}}}{{{id_medida_variavel}}}&" target="_blank" >{{{servico}}}tema={{{tema}}}{{{id_medida_variavel}}}&</a>
  41 +<p>{{{linkpagina}}}: <a href="{{{url}}}?temaOgc={{{tema}}}">{{{url}}}?temaOgc={{{tema}}}</a>
  42 +<p><a target=blank href="{{{servico}}}service=wms&version=1.1.1&request=getcapabilities&layers={{{tema}}}{{{id_medida_variavel}}}" >GetCapabilities</a>
  43 +<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=<?php echo $mapext;?>&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers={{{tema}}}{{{id_medida_variavel}}}" >{{{getmap}}}</a>
  44 +<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=<?php echo $mapext;?>&FORMAT=image/png&service=wms&version=1.1.0&request=getlegendgraphic&layers={{{tema}}}{{{id_medida_variavel}}}" >{{{legenda}}}</a>
  45 +<p><a target=blank href="{{{servico}}}format=application/openlayers&bbox=<?php echo $mapext;?>&layers={{{tema}}}" >{{{vOl}}}</a>
  46 +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=shape-zip&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}{{{id_medida_variavel}}}" >{{{downwfs}}}</a>
  47 +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}&ows_geomtype=AS_WKT" >{{{downCgeo}}}</a>
  48 +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}&ows_geomtype=none" >{{{downSgeo}}}</a>
  49 +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kmz&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >{{{kmz}}}</a>
  50 +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kml&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >{{{kml}}}</a>
  51 +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=geojson&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >GeoJson</a>
  52 +<p><a target=blank href="../ferramentas/recline/default.php?tema={{{tema}}}{{{id_medida_variavel}}}" >{{{explore}}}</a>
  53 +</script>
31 <script id="templateCamadas" type="x-tmpl-mustache"> 54 <script id="templateCamadas" type="x-tmpl-mustache">
32 <div class="list-group-item"> 55 <div class="list-group-item">
33 - <div class="bs-component btn-group-sm pull-left" data-toggle="modal" data-target="#modalCamada" onclick="mostraDadosServico('{{codigo_tema}}')"> 56 + <div class="bs-component btn-group-sm pull-left" data-toggle="modal" data-target="#modalCamada" onclick="mostraLinksServico('{{codigo_tema}}','{{tipo}}')">
34 <a class="btn btn-primary btn-fab" href="#"> 57 <a class="btn btn-primary btn-fab" href="#">
35 <i class="material-icons">launch</i> 58 <i class="material-icons">launch</i>
36 </a> 59 </a>
@@ -99,11 +122,26 @@ include &quot;../init/head.php&quot;; @@ -99,11 +122,26 @@ include &quot;../init/head.php&quot;;
99 </div> 122 </div>
100 </div> 123 </div>
101 </script> 124 </script>
102 -<body style="background-color: #eeeeee; padding-top: 55px;"> 125 +<body style="background-color: #eeeeee; padding-top: 55px;" id="topo">
103 <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation"> 126 <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
104 <div class="container-fluid"> 127 <div class="container-fluid">
105 <div class="navbar-header"> 128 <div class="navbar-header">
106 - <a class="navbar-brand" href="../init/index.php"><?php echo $mensagemInicia;?> <i class="fa fa-home fa-1x"></i></a> 129 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
  130 + data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  131 + <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span
  132 + class="icon-bar"></span>
  133 + </button>
  134 + <a class="navbar-brand" href="../init/index.php"><?php echo $mensagemInicia;?> <i
  135 + class="fa fa-home fa-1x"></i></a>
  136 + </div>
  137 + <!-- template para permitir a traducao -->
  138 + <div id="navbar" class="collapse navbar-collapse">
  139 + <div id="menuTpl" class="hidden">
  140 + <ul class="nav navbar-nav">
  141 + <li><a href="../kml.php?tipoxml=kml" target="_blank">Kml Google Earth</a></li>
  142 + <li><a href="">{{{lista}}}</a></li>
  143 + </ul>
  144 + </div>
107 </div> 145 </div>
108 </div> 146 </div>
109 </nav> 147 </nav>
@@ -111,11 +149,35 @@ include &quot;../init/head.php&quot;; @@ -111,11 +149,35 @@ include &quot;../init/head.php&quot;;
111 <div class="row"> 149 <div class="row">
112 <ol class="breadcrumb"> 150 <ol class="breadcrumb">
113 <li><a href="../init/index.php">i3Geo</a></li> 151 <li><a href="../init/index.php">i3Geo</a></li>
114 - <li class="active">Servi&ccedil;os OGC</li> 152 + <li class="active">OGC</li>
115 </ol> 153 </ol>
116 </div> 154 </div>
117 </div> 155 </div>
  156 + <!-- Camadas oriundas do sistema de metadados estatisticos -->
118 <div class="container"> 157 <div class="container">
  158 + <div class="row center-block hidden">
  159 + <div class="col-sm-12" id="metaestat">
  160 + <div class="panel-group" role="tablist" aria-multiselectable="true">
  161 + <div class="panel panel-default">
  162 + <div class="panel-heading" style="background-color: #80cbc4;" role="tab">
  163 + <h3 class="panel-title">
  164 + <a class="collapsed in" role="button" data-toggle="collapse"
  165 + href="#corpoMetaestat" aria-expanded="false" aria-controls="#corpoMetaestat">
  166 + {{{nomemeta}}} </a>
  167 + </h3>
  168 + </div>
  169 + <div class="panel-body">
  170 + <div id="corpoMetaestat" class="panel-collapse collapse" role="tabpanel"
  171 + aria-multiselectable="true">
  172 + <div class="panel-body">
  173 + {{{camadasmeta}}}
  174 + </div>
  175 + </div>
  176 + </div>
  177 + </div>
  178 + </div>
  179 + </div>
  180 + </div>
119 <div class="row center-block"> 181 <div class="row center-block">
120 <div class="col-sm-12" id="arvore"> 182 <div class="col-sm-12" id="arvore">
121 <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> 183 <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>
@@ -124,41 +186,77 @@ include &quot;../init/head.php&quot;; @@ -124,41 +186,77 @@ include &quot;../init/head.php&quot;;
124 </div> 186 </div>
125 <nav class="navbar-fixed-bottom"> 187 <nav class="navbar-fixed-bottom">
126 <div class="container-fluid"> 188 <div class="container-fluid">
127 - <div class="jumbotron">  
128 - Navegue pela &aacute;rvore ao lado para localizar o tema desejado. Clicando-se em um tema, &eacute; mostrado o endere&ccedil;o do servi&ccedil;o OGC. Os servi&ccedil;os s&atilde;o Web Wervices que possibilitam o acesso aos dados dispon&iacute;veis nessa instala&ccedil;&atilde;o do i3Geo. A lista de temas baseia-se nas configura&ccedil;&otilde;es espec&iacute;ficas de cada servidor onde o i3Geo  
129 - est&aacute; instalado. Voc&ecirc; pode usar um Web Service para acessar os dados configurados nesse servidor por meio de outros softwares de geoprocessamento, como o <a href="http://www.gvsig.gva.es/index.php?id=gvsig&L=0">gvSIG.</a> Para maiores informa&ccedil;&otilde;es sobre o uso de web services, veja <a href='http://www.opengeospatial.org/standards' target=blank>http://www.opengeospatial.org/standards</a>  
130 - </div> 189 + <div class="jumbotron"></div>
131 </div> 190 </div>
132 </nav> 191 </nav>
133 -<div id="modalCamada" class="modal fade" tabindex="-1" role="dialog">  
134 - <div class="modal-dialog">  
135 - <div class="modal-content">  
136 - <div class="modal-header">  
137 - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>  
138 - <h4 class="modal-title">OGC</h4>  
139 - </div>  
140 - <div class="modal-body">  
141 -  
142 - </div>  
143 - </div>  
144 - </div>  
145 -</div>  
146 - <script type="text/javascript" src="../classesjs/i3geo_tudo_compacto6.js.php"></script> 192 + <div id="modalCamada" class="modal fade" tabindex="-1" role="dialog">
  193 + <div class="modal-dialog">
  194 + <div class="modal-content">
  195 + <div class="modal-header">
  196 + <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  197 + <span aria-hidden="true">&times;</span>
  198 + </button>
  199 + <h4 class="modal-title">OGC</h4>
  200 + </div>
  201 + <div class="modal-body"></div>
  202 + </div>
  203 + </div>
  204 + </div>
  205 + <script src='../pacotes/cpaint/cpaint2_compacto.inc.js'></script>
  206 + <script src='../classesjs/compactados/dicionario_compacto.js'></script>
  207 + <script src='../classesjs/compactados/classe_util_compacto.js'></script>
  208 + <script src='../classesjs/compactados/classe_idioma_compacto.js'></script>
  209 + <script src='../classesjs/compactados/classe_php_compacto.js'></script>
  210 + <script src='../classesjs/compactados/classe_arvoredetemas_compacto.js'></script>
  211 + <script src='../classesjs/compactados/mustache.js'></script>
  212 + <script src='dicionario.js'></script>
147 <script src='index.js'></script> 213 <script src='index.js'></script>
148 <script> 214 <script>
149 $(document).ready(function(){ 215 $(document).ready(function(){
150 - i3GEO.configura.locaplic = "../"; 216 + $(".jumbotron").html($trad("jumbotron",g_traducao_ogc));
  217 + i3GEO.configura = {"locaplic" : "..","sid": ""};
  218 +
  219 + var servico = window.location.href.split("/ogc")[0]+"/ogc.php?";
  220 + //g_traducao_ogc vem de dicionario.js
  221 + tradLinks = i3GEO.idioma.objetoIdioma(g_traducao_ogc);
  222 + tradLinks["servico"] = servico;
  223 + tradLinks["url"] = window.location.href.split("?")[0];
  224 + //traducao do menu nav
  225 + html = Mustache.to_html(
  226 + $("#menuTpl").html(),
  227 + tradLinks
  228 + );
  229 + $("#menuTpl").html(html);
  230 + //inicia arvore
151 listaDoNivelMenu( 231 listaDoNivelMenu(
152 $("#templateMenu").html(), 232 $("#templateMenu").html(),
153 $("#templateGrupos").html(), 233 $("#templateGrupos").html(),
154 $("#templateSubGrupos").html(), 234 $("#templateSubGrupos").html(),
155 $("#templateCamadas").html() 235 $("#templateCamadas").html()
156 ); 236 );
  237 + listaMetaestat($("#metaestat"),$("#templateCamadas").html());
  238 + $('.hidden').removeClass('hidden');
157 $(window).on("scroll click", 239 $(window).on("scroll click",
158 function(){ 240 function(){
159 $(".jumbotron").fadeOut(300) 241 $(".jumbotron").fadeOut(300)
160 } 242 }
161 ); 243 );
  244 + $.material.init();
  245 + //verifica se deve abrir de imediato a janela de links
  246 + var temp = window.location.href.split("temaOgc=");
  247 + if(temp[1]){
  248 + var temaOgc = temp[1];
  249 + temaOgc = temaOgc.split("&");
  250 + temaOgc = temaOgc[0];
  251 + //verifica se eh metaestat
  252 + if(temaOgc.split("_")[0] == "metaestat"){
  253 + mostraLinksServico(temaOgc.split("_")[1],"meta")
  254 + }
  255 + else{
  256 + mostraLinksServico(temaOgc,"tema")
  257 + }
  258 + $("#modalCamada").modal('show');
  259 + }
162 }); 260 });
163 </script> 261 </script>
164 </body> 262 </body>