Commit 006cbbbf890844404ce1a196400e18808b4cf446

Authored by Edmar Moretti
1 parent 29b36c97

correção de sintaxe javascript

admin/js/core.js
... ... @@ -1188,7 +1188,7 @@ function core_geraLinhas(dados)
1188 1188 }
1189 1189 contaParam++;
1190 1190 }
1191   - while(contaParam < nparam)
  1191 + while(contaParam < nparam);
1192 1192 return(resultado);
1193 1193 }
1194 1194 /*
... ...
admin/js/editormapfile.js
... ... @@ -1691,7 +1691,7 @@ function montaEditorDados(dados)
1691 1691 $i("connectiontype").onchange = function(){
1692 1692 core_desativaforms(idsForms);
1693 1693 var valor = $i("connectiontype").value,
1694   - d = [];
  1694 + d;
1695 1695 //["connection","data","tileitem","tileindex"]
1696 1696 if(valor == 0 || valor == 10)
1697 1697 {d = [];}
... ... @@ -1710,7 +1710,7 @@ function montaEditorDados(dados)
1710 1710 $i("metaestat").onchange = function(){
1711 1711 core_desativaforms(idsMetaestat);
1712 1712 var valor = $i("metaestat").value,
1713   - d = [];
  1713 + d;
1714 1714 if(valor === "SIM"){
1715 1715 d = ["metaestat_id_medida_variavel"];
1716 1716 }
... ... @@ -1911,9 +1911,9 @@ function montaEditorClasseGeral(dados)
1911 1911 {
1912 1912 var re = /C_/g;
1913 1913 dados.expression = dados.expression.replace(re,"]");
1914   - var re = /_C/g;
  1914 + re = /_C/g;
1915 1915 dados.expression = dados.expression.replace(re,"[");
1916   - var re = /_A_/g;
  1916 + re = /_A_/g;
1917 1917 dados.expression = dados.expression.replace(re,"'");
1918 1918 var param = {
1919 1919 "linhas":[
... ...
admin/js/estat_conexao.js
... ... @@ -178,11 +178,12 @@ i3GEOadmin.conexao = {
178 178 }
179 179 var i,temp,
180 180 n = i3GEOadmin.conexao.dados.length,
181   - novo = [];
  181 + novo;
182 182 if(letra == "Todos"){
183 183 novo = i3GEOadmin.conexao.dados;
184 184 }
185 185 else{
  186 + novo = [];
186 187 for(i=0;i<n;i++){
187 188 temp = i3GEOadmin.conexao.dados[i].bancodedados;
188 189 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/estat_fonteinfo.js
... ... @@ -162,11 +162,12 @@ i3GEOadmin.fonteinfo = {
162 162 }
163 163 var i,temp,
164 164 n = i3GEOadmin.fonteinfo.dados.length,
165   - novo = [];
  165 + novo;
166 166 if(letra == "Todos"){
167 167 novo = i3GEOadmin.fonteinfo.dados;
168 168 }
169 169 else{
  170 + novo = [];
170 171 for(i=0;i<n;i++){
171 172 temp = i3GEOadmin.fonteinfo.dados[i].titulo;
172 173 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/estat_tipo_periodo.js
... ... @@ -162,11 +162,12 @@ i3GEOadmin.periodo = {
162 162 }
163 163 var i,temp,
164 164 n = i3GEOadmin.periodo.dados.length,
165   - novo = [];
  165 + novo;
166 166 if(letra == "Todos"){
167 167 novo = i3GEOadmin.periodo.dados;
168 168 }
169 169 else{
  170 + novo = [];
170 171 for(i=0;i<n;i++){
171 172 temp = i3GEOadmin.periodo.dados[i].nome;
172 173 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/estat_unidade_medida.js
... ... @@ -189,11 +189,12 @@ i3GEOadmin.umedida = {
189 189 }
190 190 var i,temp,
191 191 n = i3GEOadmin.umedida.dados.length,
192   - novo = [];
  192 + novo;
193 193 if(letra == "Todos"){
194 194 novo = i3GEOadmin.umedida.dados;
195 195 }
196 196 else{
  197 + novo = [];
197 198 for(i=0;i<n;i++){
198 199 temp = i3GEOadmin.umedida.dados[i].nome;
199 200 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/grupos.js
... ... @@ -20,7 +20,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
20 20 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
21 21 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
22 22 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
23   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  23 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
24 24 GNU junto com este programa; se n&atilde;o, escreva para a
25 25 Free Software Foundation, Inc., no endere&ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -52,7 +52,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
52 52 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
53 53 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
54 54 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
55   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  55 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
56 56 GNU junto com este programa; se n&atilde;o, escreva para a
57 57 Free Software Foundation, Inc., no endere&ccedil;o
58 58 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -231,11 +231,12 @@ i3GEOadmin.grupos = {
231 231 }
232 232 var i,temp,
233 233 n = i3GEOadmin.grupos.dados.length,
234   - novo = [];
  234 + novo;
235 235 if(letra == "Todos"){
236 236 novo = i3GEOadmin.grupos.dados;
237 237 }
238 238 else{
  239 + novo = [];
239 240 for(i=0;i<n;i++){
240 241 temp = i3GEOadmin.grupos.dados[i].nome_grupo;
241 242 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/identifica.js
... ... @@ -20,7 +20,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
20 20 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
21 21 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
22 22 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
23   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  23 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
24 24 GNU junto com este programa; se n&atilde;o, escreva para a
25 25 Free Software Foundation, Inc., no endere&ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -207,11 +207,12 @@ i3GEOadmin.identifica = {
207 207 }
208 208 var i,temp,
209 209 n = i3GEOadmin.identifica.dados.length,
210   - novo = [];
  210 + novo;
211 211 if(letra == "Todos"){
212 212 novo = i3GEOadmin.identifica.dados;
213 213 }
214 214 else{
  215 + novo = [];
215 216 for(i=0;i<n;i++){
216 217 temp = i3GEOadmin.identifica.dados[i].nome_i;
217 218 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/mapas.js
... ... @@ -20,7 +20,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
20 20 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
21 21 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
22 22 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
23   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  23 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
24 24 GNU junto com este programa; se n&atilde;o, escreva para a
25 25 Free Software Foundation, Inc., no endere&ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -174,7 +174,7 @@ i3GEOadmin.mapas = {
174 174 formulario: function(i){
175 175 var ins = "";
176 176  
177   - //ins += "<p>Mapfile (código do mapfile que ser&aacute; utilizado para criar a camada no i3geo):"
  177 + //ins += "<p>Mapfile (c�digo do mapfile que ser&aacute; utilizado para criar a camada no i3geo):"
178 178 //ins += "<div id=comboMapfiles >Buscando...</div>";
179 179 ins += "<p>Ordem de apresenta&ccedil;&atilde;o do mapa:<br>";
180 180 ins += "<input size=10 type=text id=Eordem_mapa value='"+i.ordem_mapa+"' /></p>";
... ... @@ -197,7 +197,7 @@ i3GEOadmin.mapas = {
197 197 ins += "<input size=35 type=text id=Eimagem_mapa value='"+i.imagem_mapa+"' /></p>";
198 198 ins += "<img src='"+i.imagem_mapa+"' />";
199 199  
200   - ins += "<p>Temas que ser&atilde;o inclu&iacute;dos nesse mapa (utilize os códigos dos mapfiles mostrados na lista abaixo): </p>";
  200 + ins += "<p>Temas que ser&atilde;o inclu&iacute;dos nesse mapa (utilize os c�digos dos mapfiles mostrados na lista abaixo): </p>";
201 201 ins += "<input size=35 type=text id='Etemas_mapa' value='"+i.temas_mapa+"' /></p>";
202 202 ins += "<div id=comboMapfiles >Buscando...</div>";
203 203  
... ... @@ -229,11 +229,12 @@ i3GEOadmin.mapas = {
229 229 }
230 230 var i,temp,
231 231 n = i3GEOadmin.mapas.dados.length,
232   - novo = [];
  232 + novo;
233 233 if(letra == "Todos"){
234 234 novo = i3GEOadmin.mapas.dados;
235 235 }
236 236 else{
  237 + novo = [];
237 238 for(i=0;i<n;i++){
238 239 temp = i3GEOadmin.mapas.dados[i].nome_mapa;
239 240 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/menu.js
... ... @@ -20,7 +20,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
20 20 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
21 21 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
22 22 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
23   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  23 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
24 24 GNU junto com este programa; se n&atilde;o, escreva para a
25 25 Free Software Foundation, Inc., no endere&ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -233,11 +233,12 @@ i3GEOadmin.menus = {
233 233 }
234 234 var i,temp,
235 235 n = i3GEOadmin.menus.dados.length,
236   - novo = [];
  236 + novo;
237 237 if(letra == "Todos"){
238 238 novo = i3GEOadmin.menus.dados;
239 239 }
240 240 else{
  241 + novo = [];
241 242 for(i=0;i<n;i++){
242 243 temp = i3GEOadmin.menus.dados[i].nome_menu;
243 244 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/subgrupos.js
... ... @@ -20,7 +20,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
20 20 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
21 21 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
22 22 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
23   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  23 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
24 24 GNU junto com este programa; se n&atilde;o, escreva para a
25 25 Free Software Foundation, Inc., no endere&ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -206,11 +206,12 @@ i3GEOadmin.subgrupos = {
206 206 }
207 207 var i,temp,
208 208 n = i3GEOadmin.subgrupos.dados.length,
209   - novo = [];
  209 + novo;
210 210 if(letra == "Todos"){
211 211 novo = i3GEOadmin.subgrupos.dados;
212 212 }
213 213 else{
  214 + novo = [];
214 215 for(i=0;i<n;i++){
215 216 temp = i3GEOadmin.subgrupos.dados[i].nome_subgrupo;
216 217 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
admin/js/webservices.js
... ... @@ -20,7 +20,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
20 20 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
21 21 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
22 22 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
23   -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  23 +Voc&ecirc; deve ter recebido uma c�pia da Licen&ccedil;a P&uacute;blica Geral do
24 24 GNU junto com este programa; se n&atilde;o, escreva para a
25 25 Free Software Foundation, Inc., no endere&ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
... ... @@ -236,11 +236,12 @@ i3GEOadmin.webservices = {
236 236 }
237 237 var i,temp,
238 238 n = i3GEOadmin.webservices.dados.length,
239   - novo = [];
  239 + novo;
240 240 if(letra == "Todos"){
241 241 novo = i3GEOadmin.webservices.dados;
242 242 }
243 243 else{
  244 + novo = [];
244 245 for(i=0;i<n;i++){
245 246 temp = i3GEOadmin.webservices.dados[i].nome_ws;
246 247 if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){
... ...
classesjs/atlas.js
... ... @@ -118,10 +118,13 @@ function iniciaAtlas(combow,atlasId)
118 118 }
119 119 i = i + 1;
120 120 }
121   - while(pranchas[i])
122   - if (retorno.data.tipoguias == "combo"){ins += "</select>";}
123   - else
124   - {ins += "</ul>";}
  121 + while(pranchas[i]);
  122 + if (retorno.data.tipoguias == "combo"){
  123 + ins += "</select>";
  124 + }
  125 + else{
  126 + ins += "</ul>";
  127 + }
125 128 pai.innerHTML = ins;
126 129 }
127 130 }
... ... @@ -197,7 +200,7 @@ function pegaListaDeAtlas()
197 200 }
198 201 i = i + 1;
199 202 }
200   - while(listaAtlas[i])
  203 + while(listaAtlas[i]);
201 204 local.innerHTML = texto+"</table>";
202 205 document.getElementById("tituloinstituicao").innerHTML = retorno.data.tituloinstituicao;
203 206 };
... ...
classesjs/classe_editorol.js
... ... @@ -1060,9 +1060,9 @@ i3GEO.editorOL = {
1060 1060 type: OpenLayers.Control.TYPE_TOOL,
1061 1061 callbacks:{
1062 1062 done: function(feature){
1063   - var f = [];
  1063 + var f,style_mark;
1064 1064 if(i3GEO.editorOL.simbologia.externalGraphic != ""){
1065   - var style_mark = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
  1065 + style_mark = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
1066 1066 style_mark.externalGraphic = i3GEO.editorOL.simbologia.externalGraphic;
1067 1067 style_mark.graphicWidth = i3GEO.editorOL.simbologia.graphicWidth;
1068 1068 style_mark.graphicHeight = i3GEO.editorOL.simbologia.graphicHeight;
... ...
classesjs/classe_mapa.js
... ... @@ -1102,9 +1102,8 @@ i3GEO.mapa = {
1102 1102 compactaLayerGrafico: function(){
1103 1103 var geos = false,
1104 1104 geometrias = [],
1105   - g = [],
1106 1105 n = 0,
1107   - i;
  1106 + i,g;
1108 1107 if(i3GEO.editorOL && i3GEO.desenho.layergrafico && i3GEO.desenho.layergrafico.features){
1109 1108 geos = i3GEO.desenho.layergrafico.features;
1110 1109 n = geos.length;
... ...
ferramentas/geolocal/index.js
... ... @@ -32,53 +32,53 @@ Voc&amp;ecirc; deve ter recebido uma c&amp;oacute;pia da Licen&amp;ccedil;a P&amp;uacute;blica G
32 32 GNU junto com este programa; se n&atilde;o, escreva para a
33 33 Free Software Foundation, Inc., no endere&ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35   -*/
  35 + */
