Commit ea4ed5ba89e9ace5fc357d144223ab4501fae41c
1 parent
52fe5509
Exists in
master
and in
7 other branches
Inclusão de novo exemplo para interface googlemaps
Showing
2 changed files
with
146 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,143 @@ | @@ -0,0 +1,143 @@ | ||
1 | +<?php | ||
2 | +include_once(dirname(__FILE__)."/../classesphp/pega_variaveis.php"); | ||
3 | +?> | ||
4 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
5 | +<html> | ||
6 | +<head> | ||
7 | +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | ||
8 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | ||
9 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
10 | +<title>i3GEO - Google Maps</title> | ||
11 | +<script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=drawing,geometry"></script> | ||
12 | +<script type="text/javascript" src="../classesjs/i3geo.js"></script> | ||
13 | +<link rel="stylesheet" type="text/css" href="../css/black.css"> | ||
14 | +<style> | ||
15 | +.BtLegend { | ||
16 | + left: 10px; | ||
17 | + top: 0px; | ||
18 | + z-index: 10000; | ||
19 | +} | ||
20 | +.BtLayerList{ | ||
21 | + display: none; | ||
22 | + -moz-user-select: none; | ||
23 | + background-clip: padding-box; | ||
24 | + background-color: #fff; | ||
25 | + color: #000; | ||
26 | + direction: ltr; | ||
27 | + font-family: Roboto,Arial,sans-serif; | ||
28 | + font-size: 11px; | ||
29 | + font-weight: 500; | ||
30 | + overflow-x: hidden; | ||
31 | + overflow-y: hidden; | ||
32 | + padding: 8px; | ||
33 | + text-align: left; | ||
34 | +} | ||
35 | +.BtLegendHeader { | ||
36 | + -moz-user-select: none; | ||
37 | + background-clip: padding-box; | ||
38 | + background-color: #fff; | ||
39 | + border-bottom-left-radius: 2px; | ||
40 | + border-top-left-radius: 2px; | ||
41 | + box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3); | ||
42 | + color: #000; | ||
43 | + direction: ltr; | ||
44 | + font-family: Roboto,Arial,sans-serif; | ||
45 | + font-size: 11px; | ||
46 | + font-weight: 500; | ||
47 | + min-width: 28px; | ||
48 | + overflow-x: hidden; | ||
49 | + overflow-y: hidden; | ||
50 | + padding-bottom: 8px; | ||
51 | + padding-left: 8px; | ||
52 | + padding-right: 8px; | ||
53 | + padding-top: 8px; | ||
54 | + position: relative; | ||
55 | + text-align: center; | ||
56 | + margin: 20px 10px 1px -10px; | ||
57 | + cursor: pointer; | ||
58 | +} | ||
59 | + | ||
60 | +.botoesLegendaFlutuante { | ||
61 | + display: none; | ||
62 | +} | ||
63 | +</style> | ||
64 | +</head> | ||
65 | +<body id="i3geo" style='background: white;'> | ||
66 | +<div id="contemImg" style="height:100%;width:100%"> | ||
67 | + <div id=googlemapsdiv style="position: relative;height:100%;width:100%"></div> | ||
68 | +</div> | ||
69 | + | ||
70 | + <script type="text/javascript"> | ||
71 | +i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | ||
72 | + | ||
73 | +i3GEO.configura.mashuppar = "&mapext=<?php echo $mapext;?>&temasa=<?php echo $temasa;?>&layers=<?php echo $layers;?>"; | ||
74 | + | ||
75 | +i3GEO.Interface.ATUAL = "googlemaps"; | ||
76 | +i3GEO.Interface.IDCORPO = "contemImg"; | ||
77 | + | ||
78 | +i3GEO.configura.diminuiyN = 0; | ||
79 | +i3GEO.configura.diminuiyM = 0; | ||
80 | + | ||
81 | +i3GEO.configura.autotamanho = false; | ||
82 | +i3GEO.Interface.openlayers.TILES = true; | ||
83 | +i3GEO.cria(); | ||
84 | +i3GEO.configura.mapaRefDisplay = "none"; | ||
85 | +i3GEO.configura.guardaExtensao = false; | ||
86 | +i3GEO.barraDeBotoes.TIPO = ""; | ||
87 | +i3GEO.ajuda.ATIVAJANELA = false; | ||
88 | + | ||
89 | +i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = false; | ||
90 | +i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; | ||
91 | +i3GEO.arvoreDeCamadas.MOSTRATITULO = false; | ||
92 | +i3GEO.mapa.AUTORESIZE = true; | ||
93 | +//nao marca o centro do mapa | ||
94 | +i3GEO.navega.marcaCentroDoMapa = function(){}; | ||
95 | + | ||
96 | +i3GEO.janela.ativaAlerta(); | ||
97 | +i3GEO.janela.ESTILOAGUARDE = "nenhum"; | ||
98 | + | ||
99 | +//i3GEO.Interface.googlemaps.TIPOMAPA = "satellite"; | ||
100 | + | ||
101 | +i3GEO.finaliza = function(){ | ||
102 | +}; | ||
103 | + | ||
104 | +i3GEO.finalizaAPI = function(){ | ||
105 | + //monta o botao para mostrar a legenda | ||
106 | + var divMap = i3GeoMap.getDiv(); | ||
107 | + var container = document.createElement("div"); | ||
108 | + container.className = "BtLegend"; | ||
109 | + | ||
110 | + var layerList = document.createElement("div"); | ||
111 | + layerList.id = "arvoreDeCamadas"; | ||
112 | + | ||
113 | + layerList.className = "BtLayerList i3GEOarvCam"; | ||
114 | + var h = document.createElement("div"); | ||
115 | + h.innerHTML = "<div class='BtLegendHeader'>Legenda</div>"; | ||
116 | + h.alt = "Legenda das camadas do mapa"; | ||
117 | + h.style.width = "60px"; | ||
118 | + google.maps.event.addDomListener(h, 'click', function() { | ||
119 | + //i3GEO.mapa.legendaHTML.libera("sim"); | ||
120 | + if(layerList.style.display === "block"){ | ||
121 | + layerList.style.display = "none"; | ||
122 | + } | ||
123 | + else{ | ||
124 | + layerList.style.display = "block"; | ||
125 | + i3GEO.arvoreDeCamadas.inicia("arvoreDeCamadas"); | ||
126 | + } | ||
127 | + return false; | ||
128 | + }); | ||
129 | + google.maps.event.addDomListener(h, 'mouseover', function(evt) { | ||
130 | + evt.stopPropagation(); | ||
131 | + }); | ||
132 | + google.maps.event.addDomListener(container, 'mouseover', function(evt) { | ||
133 | + evt.stopPropagation(); | ||
134 | + }); | ||
135 | + YAHOO.util.Event.addListener(container, "click", YAHOO.util.Event.stopPropagation); | ||
136 | + container.appendChild(h); | ||
137 | + container.appendChild(layerList); | ||
138 | + i3GeoMap.controls[google.maps.ControlPosition.TOP_LEFT].push(container); | ||
139 | + }; | ||
140 | +i3GEO.inicia(); | ||
141 | +</script> | ||
142 | +</body> | ||
143 | +</html> |
exemplos/index.html
@@ -273,6 +273,9 @@ body, td { | @@ -273,6 +273,9 @@ body, td { | ||
273 | <h2>Interface Google Maps</h2> | 273 | <h2>Interface Google Maps</h2> |
274 | <fieldset> | 274 | <fieldset> |
275 | <p> | 275 | <p> |
276 | + <a href="gm1.php?&temasa=_lbiomashp,_llocali&layers=_lbiomashp&mapext=-76,-39,-29,9" target="_blank">Sem nenhum componente adicional, apenas um botão "legenda" com a árvore de camadas</a> | ||
277 | + </p> | ||
278 | + <p> | ||
276 | <a href="googlemapssanfona.phtml" target="_blank">Guias do tipo sanfona</a> | 279 | <a href="googlemapssanfona.phtml" target="_blank">Guias do tipo sanfona</a> |
277 | </p> | 280 | </p> |
278 | <p> | 281 | <p> |