Commit 820bffdcd3482fb7d89330197d2514b203a523ec
1 parent
e80046de
Exists in
master
and in
7 other branches
Inclusão de exemplo de montagem da arvore de camadas por meio de sobrescrita de funcoes
Showing
2 changed files
with
62 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,60 @@ | @@ -0,0 +1,60 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | ||
5 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | ||
6 | +<title>i3GEO - OpenLayers</title> | ||
7 | +<script src="../classesjs/i3geonaocompacto.js"></script> | ||
8 | +<script src="../pacotes/openlayers/OpenLayers2131.js"></script> | ||
9 | +<link rel="stylesheet" type="text/css" href="../css/black.css"> | ||
10 | +</head> | ||
11 | +<body style='margin-left:7px;background:white;' class=yui-skin-sam > | ||
12 | +<div style="top:50px;"> | ||
13 | + <div id="arvoreDeCamadas" style="width:250px;height:400px;border:1px solid;float:left;overflow:auto;"> | ||
14 | + | ||
15 | + </div> | ||
16 | + <div id=i3geo > | ||
17 | + <div id=corpoMapa style="left:255px;width:700px;height:400px;background-image:url('../imagens/i3geo1bw.jpg');"> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | +</div> | ||
21 | +<div id="logMapa" ></div> | ||
22 | +<script> | ||
23 | +/************ | ||
24 | +As funcoes utilizadas pelo i3Geo podem ser sobrepostas por outras com conteudo modificado. | ||
25 | + | ||
26 | +Sobreescrever funcoes evita que o codigo original seja alterado. | ||
27 | + | ||
28 | +Nesse exemplo a funcao i3GEO.arvoreDeCamadas.atualiza e sobrescrita para que a lista de camadas | ||
29 | +seja montada de forma totalmente diferente do original | ||
30 | + | ||
31 | +************/ | ||
32 | + | ||
33 | +i3GEO.idioma.MOSTRASELETOR = false; //para nao mostrar as bandeiras de escolha do idioma | ||
34 | +//camadas adicionais e quais ficarao visiveis | ||
35 | +i3GEO.mapa.TEMASINICIAIS = "_lbiomashp,_llocali"; | ||
36 | +i3GEO.mapa.TEMASINICIAISLIGADOS = "_lbiomashp"; | ||
37 | +//altera a funcao que atualiza a arvore de camadas | ||
38 | +i3GEO.arvoreDeCamadas.atualiza = function(temas){ | ||
39 | + if(!temas){ | ||
40 | + temas = i3GEO.arvoreDeCamadas.CAMADAS; | ||
41 | + } | ||
42 | + var ltema,j,i,c = temas.length,textoTema = []; | ||
43 | + for (i = 0, j = c; i < j; i += 1) { | ||
44 | + ltema = temas[i]; | ||
45 | + if ((ltema.escondido).toLowerCase() !== "sim") { | ||
46 | + textoTema.push(i3GEO.arvoreDeCamadas.montaTextoTema(ltema)); | ||
47 | + } | ||
48 | + } | ||
49 | + $i("arvoreDeCamadas").innerHTML = textoTema.join("<br>"); | ||
50 | +}; | ||
51 | + | ||
52 | +i3GEO.finalizaAPI = function(){ | ||
53 | + i3GEO.arvoreDeCamadas.inicia("arvoreDeCamadas"); | ||
54 | +}; | ||
55 | +i3GEO.cria(); | ||
56 | +i3GEO.inicia(); | ||
57 | + | ||
58 | +</script> | ||
59 | +</body> | ||
60 | +</html> |
exemplos/index.html
@@ -85,6 +85,8 @@ body,td { | @@ -85,6 +85,8 @@ body,td { | ||
85 | <a href="codemirror.php?&pagina=cursodsv12.htm" target="_blank">[12]</a> | 85 | <a href="codemirror.php?&pagina=cursodsv12.htm" target="_blank">[12]</a> |
86 | | 86 | |
87 | <a href="codemirror.php?&pagina=cursodsv13.htm" target="_blank">[13]</a> | 87 | <a href="codemirror.php?&pagina=cursodsv13.htm" target="_blank">[13]</a> |
88 | + | ||
89 | + <a href="codemirror.php?&pagina=cursodsv14.htm" target="_blank">[14]</a> | ||
88 | </p> | 90 | </p> |
89 | </fieldset> | 91 | </fieldset> |
90 | <fieldset> | 92 | <fieldset> |