36 36 if(typeof(i3GEOF) === 'undefined'){
37 37 var i3GEOF = {};
38 38 }
39 39 /*
40 40 Classe: i3GEOF.geolocal
41   -*/
  41 + */
42 42 i3GEOF.geolocal = {
43   - /*
  43 + /*
44 44 Variavel: posicoes
45 45  
46 46 Objetos capturados
47   - */
48   - posicoes: [],
49   - tempo: null,
50   - /*
  47 + */
  48 + posicoes: [],
  49 + tempo: null,
  50 + /*
51 51 Variavel: aguarde
52 52  
53 53 Estilo do objeto DOM com a imagem de aguarde existente no cabe&ccedil;alho da janela.
54   - */
55   - aguarde: "",
56   - /*
  54 + */
  55 + aguarde: "",
  56 + /*
57 57 Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o tinha dicion&aacute;rio
58   - */
59   - criaJanelaFlutuante: function(){
60   - i3GEOF.geolocal.iniciaDicionario();
61   - },
62   - /*
  58 + */
  59 + criaJanelaFlutuante: function(){
  60 + i3GEOF.geolocal.iniciaDicionario();
  61 + },
  62 + /*
63 63 Function: iniciaDicionario
64 64  
65 65 Carrega o dicion&aacute;rio e chama a fun&ccedil;&atilde;o que inicia a ferramenta
66 66  
67 67 O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
68   - */
69   - iniciaDicionario: function(){
70   - if(typeof(i3GEOF.geolocal.dicionario) === 'undefined'){
71   - i3GEO.util.scriptTag(
72   - i3GEO.configura.locaplic+"/ferramentas/geolocal/dicionario.js",
73   - "i3GEOF.geolocal.iniciaJanelaFlutuante()",
74   - "i3GEOF.geolocal.dicionario_script"
75   - );
76   - }
77   - else{
78   - i3GEOF.geolocal.iniciaJanelaFlutuante();
79   - }
80   - },
81   - /*
  68 + */
  69 + iniciaDicionario: function(){
  70 + if(typeof(i3GEOF.geolocal.dicionario) === 'undefined'){
  71 + i3GEO.util.scriptTag(
  72 + i3GEO.configura.locaplic+"/ferramentas/geolocal/dicionario.js",
  73 + "i3GEOF.geolocal.iniciaJanelaFlutuante()",
  74 + "i3GEOF.geolocal.dicionario_script"
  75 + );
  76 + }
  77 + else{
  78 + i3GEOF.geolocal.iniciaJanelaFlutuante();
  79 + }
  80 + },
  81 + /*
82 82 Function: inicia
83 83  
84 84 Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
... ... @@ -86,28 +86,28 @@ i3GEOF.geolocal = {
86 86 Parametro:
87 87  
88 88 iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
89   - */
90   - inicia: function(iddiv){
91   - var ics,n;
92   - //se nao permitir a localizacao, retorna uma mensagem
93   - if(navigator.geolocation){
94   - $i(iddiv).innerHTML = i3GEOF.geolocal.html();
95   - $i("i3GEOFgeolocalFormTempo").onsubmit = i3GEOF.geolocal.capturaTempo;
96   - ics = $i(iddiv).getElementsByTagName("button");
97   - n = ics.length;
98   - for(i=0;i<n;i++){
99   - ics[i].style.backgroundColor = "white";
100   - ics[i].className = "iconeGuiaMovel iconeGuiaMovelMouseOut";
101   - ics[i].onmouseout = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOut";};
102   - ics[i].onmouseover = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOver";};
  89 + */
  90 + inicia: function(iddiv){
  91 + var ics,n,i;
  92 + //se nao permitir a localizacao, retorna uma mensagem
  93 + if(navigator.geolocation){
  94 + $i(iddiv).innerHTML = i3GEOF.geolocal.html();
  95 + $i("i3GEOFgeolocalFormTempo").onsubmit = i3GEOF.geolocal.capturaTempo;
  96 + ics = $i(iddiv).getElementsByTagName("button");
  97 + n = ics.length;
  98 + for(i=0;i<n;i++){
  99 + ics[i].style.backgroundColor = "white";
  100 + ics[i].className = "iconeGuiaMovel iconeGuiaMovelMouseOut";
  101 + ics[i].onmouseout = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOut";};
  102 + ics[i].onmouseover = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOver";};
  103 + }
  104 + i3GEOF.geolocal.capturaCoordenada();
103 105 }
104   - i3GEOF.geolocal.capturaCoordenada();
105   - }
106   - else{
107   - $i(iddiv).innerHTML = $trad(2,i3GEOF.geolocal.dicionario);
108   - }
109   - },
110   - /*
  106 + else{
  107 + $i(iddiv).innerHTML = $trad(2,i3GEOF.geolocal.dicionario);
  108 + }
  109 + },
  110 + /*
111 111 Function: html
112 112  
113 113 Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
... ... @@ -115,10 +115,10 @@ i3GEOF.geolocal = {
115 115 Retorno:
116 116  
117 117 String com o c&oacute;digo html
118   - */
119   - html:function(){
120   - var ins = "";
121   - ins += "" +
  118 + */
  119 + html:function(){
  120 + var ins = "";
  121 + ins += "" +
122 122 '<button title="'+$trad(3,i3GEOF.geolocal.dicionario)+'" onclick="i3GEOF.geolocal.capturaCoordenada()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/gps.png" /></button>' +
123 123 '<button title="'+$trad(4,i3GEOF.geolocal.dicionario)+'" onclick="i3GEOF.geolocal.limpa()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/erase.png" /></button>' +
124 124 '<button title="'+$trad(9,i3GEOF.geolocal.dicionario)+'" onclick="i3GEOF.geolocal.criaShp()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/layer-gps-create.png" /></button>' +
... ... @@ -130,177 +130,177 @@ i3GEOF.geolocal = {
130 130 "<br><div id='i3GEOFgeolocalNcoord' style='width: 30px; position: absolute;' ></div>" +
131 131 "<div style='position:relative;width: 150px;left: 40px;'>" + $trad(8,i3GEOF.geolocal.dicionario) + " " +
132 132 $inputText("","","i3GEOFgeolocalMaximo","",5,"") + "</div>";
133   - return ins;
134   - },
135   - /*
  133 + return ins;
  134 + },
  135 + /*
136 136 Function: iniciaJanelaFlutuante
137 137  
138 138 Cria a janela flutuante para controle da ferramenta.
139   - */
140   - iniciaJanelaFlutuante: function(){
141   - var janela,divid,temp,titulo,cabecalho,minimiza;
142   - cabecalho = function(){};
143   - minimiza = function(){
144   - i3GEO.janela.minimiza("i3GEOF.geolocal");
145   - };
146   - //cria a janela flutuante
147   - titulo = $trad(1,i3GEOF.geolocal.dicionario)+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=6&idajuda=118' >&nbsp;&nbsp;&nbsp;</a>";
148   - janela = i3GEO.janela.cria(
149   - "270",
150   - "200",
151   - "",
152   - "",
153   - "",
154   - titulo,
155   - "i3GEOF.geolocal",
156   - false,
157   - "hd",
158   - cabecalho,
159   - minimiza
160   - );
161   - divid = janela[2].id;
162   - $i("i3GEOF.geolocal_corpo").style.backgroundColor = "white";
163   - $i("i3GEOF.geolocal_corpo").style.textAlign = "left";
164   - i3GEOF.geolocal.aguarde = $i("i3GEOF.geolocal_imagemCabecalho").style;
165   - i3GEOF.geolocal.inicia(divid);
166   - temp = function(){
167   - i3GEOF.geolocal[i3GEO.Interface.ATUAL].removeLayer();
168   - i3GEOF.geolocal.paraTempo();
169   - };
170   - YAHOO.util.Event.addListener(janela[0].close, "click", temp);
171   - i3GEO.util.criaPin("pingeolocal",i3GEO.configura.locaplic+'/imagens/google/confluence.png');
172   - i3GEOF.geolocal.escondexy();
173   - },
174   - capturaCoordenada: function(){
175   - if(i3GEOF.geolocal.aguarde.visibility == "visible"){
176   - return;
177   - }
178   - i3GEOF.geolocal.aguarde.visibility = "visible";
179   - var retorno = function(position){
180   - i3GEOF.geolocal.posicoes.push(position);
181   - var n = parseInt($i("i3GEOFgeolocalMaximo").value,10);
182   - if(n > 0 && i3GEOF.geolocal.posicoes.length > n){
183   - i3GEOF.geolocal.posicoes.splice(0,(i3GEOF.geolocal.posicoes.length - n));
  139 + */
  140 + iniciaJanelaFlutuante: function(){
  141 + var janela,divid,temp,titulo,cabecalho,minimiza;
  142 + cabecalho = function(){};
  143 + minimiza = function(){
  144 + i3GEO.janela.minimiza("i3GEOF.geolocal");
  145 + };
  146 + //cria a janela flutuante
  147 + titulo = $trad(1,i3GEOF.geolocal.dicionario)+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=6&idajuda=118' >&nbsp;&nbsp;&nbsp;</a>";
  148 + janela = i3GEO.janela.cria(
  149 + "270",
  150 + "200",
  151 + "",
  152 + "",
  153 + "",
  154 + titulo,
  155 + "i3GEOF.geolocal",
  156 + false,
  157 + "hd",
  158 + cabecalho,
  159 + minimiza
  160 + );
  161 + divid = janela[2].id;
  162 + $i("i3GEOF.geolocal_corpo").style.backgroundColor = "white";
  163 + $i("i3GEOF.geolocal_corpo").style.textAlign = "left";
  164 + i3GEOF.geolocal.aguarde = $i("i3GEOF.geolocal_imagemCabecalho").style;
  165 + i3GEOF.geolocal.inicia(divid);
  166 + temp = function(){
  167 + i3GEOF.geolocal[i3GEO.Interface.ATUAL].removeLayer();
  168 + i3GEOF.geolocal.paraTempo();
  169 + };
  170 + YAHOO.util.Event.addListener(janela[0].close, "click", temp);
  171 + i3GEO.util.criaPin("pingeolocal",i3GEO.configura.locaplic+'/imagens/google/confluence.png');
  172 + i3GEOF.geolocal.escondexy();
  173 + },
  174 + capturaCoordenada: function(){
  175 + if(i3GEOF.geolocal.aguarde.visibility == "visible"){
  176 + return;
184 177 }
185   - i3GEOF.geolocal.listaCoord();
186   - }
187   - navigator.geolocation.getCurrentPosition(retorno,i3GEOF.geolocal.erro);
188   - },
189   - capturaTempo: function(){
190   - var tempo = parseInt($i("i3GEOFgeolocalTempo").value,10);
191   - if(tempo){
192   - if(tempo > 0){
193   - i3GEOF.geolocal.tempo = setInterval("i3GEOF.geolocal.capturaCoordenada()",tempo*1000);
  178 + i3GEOF.geolocal.aguarde.visibility = "visible";
  179 + var retorno = function(position){
  180 + i3GEOF.geolocal.posicoes.push(position);
  181 + var n = parseInt($i("i3GEOFgeolocalMaximo").value,10);
  182 + if(n > 0 && i3GEOF.geolocal.posicoes.length > n){
  183 + i3GEOF.geolocal.posicoes.splice(0,(i3GEOF.geolocal.posicoes.length - n));
  184 + }
  185 + i3GEOF.geolocal.listaCoord();
  186 + };
  187 + navigator.geolocation.getCurrentPosition(retorno,i3GEOF.geolocal.erro);
  188 + },
  189 + capturaTempo: function(){
  190 + var tempo = parseInt($i("i3GEOFgeolocalTempo").value,10);
  191 + if(tempo){
  192 + if(tempo > 0){
  193 + i3GEOF.geolocal.tempo = setInterval("i3GEOF.geolocal.capturaCoordenada()",tempo*1000);
  194 + }
  195 + else{
  196 + clearInterval(i3GEOF.geolocal.tempo);
  197 + }
194 198 }
195   - else{
196   - clearInterval(i3GEOF.geolocal.tempo);
  199 + return false;
  200 + },
  201 + paraTempo: function(){
  202 + if($i("i3GEOFgeolocalTempo")){
  203 + $i("i3GEOFgeolocalTempo").value = 0;
197 204 }
198   - }
199   - return false;
200   - },
201   - paraTempo: function(){
202   - if($i("i3GEOFgeolocalTempo")){
203   - $i("i3GEOFgeolocalTempo").value = 0;
204   - }
205   - clearInterval(i3GEOF.geolocal.tempo);
206   - },
207   - erro: function(error){
208   - i3GEOF.geolocal.paraTempo();
209   - var erro = "";
210   - switch(error.code){
  205 + clearInterval(i3GEOF.geolocal.tempo);
  206 + },
  207 + erro: function(error){
  208 + i3GEOF.geolocal.paraTempo();
  209 + var erro = "";
  210 + switch(error.code){
211 211 case error.PERMISSION_DENIED:
212   - erro = "User denied the request for Geolocation."
213   - break;
  212 + erro = "User denied the request for Geolocation.";
  213 + break;
214 214 case error.POSITION_UNAVAILABLE:
215   - erro = "Location information is unavailable."
216   - break;
  215 + erro = "Location information is unavailable.";
  216 + break;
217 217 case error.TIMEOUT:
218   - erro = "The request to get user location timed out."
219   - break;
  218 + erro = "The request to get user location timed out.";
  219 + break;
220 220 case error.UNKNOWN_ERROR:
221   - erro = "An unknown error occurred."
222   - break;
223   - }
224   - i3GEO.janela.tempoMsg(erro);
225   - i3GEOF.geolocal.aguarde.visibility = "hidden";
226   - },
227   - listaCoord: function(position){
228   - var ps = i3GEOF.geolocal.posicoes,
  221 + erro = "An unknown error occurred.";
  222 + break;
  223 + }
  224 + i3GEO.janela.tempoMsg(erro);
  225 + i3GEOF.geolocal.aguarde.visibility = "hidden";
  226 + },
  227 + listaCoord: function(position){
  228 + var ps = i3GEOF.geolocal.posicoes,
229 229 n = ps.length,
230 230 i,
231 231 ins = "",
232 232 res = ["<tr><td></td><td></td><td></td><td><b>Latitude</b></td><td><b>Longitude</b></td></tr>"];
233   - for(i=(n-1);i>=0;i--){
234   - ins = "<tr>" +
  233 + for(i=(n-1);i>=0;i--){
  234 + ins = "<tr>" +
235 235 '<td><img title="' + $trad(4,i3GEOF.geolocal.dicionario) + '" src="'+i3GEO.configura.locaplic+'/imagens/x.gif" onclick="i3GEOF.geolocal.excluiLinha('+i+')" style="cursor:pointer"></td>' +
236 236 '<td><img onmouseout="i3GEOF.geolocal.escondexy()" onmouseover="i3GEOF.geolocal.mostraxy('+i+')" title="pan" src="'+i3GEO.configura.locaplic+'/imagens/o.gif" onclick="i3GEOF.geolocal.panLinha('+i+')" style="cursor:pointer"></td>' +
237 237 '<td><img title="info" src="'+i3GEO.configura.locaplic+'/imagens/oxygen/16x16/help-about.png" onclick="i3GEOF.geolocal.info('+i+')" style="cursor:pointer"></td>' +
238 238 "<td>" + ps[i].coords.latitude + "</td><td>" + ps[i].coords.longitude + "</td></tr>";
239   - res.push(ins);
240   - }
241   - $i("i3GEOFgeolocalListaDePontos").innerHTML = "<table class='lista8' >" + res.join("") + "</table>";
242   - $i("i3GEOFgeolocalNcoord").innerHTML = n;
243   - i3GEOF.geolocal[i3GEO.Interface.ATUAL].desenha();
244   - i3GEOF.geolocal.aguarde.visibility = "hidden";
245   - },
246   - limpa: function(){
247   - i3GEOF.geolocal.posicoes = [];
248   - i3GEOF.geolocal[i3GEO.Interface.ATUAL].removeLayer();
249   - i3GEOF.geolocal.listaCoord();
250   - },
251   - excluiLinha: function(i){
252   - i3GEOF.geolocal.posicoes.splice(i,1);
253   - i3GEOF.geolocal.listaCoord();
254   - },
255   - panLinha: function(i){
256   - var posicao = i3GEOF.geolocal.posicoes[i];
257   - //@FIXME o pan nao funciona no OSM
258   - if(posicao != undefined && i3GEO.Interface.openlayers.googleLike != true){
259   - i3GEO.navega.pan2ponto((posicao.coords.longitude),(posicao.coords.latitude));
260   - }
261   - },
262   - info: function(i){
263   - i3GEO.mapa.dialogo.cliqueIdentificaDefault(i3GEOF.geolocal.posicoes[i].coords.longitude,i3GEOF.geolocal.posicoes[i].coords.latitude);
264   - },
265   - mostraxy: function(i){
266   - /*
267   - * @TODO nao funciona no OSM
268   - */
269   - if(i3GEO.Interface.ATUAL === "googleearth" || i3GEO.Interface.openlayers.googleLike === true)
270   - {return;}
271   - var posicao = i3GEOF.geolocal.posicoes[i],
272   - xy = [posicao.coords.longitude,posicao.coords.latitude],
  239 + res.push(ins);
  240 + }
  241 + $i("i3GEOFgeolocalListaDePontos").innerHTML = "<table class='lista8' >" + res.join("") + "</table>";
  242 + $i("i3GEOFgeolocalNcoord").innerHTML = n;
  243 + i3GEOF.geolocal[i3GEO.Interface.ATUAL].desenha();
  244 + i3GEOF.geolocal.aguarde.visibility = "hidden";
  245 + },
  246 + limpa: function(){
  247 + i3GEOF.geolocal.posicoes = [];
  248 + i3GEOF.geolocal[i3GEO.Interface.ATUAL].removeLayer();
  249 + i3GEOF.geolocal.listaCoord();
  250 + },
  251 + excluiLinha: function(i){
  252 + i3GEOF.geolocal.posicoes.splice(i,1);
  253 + i3GEOF.geolocal.listaCoord();
  254 + },
  255 + panLinha: function(i){
  256 + var posicao = i3GEOF.geolocal.posicoes[i];
  257 + //@FIXME o pan nao funciona no OSM
  258 + if(posicao != undefined && i3GEO.Interface.openlayers.googleLike != true){
  259 + i3GEO.navega.pan2ponto((posicao.coords.longitude),(posicao.coords.latitude));
  260 + }
  261 + },
  262 + info: function(i){
  263 + i3GEO.mapa.dialogo.cliqueIdentificaDefault(i3GEOF.geolocal.posicoes[i].coords.longitude,i3GEOF.geolocal.posicoes[i].coords.latitude);
  264 + },
  265 + mostraxy: function(i){
  266 + /*
  267 + * @TODO nao funciona no OSM
  268 + */
  269 + if(i3GEO.Interface.ATUAL === "googleearth" || i3GEO.Interface.openlayers.googleLike === true)
  270 + {return;}
  271 + var posicao = i3GEOF.geolocal.posicoes[i],
  272 + xy = [posicao.coords.longitude,posicao.coords.latitude],
273 273 box = $i("pingeolocal"),
274 274 ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
275   - xy = i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),ext,i3GEO.parametros.pixelsize);
  275 + xy = i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),ext,i3GEO.parametros.pixelsize);
276 276  
277   - box.style.display = "block";
278   - box.style.width = "27px";
279   - box.style.height = "27px";
280   - box.style.top = parseInt(xy[1],10) - 27 +"px";
281   - box.style.left = parseInt(xy[0],10) - 13 +"px";
282   - },
283   - escondexy: function(){
284   - if($i("pingeolocal")){
285   - var box = $i("pingeolocal");
286   - box.style.display = "none";
287   - box.style.top = "0px";
288   - box.style.left = "0px";
289   - }
290   - },
291   - posicoes2pontos: function(){
292   - var ps = i3GEOF.geolocal.posicoes,
  277 + box.style.display = "block";
  278 + box.style.width = "27px";
  279 + box.style.height = "27px";
  280 + box.style.top = parseInt(xy[1],10) - 27 +"px";
  281 + box.style.left = parseInt(xy[0],10) - 13 +"px";
  282 + },
  283 + escondexy: function(){
  284 + if($i("pingeolocal")){
  285 + var box = $i("pingeolocal");
  286 + box.style.display = "none";
  287 + box.style.top = "0px";
  288 + box.style.left = "0px";
  289 + }
  290 + },
  291 + posicoes2pontos: function(){
  292 + var ps = i3GEOF.geolocal.posicoes,
293 293 n = ps.length,
294 294 i,
295 295 pontos = [];
296   - for(i=0;i < n;i++){
297   - pontos.push((ps[i].coords.longitude) + " " + ps[i].coords.latitude);
298   - }
299   - return pontos;
300   - },
301   - criaShp: function(){
302   - function ativanovotema(retorno){
303   - var pontos = i3GEOF.geolocal.posicoes2pontos(),
  296 + for(i=0;i < n;i++){
  297 + pontos.push((ps[i].coords.longitude) + " " + ps[i].coords.latitude);
  298 + }
  299 + return pontos;
  300 + },
  301 + criaShp: function(){
  302 + function ativanovotema(retorno){
  303 + var pontos = i3GEOF.geolocal.posicoes2pontos(),
304 304 temaNovo = retorno.data,
305 305 converteParaLinha = function(){
306 306 var cp = new cpaint();
... ... @@ -308,127 +308,126 @@ i3GEOF.geolocal = {
308 308 var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=sphPT2shp&para=linha&tema="+temaNovo;
309 309 cp.call(p,"sphPT2shp",i3GEO.atualiza);
310 310 };
311   - var p = window.parent.i3GEO.configura.locaplic+"/ferramentas/inserexy2/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=insereSHP&tema="+retorno.data;
  311 + var p = window.parent.i3GEO.configura.locaplic+"/ferramentas/inserexy2/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=insereSHP&tema="+retorno.data;
  312 + var cp = new cpaint();
  313 + cp.set_response_type("JSON");
  314 + cp.set_transfer_mode('POST');
  315 + cp.call(p,"insereSHP",converteParaLinha,"&xy="+pontos.join(" "));
  316 + }
312 317 var cp = new cpaint();
313 318 cp.set_response_type("JSON");
314   - cp.set_transfer_mode('POST');
315   - cp.call(p,"insereSHP",converteParaLinha,"&xy="+pontos.join(" "));
316   - }
317   - var cp = new cpaint();
318   - cp.set_response_type("JSON");
319   - cp.set_transfer_mode("POST");
320   - var p = window.parent.i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid;
321   - cp.call(p,"criaSHPvazio",ativanovotema,"&funcao=criashpvazio");
322   - },
323   - openlayers: {
324   - desenha: function(){
325   - // allow testing of specific renderers via "?renderer=Canvas", etc
326   - var renderer = OpenLayers.Util.getParameters(window.location.href).renderer,
327   - layer_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']),
328   - style_blue = OpenLayers.Util.extend({}, layer_style),
329   - vectorLayer,
330   - ps = i3GEOF.geolocal.posicoes,
  319 + cp.set_transfer_mode("POST");
  320 + var p = window.parent.i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid;
  321 + cp.call(p,"criaSHPvazio",ativanovotema,"&funcao=criashpvazio");
  322 + },
  323 + openlayers: {
  324 + desenha: function(){
  325 + // allow testing of specific renderers via "?renderer=Canvas", etc
  326 + var renderer = OpenLayers.Util.getParameters(window.location.href).renderer,
  327 + layer_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']),
  328 + style_blue = OpenLayers.Util.extend({}, layer_style),
  329 + vectorLayer,
  330 + ps = i3GEOF.geolocal.posicoes,
331 331 n = ps.length,
332 332 i,
333 333 point,
334   - teste,
335 334 pointFeature = [],
336 335 pointList = [];
337   -
338   - renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
339 336  
340   - style_blue.strokeColor = "blue";
341   - style_blue.fillColor = "yellow";
342   - style_blue.graphicName = "square";
343   - style_blue.pointRadius = 3;
344   - style_blue.strokeWidth = 2;
345   - style_blue.rotation = 0;
346   - style_blue.strokeLinecap = "butt";
347   - if(i3geoOL.getLayersByName("Coordenadas").length === 0){
348   - vectorLayer = new OpenLayers.Layer.Vector("Coordenadas", {
349   - style: layer_style,
350   - renderers: renderer
351   - });
352   - }
353   - else{
354   - vectorLayer = i3geoOL.getLayersByName("Coordenadas")[0];
355   - vectorLayer.removeFeatures(vectorLayer.features);
356   - }
357   -
358   - for(i=0;i<n;i++){
359   - point = new OpenLayers.Geometry.Point((ps[i].coords.longitude),(ps[i].coords.latitude));
360   - i3GEOF.geolocal.wgs2google(point);
361   - pointList.push(point);
362   - pointFeature.push(new OpenLayers.Feature.Vector(point,null,style_blue));
363   - }
364   -
365   - var lineFeature = new OpenLayers.Feature.Vector(
366   - new OpenLayers.Geometry.LineString(pointList),null,style_blue);
  337 + renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
  338 +
  339 + style_blue.strokeColor = "blue";
  340 + style_blue.fillColor = "yellow";
  341 + style_blue.graphicName = "square";
  342 + style_blue.pointRadius = 3;
  343 + style_blue.strokeWidth = 2;
  344 + style_blue.rotation = 0;
  345 + style_blue.strokeLinecap = "butt";
  346 + if(i3geoOL.getLayersByName("Coordenadas").length === 0){
  347 + vectorLayer = new OpenLayers.Layer.Vector("Coordenadas", {
  348 + style: layer_style,
  349 + renderers: renderer
  350 + });
  351 + }
  352 + else{
  353 + vectorLayer = i3geoOL.getLayersByName("Coordenadas")[0];
  354 + vectorLayer.removeFeatures(vectorLayer.features);
  355 + }
  356 +
  357 + for(i=0;i<n;i++){
  358 + point = new OpenLayers.Geometry.Point((ps[i].coords.longitude),(ps[i].coords.latitude));
  359 + i3GEOF.geolocal.wgs2google(point);
  360 + pointList.push(point);
  361 + pointFeature.push(new OpenLayers.Feature.Vector(point,null,style_blue));
  362 + }
  363 +
  364 + var lineFeature = new OpenLayers.Feature.Vector(
  365 + new OpenLayers.Geometry.LineString(pointList),null,style_blue);
367 366  
368   - i3geoOL.addLayer(vectorLayer);
369   - vectorLayer.addFeatures([lineFeature]);
370   - vectorLayer.addFeatures(pointFeature);
371   - i3GEOF.geolocal.panLinha(n-1);
  367 + i3geoOL.addLayer(vectorLayer);
  368 + vectorLayer.addFeatures([lineFeature]);
  369 + vectorLayer.addFeatures(pointFeature);
  370 + i3GEOF.geolocal.panLinha(n-1);
  371 + },
  372 + removeLayer: function(){
  373 + i3geoOL.removeLayer(i3geoOL.getLayersByName("Coordenadas")[0],false);
  374 + }
372 375 },
373   - removeLayer: function(){
374   - i3geoOL.removeLayer(i3geoOL.getLayersByName("Coordenadas")[0],false);
375   - }
376   - },
377   - googlemaps: {
378   - linhas: null,
379   - marca: null,
380   - desenha: function(){
381   - var ps = i3GEOF.geolocal.posicoes,
  376 + googlemaps: {
  377 + linhas: null,
  378 + marca: null,
  379 + desenha: function(){
  380 + var ps = i3GEOF.geolocal.posicoes,
382 381 n = ps.length,
383 382 i,
384 383 l,
385 384 pointFeature = [];
386   - for(i=0;i<n;i++){
387   - l = new google.maps.LatLng(ps[i].coords.latitude,ps[i].coords.longitude);
388   - pointFeature.push(
389   - l
390   - );
  385 + for(i=0;i<n;i++){
  386 + l = new google.maps.LatLng(ps[i].coords.latitude,ps[i].coords.longitude);
  387 + pointFeature.push(
  388 + l
  389 + );
  390 + }
  391 + i3GEOF.geolocal.googlemaps.removeLayer();
  392 + i3GEOF.geolocal.googlemaps.marca = new google.maps.Marker({
  393 + position: new google.maps.LatLng(ps[0].coords.latitude,ps[0].coords.longitude),
  394 + map: i3GeoMap
  395 + });
  396 + i3GEOF.geolocal.googlemaps.linhas = new google.maps.Polyline({
  397 + path: pointFeature,
  398 + geodesic: true,
  399 + strokeColor: 'blue',
  400 + strokeOpacity: 1.0,
  401 + strokeWeight: 2,
  402 + name: "Coordenadas"
  403 + });
  404 + i3GEOF.geolocal.googlemaps.linhas.setMap(i3GeoMap);
  405 + i3GEOF.geolocal.panLinha(n-1);
  406 + },
  407 + removeLayer: function(){
  408 + if(i3GEOF.geolocal.googlemaps.linhas){
  409 + i3GEOF.geolocal.googlemaps.linhas.setMap(null);
  410 + }
  411 + if(i3GEOF.geolocal.googlemaps.marca){
  412 + i3GEOF.geolocal.googlemaps.marca.setMap(null);
  413 + }
391 414 }
392   - i3GEOF.geolocal.googlemaps.removeLayer();
393   - i3GEOF.geolocal.googlemaps.marca = new google.maps.Marker({
394   - position: new google.maps.LatLng(ps[0].coords.latitude,ps[0].coords.longitude),
395   - map: i3GeoMap
396   - });
397   - i3GEOF.geolocal.googlemaps.linhas = new google.maps.Polyline({
398   - path: pointFeature,
399   - geodesic: true,
400   - strokeColor: 'blue',
401   - strokeOpacity: 1.0,
402   - strokeWeight: 2,
403   - name: "Coordenadas"
404   - });
405   - i3GEOF.geolocal.googlemaps.linhas.setMap(i3GeoMap);
406   - i3GEOF.geolocal.panLinha(n-1);
407 415 },
408   - removeLayer: function(){
409   - if(i3GEOF.geolocal.googlemaps.linhas){
410   - i3GEOF.geolocal.googlemaps.linhas.setMap(null);
  416 + //@TODO implementar desenho dos pontos e linhas
  417 + googleearth: {
  418 + desenha: function(){
  419 + },
  420 + removeLayer: function(){
411 421 }
412   - if(i3GEOF.geolocal.googlemaps.marca){
413   - i3GEOF.geolocal.googlemaps.marca.setMap(null);
414   - }
415   - }
416   - },
417   - //@TODO implementar desenho dos pontos e linhas
418   - googleearth: {
419   - desenha: function(){
420 422 },
421   - removeLayer: function(){
422   - }
423   - },
424   - wgs2google: function(obj){
425   - if(i3GEO.Interface.openlayers.googleLike === true || i3GEO.Interface.ATUAL === "googlemaps"){
426   - var projWGS84 = new OpenLayers.Projection("EPSG:4326"),
  423 + wgs2google: function(obj){
  424 + if(i3GEO.Interface.openlayers.googleLike === true || i3GEO.Interface.ATUAL === "googlemaps"){
  425 + var projWGS84 = new OpenLayers.Projection("EPSG:4326"),
427 426 proj900913 = new OpenLayers.Projection("EPSG:900913");
428   - return obj.transform(projWGS84,proj900913);
429   - }
430   - else{
431   - return obj;
  427 + return obj.transform(projWGS84,proj900913);
  428 + }
  429 + else{
  430 + return obj;
  431 + }
432 432 }
433   - }
434 433 };
... ...
ferramentas/graficointerativo1/index.js
... ... @@ -4,7 +4,7 @@ Title: Gr&amp;aacute;fico interativo 1
4 4 Representa&ccedil;&atilde;o gr&aacute;fica de dados. O gr&aacute;fico &eacute; constru&iacute;do tendo como base os atributos de um tema e &eacute; modificado
5 5 conforme o usu&aacute;rio navega pelo mapa. A renderiza&ccedil;&atilde;o do gr&aacute;fico &eacute; feito pelo navegador por meio do aplicativo openflashchart.
6 6 Os dados que ser&atilde;o utilizados no gr&aacute;fico s&atilde;o baseados em um elemento TABLE. Esse elemento pode ser montado com base na tabela
7   -de atributos e editada pelo usu&aacute;rio. Os dados podem tamb&eacute;m ser inseridos como parâmetros na inicializa&ccedil;&atilde;o da ferramenta,
  7 +de atributos e editada pelo usu&aacute;rio. Os dados podem tamb&eacute;m ser inseridos como par�metros na inicializa&ccedil;&atilde;o da ferramenta,
8 8 permitindo que o gr&aacute;fico seja utilizado por outras ferramentas.
9 9  
10 10 Veja:
... ... @@ -107,7 +107,7 @@ i3GEOF.graficointerativo1 = {
107 107 /*
108 108 * Propriedade: navegacao
109 109 *
110   - * Ativa ou n&atilde;o a navega&ccedil;&atilde;o dinâmica do mapa
  110 + * Ativa ou n&atilde;o a navega&ccedil;&atilde;o din�mica do mapa
111 111 *
112 112 * Type: {boolean}
113 113 *
... ... @@ -808,12 +808,13 @@ i3GEOF.graficointerativo1 = {
808 808 //pega os nomes das clunas
809 809 var i,n,p,
810 810 temp = $i("i3GEOgraficointerativo1ComboX"),
811   - colunas = [],
812   - cores = [],
813   - alias = [];
  811 + colunas,
  812 + cores,
  813 + alias;
814 814 if(temp.getElementsByTagName("select")[0]){
815   - colunas.push(temp.getElementsByTagName("select")[0].value);
816   - alias.push(temp.getElementsByTagName("input")[0].value);
  815 + cores = [];
  816 + colunas = [temp.getElementsByTagName("select")[0].value];
  817 + alias = [temp.getElementsByTagName("input")[0].value];
817 818 }
818 819 else{
819 820 //caso os dados tenham sido definidos como parametros
... ...
ferramentas/legenda/index.js
... ... @@ -47,7 +47,7 @@ i3GEOF.legenda = {
47 47 /*
48 48 Variavel: parDefault
49 49  
50   - Parmetros padr&atilde;o utilizados para formatar os labels
  50 + Parametros padr&atilde;o utilizados para formatar os labels
51 51 */
52 52 parDefault: "&position=MS_UR&partials=1&offsetx=0&offsety=0&minfeaturesize=auto&mindistance=auto&force=0&shadowsizex=1&shadowsizey=1&cor=0 0 0&sombray=1&sombrax=1&angulo=0&tamanho=8&fonte=bitmap&fundo=off&sombra=off&outlinecolor=off&shadowcolor=off&wrap=",
53 53 /*
... ... @@ -557,7 +557,7 @@ i3GEOF.legenda = {
557 557 i3GEOF.legenda.aviso = false;
558 558 try{
559 559 if (retorno.data != undefined){
560   - var ins = [],
  560 + var ins,
561 561 i,
562 562 ajuda,
563 563 id,
... ... @@ -565,7 +565,7 @@ i3GEOF.legenda = {
565 565 exp,
566 566 n;
567 567 if (retorno.data[0].proc === ""){
568   - ins.push("<table class=lista4 id=i3GEOlegendalegenda ><tr><td><img src='"+i3GEO.configura.locaplic+"/imagens/inverter.png' title='Inverter cores' onclick='i3GEOF.legenda.inverteCores()' style=cursor:pointer /></td><td style=background-color:white ><img src='"+i3GEO.configura.locaplic+"/imagens/tamanho.png' title='Calcula tamanho' onclick='i3GEOF.legenda.calculaTamanho()' style=cursor:pointer /></td><td style=background-color:yellow ></td><td style=background-color:yellow >nome</td><td style=background-color:yellow >express&atilde;o</td></tr>");
  568 + ins = ["<table class=lista4 id=i3GEOlegendalegenda ><tr><td><img src='"+i3GEO.configura.locaplic+"/imagens/inverter.png' title='Inverter cores' onclick='i3GEOF.legenda.inverteCores()' style=cursor:pointer /></td><td style=background-color:white ><img src='"+i3GEO.configura.locaplic+"/imagens/tamanho.png' title='Calcula tamanho' onclick='i3GEOF.legenda.calculaTamanho()' style=cursor:pointer /></td><td style=background-color:yellow ></td><td style=background-color:yellow >nome</td><td style=background-color:yellow >express&atilde;o</td></tr>"];
569 569 n = retorno.data.length;
570 570 for (i=0;i<n;i++){
571 571 id = retorno.data[i].tema+"-"+retorno.data[i].idclasse; //layer+indice da classe
... ... @@ -994,7 +994,6 @@ i3GEOF.legenda = {
994 994 $i("i3GEOlegendaguia1obj").style.display="none";
995 995 $i("i3GEOlegendaguia3obj").style.display="block";
996 996 id = id.split("-");
997   - var p,cp;
998 997 i3GEOF.legenda.classe = id[1];
999 998 i3GEOF.legenda.estilo = 0;
1000 999 i3GEOF.legenda.formEditorSimbolo();
... ...
ferramentas/tabela/index.js
... ... @@ -495,7 +495,7 @@ i3GEOF.tabela = {
495 495 temp = function(retorno){
496 496 i3GEOF.tabela.aguarde.visibility = "hidden";
497 497 if (retorno.data !== undefined){
498   - var ins = [],
  498 + var ins,
499 499 i,
500 500 vals,
501 501 cor,
... ... @@ -644,7 +644,7 @@ i3GEOF.tabela = {
644 644 */
645 645 montaTabela: function(retorno){
646 646 if (retorno.data !== undefined){
647   - var ins = [],
  647 + var ins,
648 648 i,
649 649 vals,
650 650 cor,
... ... @@ -1152,7 +1152,7 @@ i3GEOF.tabela = {
1152 1152 /*
1153 1153 Function: retornaPar
1154 1154  
1155   - Monta os parâmetros adicionais de cada tipo de gr&aacute;fico
  1155 + Monta os par�metros adicionais de cada tipo de gr&aacute;fico
1156 1156 */
1157 1157 retornaPar: function(id){
1158 1158 try{
... ... @@ -1565,7 +1565,7 @@ i3GEOF.tabela = {
1565 1565 /*
1566 1566 Function: montaPar
1567 1567  
1568   - Monta os parâmetros para um determinado tipo de gr&aacute;fico, que ser&atilde;o utilizados na chamada ajax de cria&ccedil;&atilde;o do gr&aacute;fico
  1568 + Monta os par�metros para um determinado tipo de gr&aacute;fico, que ser&atilde;o utilizados na chamada ajax de cria&ccedil;&atilde;o do gr&aacute;fico
1569 1569 */
1570 1570 montapar: function(parametros){
1571 1571 try{
... ...