diff --git a/ferramentas/area/dicionario.js b/ferramentas/area/dicionario.js
index 82967bd..9afd767 100755
--- a/ferramentas/area/dicionario.js
+++ b/ferramentas/area/dicionario.js
@@ -1,7 +1,12 @@
//+$trad(1,i3GEOF.area.dicionario)+
i3GEOF.area.dicionario = {
- 'ajuda' : [{
- pt : "",
+ 'incorporar' : [{
+ pt : "Incroporar figura ao mapa",
+ en : "",
+ es : ""
+ }],
+ 'inicia' : [{
+ pt : "Clique em diferentes pontos do mapa para traçar um polígono",
en : "",
es : ""
}]
diff --git a/ferramentas/area/index.js b/ferramentas/area/index.js
index bd48d84..88cfc4c 100755
--- a/ferramentas/area/index.js
+++ b/ferramentas/area/index.js
@@ -20,24 +20,22 @@ i3GEOF.area =
* Susbtitutos para o template
*/
mustacheHash : function() {
-
+ var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.area.dicionario);
+ dicionario["sid"] = i3GEO.configura.sid;
+ dicionario["locaplic"] = i3GEO.configura.locaplic;
+ return dicionario;
},
inicia : function(iddiv) {
+ if(i3GEOF.area.MUSTACHE == ""){
+ $.get(i3GEO.configura.locaplic + "/ferramentas/area/template_mst.html", function(template) {
+ i3GEOF.area.MUSTACHE = template;
+ i3GEOF.area.inicia(iddiv);
+ });
+ return;
+ }
i3GEO.eventos.cliquePerm.desativa();
$i(iddiv).innerHTML += i3GEOF.area.html();
i3GEOF.area[i3GEO.Interface["ATUAL"]].inicia();
- //
- // botao que abre a ferramenta de calculo de perfis.
- // pontosdistobj contem as coordenadas dos pontos
- //
- new YAHOO.widget.Button("i3GEObotaoAreaWkt", {
- onclick : {
- fn : function() {
- i3GEO.mapa.dialogo.wkt2layer(i3GEOF.area.ultimoWkt, i3GEOF.area.ultimaMedida);
- }
- }
- });
-
},
/*
* Function: html
@@ -49,13 +47,7 @@ i3GEOF.area =
* String com o código html
*/
html : function() {
- var ins = '
'
- // + '
'
- // + '
' + i3GEO.desenho.caixaEstilos() + '
'
- + '
'
- + '
'
- + '
'
- + '
';
+ var ins = Mustache.render(i3GEOF.area.MUSTACHE, i3GEOF.area.mustacheHash());
return ins;
},
/*
@@ -72,12 +64,29 @@ i3GEOF.area =
minimiza = "";
// cria a janela flutuante
titulo =
- ""
- + ""+$trad("areaAprox")+"";
janela =
- i3GEO.janela.cria("220px", "auto", "", "", "", titulo, "i3GEOF.area", false, "hd", cabecalho, minimiza, "", true, "", "", "nao");
+ i3GEO.janela.cria(
+ "250px",
+ "auto",
+ "",
+ "",
+ "",
+ titulo,
+ "i3GEOF.area",
+ false,
+ "hd",
+ cabecalho,
+ minimiza,
+ "",
+ true,
+ "",
+ "",
+ "nao",
+ ""
+ );
divid = janela[2].id;
i3GEOF.area.inicia(divid);
temp =
@@ -319,25 +328,22 @@ i3GEOF.area =
var mostra = $i("mostraarea_calculo"), texto;
if (mostra) {
texto =
- "" + $trad("d21at")
- + ": "
+ "total
" + $trad("d21at")
+ + " km2: "
+ (area / 1000000).toFixed(3)
- + " km2"
- + "
"
+ + "
"
+ $trad("d21at")
- + ": "
+ + " ha: "
+ (area / 10000).toFixed(2)
- + " ha"
- + "
"
+ + "
"
+ $trad("x98")
- + ": "
+ + " km: "
+ (per).toFixed(2)
- + " km"
+ "
"
+ $trad("x25")
+ ": "
+ i3GEO.calculo.metododistancia;
- mostra.innerHTML = texto;
+ mostra.innerHTML = texto + "
";
i3GEOF.area.ultimaMedida = (area / 1000000).toFixed(3) + " km2";
}
},
@@ -348,28 +354,24 @@ i3GEOF.area =
var mostra = $i("mostraarea_calculo_parcial"), texto;
if (mostra) {
texto =
- "" + $trad("d21at")
- + ": "
+ "parcial
" + $trad("d21at")
+ + " km2:"
+ (area / 1000000).toFixed(3)
- + " km2"
- + "
"
+ + "
"
+ $trad("d21at")
- + ": "
+ + " ha: "
+ (area / 10000).toFixed(2)
- + " ha"
- + "
"
+ + "
"
+ $trad("x95")
- + ": "
+ + " km: "
+ trecho.toFixed(3)
- + " km"
- + "
"
+ + "
"
+ $trad("x98")
- + ": "
+ + " km: "
+ (per).toFixed(3)
- + " km"
- + "
"
+ + "
"
+ $trad("x23")
- + " (DMS): "
+ + " (DMS):"
+ direcao;
mostra.innerHTML = texto;
}
@@ -544,25 +546,22 @@ i3GEOF.area =
var mostra = $i("mostraarea_calculo"), texto;
if (mostra) {
texto =
- "" + $trad("d21at")
- + ": "
+ "total
" + $trad("d21at")
+ + " km2: "
+ (area / 1000000).toFixed(3)
- + " km2"
- + "
"
+ + "
"
+ $trad("d21at")
- + ": "
+ + " ha: "
+ (area / 10000).toFixed(2)
- + " ha"
- + "
"
+ + "
"
+ $trad("x98")
- + ": "
+ + " km: "
+ (per).toFixed(2)
- + " km"
+ "
"
+ $trad("x25")
+ ": "
+ i3GEO.calculo.metododistancia;
- mostra.innerHTML = texto;
+ mostra.innerHTML = texto + "
";
i3GEOF.area.ultimaMedida = (area / 1000000).toFixed(3) + " km2";
}
},
@@ -573,28 +572,24 @@ i3GEOF.area =
var mostra = $i("mostraarea_calculo_parcial"), texto;
if (mostra) {
texto =
- "" + $trad("d21at")
- + ": "
+ "parcial
" + $trad("d21at")
+ + " km2: "
+ (area / 1000000).toFixed(3)
- + " km2"
- + "
"
+ + "
"
+ $trad("d21at")
- + ": "
+ + " ha: "
+ (area / 10000).toFixed(2)
- + " ha"
- + "
"
+ + "
"
+ $trad("x95")
- + ": "
+ + " km: "
+ trecho.toFixed(3)
- + " km"
- + "
"
+ + "
"
+ $trad("x98")
- + ": "
+ + " km: "
+ (per).toFixed(3)
- + " km"
- + "
"
+ + "
"
+ $trad("x23")
- + " (DMS): "
+ + " (DMS): "
+ direcao;
mostra.innerHTML = texto;
}
diff --git a/ferramentas/area/template_mst.html b/ferramentas/area/template_mst.html
index 281c686..67f9046 100755
--- a/ferramentas/area/template_mst.html
+++ b/ferramentas/area/template_mst.html
@@ -1 +1,6 @@
-
\ No newline at end of file
+
+
{{{inicia}}}
+
+
+
+
\ No newline at end of file
--
libgit2 0.21.2