Commit 05b22552a304a6832a3b8461680dc0eada2b65e1
1 parent
bc23d765
Exists in
master
and in
7 other branches
ajustes em OGC para não ser necessário definir &tema
Showing
5 changed files
with
18 additions
and
12 deletions
Show diff stats
admin/admin.db
No preview for this file type
mashups/openlayers.php
@@ -52,6 +52,9 @@ if(!empty($restauramapa)){ | @@ -52,6 +52,9 @@ if(!empty($restauramapa)){ | ||
52 | // | 52 | // |
53 | // imprime na tela a ajuda ao usuário | 53 | // imprime na tela a ajuda ao usuário |
54 | // | 54 | // |
55 | +if(!isset($temas) && isset($layers)){ | ||
56 | + $temas = $layers; | ||
57 | +} | ||
55 | if(!isset($temas)){ | 58 | if(!isset($temas)){ |
56 | ajuda(); | 59 | ajuda(); |
57 | } | 60 | } |
ogc.htm
@@ -82,12 +82,12 @@ function ogc_endereco(botao) | @@ -82,12 +82,12 @@ function ogc_endereco(botao) | ||
82 | ins = "<H1>Endereço do web service:</H1>"; | 82 | ins = "<H1>Endereço do web service:</H1>"; |
83 | var re = new RegExp(".htm", "g"); | 83 | var re = new RegExp(".htm", "g"); |
84 | var servico = window.location.href.replace(re,'.php?'); | 84 | var servico = window.location.href.replace(re,'.php?'); |
85 | - var s = "tema="+tema; | 85 | + var s = ""; //"tema="+tema; |
86 | if(botao.name === "metaestat"){ | 86 | if(botao.name === "metaestat"){ |
87 | - s = "id_medida_variavel="+tema.split("_")[1]; | 87 | + s = "id_medida_variavel="+tema.split("_")[1] + "&"; |
88 | } | 88 | } |
89 | if(botao.name === "mapaCadastrado"){ | 89 | if(botao.name === "mapaCadastrado"){ |
90 | - s = "restauramapa="+tema.split("_")[1]; | 90 | + s = "restauramapa="+tema.split("_")[1] + "&"; |
91 | tema = ""; | 91 | tema = ""; |
92 | } | 92 | } |
93 | 93 | ||
@@ -95,13 +95,13 @@ function ogc_endereco(botao) | @@ -95,13 +95,13 @@ function ogc_endereco(botao) | ||
95 | ins += "<p>"+servico; | 95 | ins += "<p>"+servico; |
96 | ins += "<p>Bookmark: <span id=bm ></span>"; | 96 | ins += "<p>Bookmark: <span id=bm ></span>"; |
97 | ins += "<p><iframe src='http://www.facebook.com/plugins/like.php?href="+servico+"&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"; | 97 | ins += "<p><iframe src='http://www.facebook.com/plugins/like.php?href="+servico+"&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"; |
98 | - ins += "<p><a target=blank href='"+servico+"&service=wms&version=1.1.0&request=getcapabilities&layers="+tema+"' />GetCapabilities</a>"; | ||
99 | - ins += "<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>"; | ||
100 | - ins += "<p><a target=blank href='"+servico+"&format=application/openlayers&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081' />visualizar com openLayers</a>"; | ||
101 | - ins += "<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+"' />download shapefile via WFS</a>"; | ||
102 | - ins += "<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+"' />download CSV via WFS</a>"; | ||
103 | - ins += "<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+"' />download KMZ</a>"; | ||
104 | - ins += "<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+"' />GeoJson</a>"; | 98 | + ins += "<p><a target=blank href='"+servico+"service=wms&version=1.1.1&request=getcapabilities&layers="+tema+"' />GetCapabilities</a>"; |
99 | + ins += "<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>"; | ||
100 | + ins += "<p><a target=blank href='"+servico+"format=application/openlayers&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&layers="+tema+"' />visualizar com openLayers</a>"; | ||
101 | + ins += "<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+"' />download shapefile via WFS</a>"; | ||
102 | + ins += "<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+"' />download CSV via WFS</a>"; | ||
103 | + ins += "<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+"' />download KMZ</a>"; | ||
104 | + ins += "<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+"' />GeoJson</a>"; | ||
105 | 105 | ||
106 | if(!$i("panellistaarquivos")){ | 106 | if(!$i("panellistaarquivos")){ |
107 | YAHOO.namespace("datadownloadLista"); | 107 | YAHOO.namespace("datadownloadLista"); |
ogc.php
@@ -88,6 +88,9 @@ include(dirname(__FILE__)."/classesphp/funcoes_gerais.php"); | @@ -88,6 +88,9 @@ include(dirname(__FILE__)."/classesphp/funcoes_gerais.php"); | ||
88 | //para o caso da requisicao kml | 88 | //para o caso da requisicao kml |
89 | if(strtolower($OUTPUTFORMAT) == "kml" || strtolower($OUTPUTFORMAT) == "kmz"){ | 89 | if(strtolower($OUTPUTFORMAT) == "kml" || strtolower($OUTPUTFORMAT) == "kmz"){ |
90 | //http://localhost/i3geo/pacotes/kmlmapserver/kmlservice.php?request=kmz&map=_lbiomashp&typename=_lbiomashp | 90 | //http://localhost/i3geo/pacotes/kmlmapserver/kmlservice.php?request=kmz&map=_lbiomashp&typename=_lbiomashp |
91 | + if(!isset($tema) && isset($layers)){ | ||
92 | + $tema = $layers; | ||
93 | + } | ||
91 | $urln = "pacotes/kmlmapserver/kmlservice.php?request=kmz&map=".$tema."&typename=".$tema; | 94 | $urln = "pacotes/kmlmapserver/kmlservice.php?request=kmz&map=".$tema."&typename=".$tema; |
92 | header("Location:".$urln); | 95 | header("Location:".$urln); |
93 | exit; | 96 | exit; |
temas/_lbiomashp.map
@@ -7,7 +7,7 @@ MAP | @@ -7,7 +7,7 @@ MAP | ||
7 | METADATA | 7 | METADATA |
8 | "TIP" "CD_LEGENDA" | 8 | "TIP" "CD_LEGENDA" |
9 | "CLASSE" "SIM" | 9 | "CLASSE" "SIM" |
10 | - "permitekmz" "nao" | 10 | + "permitekmz" "sim" |
11 | "ITENSDESC" "Teste de acentuação" | 11 | "ITENSDESC" "Teste de acentuação" |
12 | "TILES" "SIM" | 12 | "TILES" "SIM" |
13 | "ESCALA" "1000000" | 13 | "ESCALA" "1000000" |
@@ -16,7 +16,7 @@ MAP | @@ -16,7 +16,7 @@ MAP | ||
16 | "itembuscarapida" "CD_LEGENDA" | 16 | "itembuscarapida" "CD_LEGENDA" |
17 | "ITENS" "CD_LEGENDA" | 17 | "ITENS" "CD_LEGENDA" |
18 | "permitekml" "sim" | 18 | "permitekml" "sim" |
19 | - "permiteogc" "nao" | 19 | + "permiteogc" "sim" |
20 | "transitioneffect" "SIM" | 20 | "transitioneffect" "SIM" |
21 | "TEMA" "Biomas shapefile (acentuação)" | 21 | "TEMA" "Biomas shapefile (acentuação)" |
22 | END # METADATA | 22 | END # METADATA |