Commit 72deca6edc2b1a04c9e46b57de69a7c350426deb
1 parent
1d0367e3
Exists in
master
and in
7 other branches
--no commit message
Showing
16 changed files
with
1944 additions
and
1686 deletions
Show diff stats
admin/admin.db
No preview for this file type
css/geral.css
| ... | ... | @@ -9,15 +9,52 @@ para nao selecionar |
| 9 | 9 | user-select: none; |
| 10 | 10 | } |
| 11 | 11 | /* |
| 12 | -.olPopupCloseBox { | |
| 13 | - background: url("img/edit-delete.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0); | |
| 14 | - cursor: pointer; | |
| 15 | - padding: 3px; | |
| 16 | - background-position: 7px 0px; | |
| 17 | - margin-right: -5px; | |
| 18 | - margin-top: -5px; | |
| 19 | -} | |
| 12 | +Popup do identifica no openlayers 3 | |
| 20 | 13 | */ |
| 14 | +.ol-popup { | |
| 15 | + position: absolute; | |
| 16 | + background-color: white; | |
| 17 | + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 18 | + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 19 | + padding: 8px; | |
| 20 | + border-radius: 10px; | |
| 21 | + border: 1px solid #cccccc; | |
| 22 | + bottom: 12px; | |
| 23 | + left: -50px; | |
| 24 | +} | |
| 25 | +.ol-popup:after, .ol-popup:before { | |
| 26 | + top: 100%; | |
| 27 | + border: solid transparent; | |
| 28 | + content: " "; | |
| 29 | + height: 0; | |
| 30 | + width: 0; | |
| 31 | + position: absolute; | |
| 32 | + pointer-events: none; | |
| 33 | +} | |
| 34 | +.ol-popup:after { | |
| 35 | + border-top-color: white; | |
| 36 | + border-width: 10px; | |
| 37 | + left: 48px; | |
| 38 | + margin-left: -10px; | |
| 39 | +} | |
| 40 | +.ol-popup:before { | |
| 41 | + border-top-color: #cccccc; | |
| 42 | + border-width: 11px; | |
| 43 | + left: 48px; | |
| 44 | + margin-left: -11px; | |
| 45 | +} | |
| 46 | +.ol-popup-closer { | |
| 47 | + text-decoration: none; | |
| 48 | + position: absolute; | |
| 49 | + top: 2px; | |
| 50 | + right: 1px; | |
| 51 | + cursor:pointer; | |
| 52 | +} | |
| 53 | +.ol-popup-closer:after { | |
| 54 | + content: "\2716"; | |
| 55 | + color: red; | |
| 56 | + font-size: 16px; | |
| 57 | +} | |
| 21 | 58 | /* |
| 22 | 59 | Ajusta altura dos controles do googlemaps |
| 23 | 60 | */ |
| ... | ... | @@ -262,10 +299,12 @@ Utilizado na janela do buscador INDE |
| 262 | 299 | } |
| 263 | 300 | |
| 264 | 301 | .toolTipBalaoTitulo { |
| 265 | - text-decoration: underline; | |
| 302 | + text-decoration: none; | |
| 266 | 303 | text-align: left; |
| 267 | 304 | font-size: 8pt; |
| 268 | 305 | font-weight: normal; |
| 306 | + margin-top: 8px; | |
| 307 | + margin-bottom: 2px; | |
| 269 | 308 | } |
| 270 | 309 | |
| 271 | 310 | .toolTipBalaoTexto { |
| ... | ... | @@ -273,13 +312,21 @@ Utilizado na janela do buscador INDE |
| 273 | 312 | font-size: 8pt; |
| 274 | 313 | background-color: #E0E0E0; |
| 275 | 314 | color: black; |
| 315 | + padding: 3px; | |
| 316 | + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 317 | + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 318 | + border-radius: 6px; | |
| 276 | 319 | } |
| 277 | 320 | |
| 278 | 321 | .toolTipBalaoTexto1 { |
| 279 | 322 | text-align: left; |
| 280 | 323 | font-size: 8pt; |
| 281 | - background-color: #F8F8F8; | |
| 324 | + background-color: #e5e5e5; | |
| 282 | 325 | color: black; |
| 326 | + padding: 3px; | |
| 327 | + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 328 | + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 329 | + border-radius: 6px; | |
| 283 | 330 | } |
| 284 | 331 | |
| 285 | 332 | fieldset { | ... | ... |
css/i3geo6.css
| ... | ... | @@ -9,15 +9,52 @@ para nao selecionar |
| 9 | 9 | user-select: none; |
| 10 | 10 | } |
| 11 | 11 | /* |
| 12 | -.olPopupCloseBox { | |
| 13 | -background: url("img/edit-delete.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0); | |
| 14 | -cursor: pointer; | |
| 15 | -padding: 3px; | |
| 16 | -background-position: 7px 0px; | |
| 17 | -margin-right: -5px; | |
| 18 | -margin-top: -5px; | |
| 19 | -} | |
| 12 | +Popup do identifica no openlayers 3 | |
| 20 | 13 | */ |
| 14 | +.ol-popup { | |
| 15 | +position: absolute; | |
| 16 | +background-color: white; | |
| 17 | +-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 18 | +filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 19 | +padding: 8px; | |
| 20 | +border-radius: 10px; | |
| 21 | +border: 1px solid #cccccc; | |
| 22 | +bottom: 12px; | |
| 23 | +left: -50px; | |
| 24 | +} | |
| 25 | +.ol-popup:after, .ol-popup:before { | |
| 26 | +top: 100%; | |
| 27 | +border: solid transparent; | |
| 28 | +content: " "; | |
| 29 | +height: 0; | |
| 30 | +width: 0; | |
| 31 | +position: absolute; | |
| 32 | +pointer-events: none; | |
| 33 | +} | |
| 34 | +.ol-popup:after { | |
| 35 | +border-top-color: white; | |
| 36 | +border-width: 10px; | |
| 37 | +left: 48px; | |
| 38 | +margin-left: -10px; | |
| 39 | +} | |
| 40 | +.ol-popup:before { | |
| 41 | +border-top-color: #cccccc; | |
| 42 | +border-width: 11px; | |
| 43 | +left: 48px; | |
| 44 | +margin-left: -11px; | |
| 45 | +} | |
| 46 | +.ol-popup-closer { | |
| 47 | +text-decoration: none; | |
| 48 | +position: absolute; | |
| 49 | +top: 2px; | |
| 50 | +right: 1px; | |
| 51 | +cursor:pointer; | |
| 52 | +} | |
| 53 | +.ol-popup-closer:after { | |
| 54 | +content: "\2716"; | |
| 55 | +color: red; | |
| 56 | +font-size: 16px; | |
| 57 | +} | |
| 21 | 58 | /* |
| 22 | 59 | Ajusta altura dos controles do googlemaps |
| 23 | 60 | */ |
| ... | ... | @@ -235,22 +272,32 @@ width: 40px; |
| 235 | 272 | border: 0px solid white; |
| 236 | 273 | } |
| 237 | 274 | .toolTipBalaoTitulo { |
| 238 | -text-decoration: underline; | |
| 275 | +text-decoration: none; | |
| 239 | 276 | text-align: left; |
| 240 | 277 | font-size: 8pt; |
| 241 | 278 | font-weight: normal; |
| 279 | +margin-top: 8px; | |
| 280 | +margin-bottom: 2px; | |
| 242 | 281 | } |
| 243 | 282 | .toolTipBalaoTexto { |
| 244 | 283 | text-align: left; |
| 245 | 284 | font-size: 8pt; |
| 246 | 285 | background-color: #E0E0E0; |
| 247 | 286 | color: black; |
| 287 | +padding: 3px; | |
| 288 | +-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 289 | +filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 290 | +border-radius: 6px; | |
| 248 | 291 | } |
| 249 | 292 | .toolTipBalaoTexto1 { |
| 250 | 293 | text-align: left; |
| 251 | 294 | font-size: 8pt; |
| 252 | -background-color: #F8F8F8; | |
| 295 | +background-color: #e5e5e5; | |
| 253 | 296 | color: black; |
| 297 | +padding: 3px; | |
| 298 | +-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 299 | +filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 300 | +border-radius: 6px; | |
| 254 | 301 | } |
| 255 | 302 | fieldset { |
| 256 | 303 | text-align: left; | ... | ... |
css/i3geo6.css.php
| ... | ... | @@ -9,15 +9,52 @@ para nao selecionar |
| 9 | 9 | user-select: none; |
| 10 | 10 | } |
| 11 | 11 | /* |
| 12 | -.olPopupCloseBox { | |
| 13 | -background: url("img/edit-delete.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0); | |
| 14 | -cursor: pointer; | |
| 15 | -padding: 3px; | |
| 16 | -background-position: 7px 0px; | |
| 17 | -margin-right: -5px; | |
| 18 | -margin-top: -5px; | |
| 19 | -} | |
| 12 | +Popup do identifica no openlayers 3 | |
| 20 | 13 | */ |
| 14 | +.ol-popup { | |
| 15 | +position: absolute; | |
| 16 | +background-color: white; | |
| 17 | +-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 18 | +filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 19 | +padding: 8px; | |
| 20 | +border-radius: 10px; | |
| 21 | +border: 1px solid #cccccc; | |
| 22 | +bottom: 12px; | |
| 23 | +left: -50px; | |
| 24 | +} | |
| 25 | +.ol-popup:after, .ol-popup:before { | |
| 26 | +top: 100%; | |
| 27 | +border: solid transparent; | |
| 28 | +content: " "; | |
| 29 | +height: 0; | |
| 30 | +width: 0; | |
| 31 | +position: absolute; | |
| 32 | +pointer-events: none; | |
| 33 | +} | |
| 34 | +.ol-popup:after { | |
| 35 | +border-top-color: white; | |
| 36 | +border-width: 10px; | |
| 37 | +left: 48px; | |
| 38 | +margin-left: -10px; | |
| 39 | +} | |
| 40 | +.ol-popup:before { | |
| 41 | +border-top-color: #cccccc; | |
| 42 | +border-width: 11px; | |
| 43 | +left: 48px; | |
| 44 | +margin-left: -11px; | |
| 45 | +} | |
| 46 | +.ol-popup-closer { | |
| 47 | +text-decoration: none; | |
| 48 | +position: absolute; | |
| 49 | +top: 2px; | |
| 50 | +right: 1px; | |
| 51 | +cursor:pointer; | |
| 52 | +} | |
| 53 | +.ol-popup-closer:after { | |
| 54 | +content: "\2716"; | |
| 55 | +color: red; | |
| 56 | +font-size: 16px; | |
| 57 | +} | |
| 21 | 58 | /* |
| 22 | 59 | Ajusta altura dos controles do googlemaps |
| 23 | 60 | */ |
| ... | ... | @@ -235,22 +272,32 @@ width: 40px; |
| 235 | 272 | border: 0px solid white; |
| 236 | 273 | } |
| 237 | 274 | .toolTipBalaoTitulo { |
| 238 | -text-decoration: underline; | |
| 275 | +text-decoration: none; | |
| 239 | 276 | text-align: left; |
| 240 | 277 | font-size: 8pt; |
| 241 | 278 | font-weight: normal; |
| 279 | +margin-top: 8px; | |
| 280 | +margin-bottom: 2px; | |
| 242 | 281 | } |
| 243 | 282 | .toolTipBalaoTexto { |
| 244 | 283 | text-align: left; |
| 245 | 284 | font-size: 8pt; |
| 246 | 285 | background-color: #E0E0E0; |
| 247 | 286 | color: black; |
| 287 | +padding: 3px; | |
| 288 | +-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 289 | +filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 290 | +border-radius: 6px; | |
| 248 | 291 | } |
| 249 | 292 | .toolTipBalaoTexto1 { |
| 250 | 293 | text-align: left; |
| 251 | 294 | font-size: 8pt; |
| 252 | -background-color: #F8F8F8; | |
| 295 | +background-color: #e5e5e5; | |
| 253 | 296 | color: black; |
| 297 | +padding: 3px; | |
| 298 | +-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 299 | +filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 300 | +border-radius: 6px; | |
| 254 | 301 | } |
| 255 | 302 | fieldset { |
| 256 | 303 | text-align: left; | ... | ... |
css/i3geo_ferramentas6.css
| ... | ... | @@ -9,15 +9,52 @@ para nao selecionar |
| 9 | 9 | user-select: none; |
| 10 | 10 | } |
| 11 | 11 | /* |
| 12 | -.olPopupCloseBox { | |
| 13 | - background: url("img/edit-delete.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0); | |
| 14 | - cursor: pointer; | |
| 15 | - padding: 3px; | |
| 16 | - background-position: 7px 0px; | |
| 17 | - margin-right: -5px; | |
| 18 | - margin-top: -5px; | |
| 19 | -} | |
| 12 | +Popup do identifica no openlayers 3 | |
| 20 | 13 | */ |
| 14 | +.ol-popup { | |
| 15 | + position: absolute; | |
| 16 | + background-color: white; | |
| 17 | + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 18 | + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 19 | + padding: 8px; | |
| 20 | + border-radius: 10px; | |
| 21 | + border: 1px solid #cccccc; | |
| 22 | + bottom: 12px; | |
| 23 | + left: -50px; | |
| 24 | +} | |
| 25 | +.ol-popup:after, .ol-popup:before { | |
| 26 | + top: 100%; | |
| 27 | + border: solid transparent; | |
| 28 | + content: " "; | |
| 29 | + height: 0; | |
| 30 | + width: 0; | |
| 31 | + position: absolute; | |
| 32 | + pointer-events: none; | |
| 33 | +} | |
| 34 | +.ol-popup:after { | |
| 35 | + border-top-color: white; | |
| 36 | + border-width: 10px; | |
| 37 | + left: 48px; | |
| 38 | + margin-left: -10px; | |
| 39 | +} | |
| 40 | +.ol-popup:before { | |
| 41 | + border-top-color: #cccccc; | |
| 42 | + border-width: 11px; | |
| 43 | + left: 48px; | |
| 44 | + margin-left: -11px; | |
| 45 | +} | |
| 46 | +.ol-popup-closer { | |
| 47 | + text-decoration: none; | |
| 48 | + position: absolute; | |
| 49 | + top: 2px; | |
| 50 | + right: 1px; | |
| 51 | + cursor:pointer; | |
| 52 | +} | |
| 53 | +.ol-popup-closer:after { | |
| 54 | + content: "\2716"; | |
| 55 | + color: red; | |
| 56 | + font-size: 16px; | |
| 57 | +} | |
| 21 | 58 | /* |
| 22 | 59 | Ajusta altura dos controles do googlemaps |
| 23 | 60 | */ |
| ... | ... | @@ -262,10 +299,12 @@ Utilizado na janela do buscador INDE |
| 262 | 299 | } |
| 263 | 300 | |
| 264 | 301 | .toolTipBalaoTitulo { |
| 265 | - text-decoration: underline; | |
| 302 | + text-decoration: none; | |
| 266 | 303 | text-align: left; |
| 267 | 304 | font-size: 8pt; |
| 268 | 305 | font-weight: normal; |
| 306 | + margin-top: 8px; | |
| 307 | + margin-bottom: 2px; | |
| 269 | 308 | } |
| 270 | 309 | |
| 271 | 310 | .toolTipBalaoTexto { |
| ... | ... | @@ -273,13 +312,21 @@ Utilizado na janela do buscador INDE |
| 273 | 312 | font-size: 8pt; |
| 274 | 313 | background-color: #E0E0E0; |
| 275 | 314 | color: black; |
| 315 | + padding: 3px; | |
| 316 | + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 317 | + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 318 | + border-radius: 6px; | |
| 276 | 319 | } |
| 277 | 320 | |
| 278 | 321 | .toolTipBalaoTexto1 { |
| 279 | 322 | text-align: left; |
| 280 | 323 | font-size: 8pt; |
| 281 | - background-color: #F8F8F8; | |
| 324 | + background-color: #e5e5e5; | |
| 282 | 325 | color: black; |
| 326 | + padding: 3px; | |
| 327 | + -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 328 | + filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); | |
| 329 | + border-radius: 6px; | |
| 283 | 330 | } |
| 284 | 331 | |
| 285 | 332 | fieldset { | ... | ... |
ferramentas/cortina/index.js
| ... | ... | @@ -188,6 +188,10 @@ i3GEOF.cortina = { |
| 188 | 188 | if(i3GEOF.cortina.tema !== ""){ |
| 189 | 189 | if(i3GEO.Interface.ATUAL === "openlayers"){ |
| 190 | 190 | layer = i3geoOL.getLayersByName(i3GEOF.cortina.tema)[0]; |
| 191 | + //TODO nao funciona no OL3 | |
| 192 | + if(!layer.div){ | |
| 193 | + return; | |
| 194 | + } | |
| 191 | 195 | i3GEOF.cortina.estilo = layer.div.style; |
| 192 | 196 | } |
| 193 | 197 | if(i3GEO.Interface.ATUAL === "googlemaps"){ | ... | ... |
ferramentas/legenda/template_mst.html
| ... | ... | @@ -107,7 +107,7 @@ |
| 107 | 107 | <p class='paragrafo'> |
| 108 | 108 | |
| 109 | 109 | <input type='checkbox' onclick='' checked id='i3GEOFlegendaaplicaextent' style='cursor: pointer; border: 0px solid white;' /> |
| 110 | - <span style='cursor: pointer; position: relative; top: -2px;'>{{{consideraElementosVisisveis}}}</span> | |
| 110 | + <span style='cursor: pointer; position: relative; top: -2px;left: 2px;'>{{{consideraElementosVisisveis}}}</span> | |
| 111 | 111 | </p> |
| 112 | 112 | <p class='paragrafo'>{{{ignoraValores}}}:</p> |
| 113 | 113 | <div class='styled-select'> | ... | ... |
ferramentas/selecao/index.js
| ... | ... | @@ -34,475 +34,580 @@ Free Software Foundation, Inc., no endere&ccedil;o |
| 34 | 34 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 35 | 35 | */ |
| 36 | 36 | |
| 37 | -if(typeof(i3GEOF) === 'undefined'){ | |
| 37 | +if (typeof (i3GEOF) === 'undefined') { | |
| 38 | 38 | var i3GEOF = {}; |
| 39 | 39 | } |
| 40 | 40 | /* |
| 41 | -Classe: i3GEOF.selecao | |
| 41 | + * Classe: i3GEOF.selecao | |
| 42 | 42 | */ |
| 43 | -i3GEOF.selecao = { | |
| 44 | - tipoSel: "", | |
| 43 | +i3GEOF.selecao = | |
| 44 | + { | |
| 45 | + tipoSel : "", | |
| 45 | 46 | /* |
| 46 | - Variavel: aguarde | |
| 47 | - | |
| 48 | - Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
| 47 | + * Variavel: aguarde | |
| 48 | + * | |
| 49 | + * Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
| 49 | 50 | */ |
| 50 | - aguarde: "", | |
| 51 | + aguarde : "", | |
| 51 | 52 | /* |
| 52 | - Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário | |
| 53 | + * Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário | |
| 53 | 54 | */ |
| 54 | - criaJanelaFlutuante: function(){ | |
| 55 | + criaJanelaFlutuante : function() { | |
| 55 | 56 | i3GEOF.selecao.iniciaDicionario(); |
| 56 | 57 | }, |
| 57 | 58 | /* |
| 58 | - Function: iniciaDicionario | |
| 59 | - | |
| 60 | - Carrega o dicionário e chama a função que inicia a ferramenta | |
| 61 | - | |
| 62 | - O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | |
| 59 | + * Function: iniciaDicionario | |
| 60 | + * | |
| 61 | + * Carrega o dicionário e chama a função que inicia a ferramenta | |
| 62 | + * | |
| 63 | + * O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | |
| 63 | 64 | */ |
| 64 | - iniciaDicionario: function(){ | |
| 65 | - if(typeof(i3GEOF.selecao.dicionario) === 'undefined'){ | |
| 65 | + iniciaDicionario : function() { | |
| 66 | + if (typeof (i3GEOF.selecao.dicionario) === 'undefined') { | |
| 66 | 67 | i3GEO.util.scriptTag( |
| 67 | - i3GEO.configura.locaplic+"/ferramentas/selecao/dicionario.js", | |
| 68 | - "i3GEOF.selecao.iniciaJanelaFlutuante()", | |
| 69 | - "i3GEOF.selecao.dicionario_script" | |
| 70 | - ); | |
| 71 | - } | |
| 72 | - else{ | |
| 68 | + i3GEO.configura.locaplic + "/ferramentas/selecao/dicionario.js", | |
| 69 | + "i3GEOF.selecao.iniciaJanelaFlutuante()", | |
| 70 | + "i3GEOF.selecao.dicionario_script"); | |
| 71 | + } else { | |
| 73 | 72 | i3GEOF.selecao.iniciaJanelaFlutuante(); |
| 74 | 73 | } |
| 75 | 74 | }, |
| 76 | 75 | /* |
| 77 | - Function: inicia | |
| 78 | - | |
| 79 | - Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
| 80 | - | |
| 81 | - Parametro: | |
| 82 | - | |
| 83 | - iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
| 76 | + * Function: inicia | |
| 77 | + * | |
| 78 | + * Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
| 79 | + * | |
| 80 | + * Parametro: | |
| 81 | + * | |
| 82 | + * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
| 84 | 83 | */ |
| 85 | - inicia: function(iddiv){ | |
| 86 | - var b,i,n,ics; | |
| 87 | - try{ | |
| 84 | + inicia : function(iddiv) { | |
| 85 | + var b, i, n, ics; | |
| 86 | + try { | |
| 88 | 87 | $i(iddiv).innerHTML += i3GEOF.selecao.html(); |
| 89 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia1","i3GEOselecaoguia"); | |
| 90 | - //eventos das guias | |
| 91 | - $i("i3GEOselecaoguia4").onclick = function(){ | |
| 92 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia4","i3GEOselecaoguia"); | |
| 88 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia1", "i3GEOselecaoguia"); | |
| 89 | + // eventos das guias | |
| 90 | + $i("i3GEOselecaoguia4").onclick = function() { | |
| 91 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia4", "i3GEOselecaoguia"); | |
| 93 | 92 | }; |
| 94 | - $i("i3GEOselecaoguia1").onclick = function(){ | |
| 95 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia1","i3GEOselecaoguia"); | |
| 93 | + $i("i3GEOselecaoguia1").onclick = function() { | |
| 94 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia1", "i3GEOselecaoguia"); | |
| 96 | 95 | }; |
| 97 | - $i("i3GEOselecaoguia2").onclick = function(){ | |
| 98 | - if($i("i3GEOselecaotemasLigados")){ | |
| 99 | - if($i("i3GEOselecaotemasLigados").value === "") | |
| 100 | - {i3GEO.janela.tempoMsg($trad('selecionaTema',i3GEOF.selecao.dicionario));return;} | |
| 96 | + $i("i3GEOselecaoguia2").onclick = function() { | |
| 97 | + if ($i("i3GEOselecaotemasLigados")) { | |
| 98 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 99 | + i3GEO.janela.tempoMsg($trad('selecionaTema', i3GEOF.selecao.dicionario)); | |
| 100 | + return; | |
| 101 | + } | |
| 101 | 102 | i3GEO.mapa.ativaTema($i("i3GEOselecaotemasLigados").value); |
| 102 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia2","i3GEOselecaoguia"); | |
| 103 | - try | |
| 104 | - {$i("i3GEOselecaoparametros").innerHTML = "";} | |
| 105 | - catch(e){} | |
| 103 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia2", "i3GEOselecaoguia"); | |
| 104 | + try { | |
| 105 | + $i("i3GEOselecaoparametros").innerHTML = ""; | |
| 106 | + } catch (e) { | |
| 107 | + } | |
| 106 | 108 | i3GEOF.selecao.adicionaLinhaFiltro(); |
| 107 | 109 | } |
| 108 | 110 | }; |
| 109 | - $i("i3GEOselecaoguia3").onclick = function(){ | |
| 110 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia3","i3GEOselecaoguia"); | |
| 111 | - i3GEO.util.comboTemas( | |
| 112 | - "i3GEOselecaoTemaoverlay", | |
| 113 | - function(retorno){ | |
| 114 | - $i("i3GEOselecaooverlay").innerHTML = retorno.dados; | |
| 115 | - }, | |
| 116 | - "i3GEOselecaooverlay", | |
| 117 | - "", | |
| 118 | - false, | |
| 119 | - "naolinearSelecionados", | |
| 120 | - "display:block" | |
| 121 | - ); | |
| 111 | + $i("i3GEOselecaoguia3").onclick = function() { | |
| 112 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia3", "i3GEOselecaoguia"); | |
| 113 | + i3GEO.util.comboTemas("i3GEOselecaoTemaoverlay", function(retorno) { | |
| 114 | + $i("i3GEOselecaooverlay").innerHTML = retorno.dados; | |
| 115 | + }, "i3GEOselecaooverlay", "", false, "naolinearSelecionados", "display:block"); | |
| 122 | 116 | }; |
| 123 | 117 | i3GEOF.selecao.criaCombosTemas(); |
| 124 | 118 | |
| 125 | - i3GEO.util.mensagemAjuda("i3GEOselecaomen1",$i("i3GEOselecaomen1").innerHTML); | |
| 126 | - i3GEO.util.mensagemAjuda("i3GEOselecaomen2",$i("i3GEOselecaomen2").innerHTML); | |
| 127 | - b = new YAHOO.widget.Button( | |
| 128 | - "i3GEOselecaobotao1", | |
| 129 | - {onclick:{fn: i3GEOF.selecao.atributo}} | |
| 130 | - ); | |
| 119 | + i3GEO.util.mensagemAjuda("i3GEOselecaomen1", $i("i3GEOselecaomen1").innerHTML); | |
| 120 | + i3GEO.util.mensagemAjuda("i3GEOselecaomen2", $i("i3GEOselecaomen2").innerHTML); | |
| 121 | + b = new YAHOO.widget.Button("i3GEOselecaobotao1", { | |
| 122 | + onclick : { | |
| 123 | + fn : i3GEOF.selecao.atributo | |
| 124 | + } | |
| 125 | + }); | |
| 131 | 126 | b.addClass("rodar"); |
| 132 | - b = new YAHOO.widget.Button( | |
| 133 | - "i3GEOselecaobotao2", | |
| 134 | - {onclick:{fn: i3GEOF.selecao.aplicaselecaoTema}} | |
| 135 | - ); | |
| 127 | + b = new YAHOO.widget.Button("i3GEOselecaobotao2", { | |
| 128 | + onclick : { | |
| 129 | + fn : i3GEOF.selecao.aplicaselecaoTema | |
| 130 | + } | |
| 131 | + }); | |
| 136 | 132 | b.addClass("rodar"); |
| 137 | 133 | |
| 138 | - b = new YAHOO.widget.Button( | |
| 139 | - "i3GEOFSelecaoQuery", | |
| 140 | - {onclick:{fn: i3GEO.mapa.dialogo.queryMap}} | |
| 141 | - ); | |
| 134 | + b = new YAHOO.widget.Button("i3GEOFSelecaoQuery", { | |
| 135 | + onclick : { | |
| 136 | + fn : i3GEO.mapa.dialogo.queryMap | |
| 137 | + } | |
| 138 | + }); | |
| 142 | 139 | b.addClass("abrir"); |
| 143 | 140 | |
| 144 | 141 | i3GEOF.selecao.ativaFoco(); |
| 145 | 142 | ics = $i("i3GEOselecaoguia1obj").getElementsByTagName("button"); |
| 146 | 143 | n = ics.length; |
| 147 | - for(i=0;i<n;i++){ | |
| 144 | + for (i = 0; i < n; i++) { | |
| 148 | 145 | ics[i].style.backgroundColor = "white"; |
| 149 | 146 | ics[i].className = "iconeGuiaMovel"; |
| 150 | - ics[i].onmouseout = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOut";}; | |
| 151 | - ics[i].onmouseover = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOver";}; | |
| 147 | + ics[i].onmouseout = function() { | |
| 148 | + this.className = "iconeGuiaMovel iconeGuiaMovelMouseOut"; | |
| 149 | + }; | |
| 150 | + ics[i].onmouseover = function() { | |
| 151 | + this.className = "iconeGuiaMovel iconeGuiaMovelMouseOver"; | |
| 152 | + }; | |
| 152 | 153 | } |
| 154 | + } catch (erro) { | |
| 155 | + i3GEO.janela.tempoMsg(erro); | |
| 153 | 156 | } |
| 154 | - catch(erro){i3GEO.janela.tempoMsg(erro);} | |
| 155 | 157 | }, |
| 156 | 158 | /* |
| 157 | - Function: html | |
| 158 | - | |
| 159 | - Gera o código html para apresentação das opções da ferramenta | |
| 160 | - | |
| 161 | - Retorno: | |
| 162 | - | |
| 163 | - String com o código html | |
| 159 | + * Function: html | |
| 160 | + * | |
| 161 | + * Gera o código html para apresentação das opções da ferramenta | |
| 162 | + * | |
| 163 | + * Retorno: | |
| 164 | + * | |
| 165 | + * String com o código html | |
| 164 | 166 | */ |
| 165 | - html:function(){ | |
| 166 | - var ins = '' + | |
| 167 | - '<div id=i3GEOselecaoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">' + | |
| 168 | - ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">' + | |
| 169 | - ' <li><div id="i3GEOselecaoguia4" style="text-align: center; left: 0px;"><a><em><img class="ticPropriedades2" style="height: 14px" src="' + i3GEO.configura.locaplic + '/imagens/branco.gif"></em></a></div></li>' + | |
| 170 | - ' <li><a ><em><div id="i3GEOselecaoguia1" style="text-align:center;left:0px;" >'+$trad('mapa',i3GEOF.selecao.dicionario)+'</div></em></a></li>' + | |
| 171 | - ' <li><a ><em><div id="i3GEOselecaoguia2" style="text-align:center;left:0px;" >'+$trad('atributos',i3GEOF.selecao.dicionario)+'</div></em></a></li>' + | |
| 172 | - ' <li><a ><em><div id="i3GEOselecaoguia3" style="text-align:center;left:0px;" >'+$trad('cruzamento',i3GEOF.selecao.dicionario)+'</div></em></a></li>' + | |
| 173 | - ' </ul>' + | |
| 174 | - '</div><br>' + | |
| 175 | - '<div class=guiaobj id="i3GEOselecaoguia4obj" style="left:1px;display:none;">' + | |
| 176 | - ' <p class="paragrafo">' + | |
| 177 | - ' <input type="checkbox" onclick="" id="i3GEOFselecaoMantemFigura" style="cursor: pointer; border: 0px solid white;" />' + | |
| 178 | - ' <span style="cursor: pointer; position: relative; top: -2px;">' + $trad('mantemfigura',i3GEOF.selecao.dicionario) + '</span>' + | |
| 179 | - ' </p>' + | |
| 180 | - ' <br><p class=paragrafo >'+$trad('distanciaSelecao',i3GEOF.selecao.dicionario) + | |
| 181 | - ' <div class="styled-select">' + | |
| 182 | - ' <input type=text id=i3GEOselecaotoleranciapt value=0 /></div>' + | |
| 183 | - ' <br><p class=paragrafo ><input id=i3GEOFSelecaoQuery type=button value="' + $trad("p8") + '" /></p>' + | |
| 184 | - ' <br><div id=i3GEOselecaomen1 style=left:0px;width:95%; >' + | |
| 185 | - ' <p class=paragrafo >'+$trad('ajuda',i3GEOF.selecao.dicionario) + | |
| 186 | - ' </p></div>' + | |
| 187 | - '</div>' + | |
| 188 | - '<div class=guiaobj id="i3GEOselecaoguia1obj" style="left:1px;display:none;top:-5px">' + | |
| 189 | - ' <p class=paragrafo style=font-size:0px; ><button title="Clique no mapa para selecionar" value="i3GEOselecaopt" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)"><img id=i3GEOselecaopt src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select-one.png" /></button>'; | |
| 190 | - if(i3GEO.Interface.ATUAL != "googleearth"){ | |
| 191 | - ins += ' <button title="'+$trad('desenhaPoligono',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaopoli"><img id=i3GEOselecaopoli src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select-polygon.png" /></button>'; | |
| 167 | + html : function() { | |
| 168 | + var ins = | |
| 169 | + '' + '<div id=i3GEOselecaoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">' | |
| 170 | + + ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">' | |
| 171 | + + ' <li><div id="i3GEOselecaoguia4" style="text-align: center; left: 0px;"><a><em><img class="ticPropriedades2" style="height: 14px" src="' + i3GEO.configura.locaplic | |
| 172 | + + '/imagens/branco.gif"></em></a></div></li>' | |
| 173 | + + ' <li><a ><em><div id="i3GEOselecaoguia1" style="text-align:center;left:0px;" >' | |
| 174 | + + $trad('mapa', i3GEOF.selecao.dicionario) | |
| 175 | + + '</div></em></a></li>' | |
| 176 | + + ' <li><a ><em><div id="i3GEOselecaoguia2" style="text-align:center;left:0px;" >' | |
| 177 | + + $trad('atributos', i3GEOF.selecao.dicionario) | |
| 178 | + + '</div></em></a></li>' | |
| 179 | + + ' <li><a ><em><div id="i3GEOselecaoguia3" style="text-align:center;left:0px;" >' | |
| 180 | + + $trad('cruzamento', i3GEOF.selecao.dicionario) | |
| 181 | + + '</div></em></a></li>' | |
| 182 | + + ' </ul>' | |
| 183 | + + '</div><br>' | |
| 184 | + + '<div class=guiaobj id="i3GEOselecaoguia4obj" style="left:1px;display:none;">' | |
| 185 | + + ' <p class="paragrafo">' | |
| 186 | + + ' <input type="checkbox" onclick="" id="i3GEOFselecaoMantemFigura" style="cursor: pointer; border: 0px solid white;" />' | |
| 187 | + + ' <span style="cursor: pointer; position: relative; top: -2px;">' | |
| 188 | + + $trad('mantemfigura', i3GEOF.selecao.dicionario) | |
| 189 | + + '</span>' | |
| 190 | + + ' </p>' | |
| 191 | + + ' <br><p class=paragrafo >' | |
| 192 | + + $trad('distanciaSelecao', i3GEOF.selecao.dicionario) | |
| 193 | + + ' <div class="styled-select">' | |
| 194 | + + ' <input type=text id=i3GEOselecaotoleranciapt value=0 /></div>' | |
| 195 | + + ' <br><p class=paragrafo ><input id=i3GEOFSelecaoQuery type=button value="' | |
| 196 | + + $trad("p8") | |
| 197 | + + '" /></p>' | |
| 198 | + + ' <br><div id=i3GEOselecaomen1 style=left:0px;width:95%; >' | |
| 199 | + + ' <p class=paragrafo >' | |
| 200 | + + $trad('ajuda', i3GEOF.selecao.dicionario) | |
| 201 | + + ' </p></div>' | |
| 202 | + + '</div>' | |
| 203 | + + '<div class=guiaobj id="i3GEOselecaoguia1obj" style="left:1px;display:none;top:-5px">' | |
| 204 | + + ' <p class=paragrafo style=font-size:0px; ><button title="Clique no mapa para selecionar" value="i3GEOselecaopt" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)"><img id=i3GEOselecaopt src="' | |
| 205 | + + i3GEO.configura.locaplic | |
| 206 | + + '/imagens/gisicons/select-one.png" /></button>'; | |
| 207 | + if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 208 | + ins += | |
| 209 | + ' <button title="' + $trad('desenhaPoligono', i3GEOF.selecao.dicionario) | |
| 210 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaopoli"><img id=i3GEOselecaopoli src="' | |
| 211 | + + i3GEO.configura.locaplic | |
| 212 | + + '/imagens/gisicons/select-polygon.png" /></button>'; | |
| 192 | 213 | } |
| 193 | - ins += ' <button title="'+$trad('selecionaVisivel',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaoext" ><img id=i3GEOselecaoext src="'+i3GEO.configura.locaplic+'/imagens/gisicons/map.png" /></button>'; | |
| 194 | - ins += ' <button title="'+$trad('utilizaFiguraDesenhada',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaofigura"><img id=i3GEOselecaoFigura src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select.png" /></button>'; | |
| 195 | - | |
| 196 | - if(i3GEO.Interface.ATUAL === "openlayers"){ | |
| 197 | - ins += ' <button title="'+$trad('selecionaRetangulo',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaobox" ><img id=i3GEOselecaobox src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select-rectangle.png" /></button>'; | |
| 214 | + ins += | |
| 215 | + ' <button title="' + $trad('selecionaVisivel', i3GEOF.selecao.dicionario) | |
| 216 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaoext" ><img id=i3GEOselecaoext src="' | |
| 217 | + + i3GEO.configura.locaplic | |
| 218 | + + '/imagens/gisicons/map.png" /></button>'; | |
| 219 | + ins += | |
| 220 | + ' <button title="' + $trad('utilizaFiguraDesenhada', i3GEOF.selecao.dicionario) | |
| 221 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaofigura"><img id=i3GEOselecaoFigura src="' | |
| 222 | + + i3GEO.configura.locaplic | |
| 223 | + + '/imagens/gisicons/select.png" /></button>'; | |
| 224 | + | |
| 225 | + if (i3GEO.Interface.ATUAL === "openlayers") { | |
| 226 | + ins += | |
| 227 | + ' <button title="' + $trad('selecionaRetangulo', i3GEOF.selecao.dicionario) | |
| 228 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaobox" ><img id=i3GEOselecaobox src="' | |
| 229 | + + i3GEO.configura.locaplic | |
| 230 | + + '/imagens/gisicons/select-rectangle.png" /></button>'; | |
| 198 | 231 | } |
| 199 | - ins += ' <button title="'+$trad('inverteSelecao',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.operacao(\'inverte\')"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/selection-invert.png" /></button>' + | |
| 200 | - ' <button title="'+$trad('limpaSelecao',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.operacao(\'limpa\')"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/selected-delete.png" /></button>' + | |
| 201 | - ' <button title="'+$trad('salvaSelecao',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.criatema()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/save1.png" /></button>' + | |
| 202 | - ' <button title="'+$trad('grafico',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.grafico()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/layer-vector-chart-add.png" /></button>' + | |
| 203 | - ' <button title="'+$trad('perfil',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.graficoPerfil()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/grafico-perfil.png" /></button>' + | |
| 204 | - ' <button title="'+$trad('editor',i3GEOF.selecao.dicionario)+'" onclick="i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.editor.inicia()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/edit.png" /></button>' + | |
| 205 | - ' <div style=margin-left:8px;text-align:left; >' + | |
| 206 | - ' <div class="styled-select">' + | |
| 207 | - ' <select title="'+$trad('tipoOperacao',i3GEOF.selecao.dicionario)+'" id=i3GEOselecaotipoOperacao >' + | |
| 208 | - ' <option value="adiciona" >'+$trad('adicionaASelecao',i3GEOF.selecao.dicionario)+'</option>' + | |
| 209 | - ' <option value="novo" >'+$trad('novaSelecao',i3GEOF.selecao.dicionario)+'</option>' + | |
| 210 | - ' <option value="retira" >'+$trad('retiraDaSelecao',i3GEOF.selecao.dicionario)+'</option>' + | |
| 211 | - ' </select></div>' + | |
| 212 | - ' <span id=i3GEOselecaoNsel class=paragrafo >0</span>' + | |
| 213 | - ' <br><p class=paragrafo >'+$trad('temas',i3GEOF.selecao.dicionario)+'<div id=i3GEOselecaoComboTemas style=text-align:left; ></div>' + | |
| 214 | - ' </div> '+ | |
| 215 | - ' </div>' + | |
| 216 | - '</div>' + | |
| 217 | - '<div class=guiaobj id="i3GEOselecaoguia2obj" style="left:1px;display:none;">' + | |
| 218 | - ' <p class=paragrafo ><input id=i3GEOselecaobotao1 size=18 type="button" value="'+$trad('seleciona',i3GEOF.selecao.dicionario)+'" /></p>'+ | |
| 219 | - ' <table summary="" id="i3GEOselecaoparametros" style="width:380px" >'+ | |
| 220 | - ' <tbody><tr><td></td><td></td>'+ | |
| 221 | - ' <td style=background-color:yellow >'+$trad('item',i3GEOF.selecao.dicionario)+'</td>'+ | |
| 222 | - ' <td style=background-color:yellow >'+$trad('operador',i3GEOF.selecao.dicionario)+'</td>'+ | |
| 223 | - ' <td style=background-color:yellow >'+$trad('valor',i3GEOF.selecao.dicionario)+'</td>'+ | |
| 224 | - ' <td style=background-color:yellow ></td>'+ | |
| 225 | - ' <td style=background-color:yellow >'+$trad('conector',i3GEOF.selecao.dicionario)+'</td>'+ | |
| 226 | - ' </tr>'+ | |
| 227 | - ' <tr><td> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody>'+ | |
| 228 | - ' </table>'+ | |
| 229 | - ' <div id=i3GEOselecaoresultado style="position:relative;top:5px;left:0px">'+ | |
| 230 | - ' </div>'+ | |
| 231 | - ' <div id=i3GEOselecaovalores style="position:relative;top:5px;left:0px">'+ | |
| 232 | - ' </div>'+ | |
| 233 | - ' <div id=i3GEOselecaomen2 style=top:15px;left:0px; ><p class=paragrafo >'+$trad('separaComVirgula',i3GEOF.selecao.dicionario)+'</div>'+ | |
| 234 | - '</div> '+ | |
| 235 | - '<div class=guiaobj id="i3GEOselecaoguia3obj" style="left:1px;display:none;">' + | |
| 236 | - ' <p class=paragrafo >'+$trad('temaSelecaoMapa',i3GEOF.selecao.dicionario)+'</p>'+ | |
| 237 | - ' <div id="i3GEOselecaooverlay" class="styled-select" >' + | |
| 238 | - ' </div>' + | |
| 239 | - ' <br><p class=paragrafo ><input id=i3GEOselecaobotao2 size=10 type=button value="'+$trad('aplica',i3GEOF.selecao.dicionario)+'">' + | |
| 240 | - '</div>'; | |
| 232 | + ins += | |
| 233 | + ' <button title="' + $trad('inverteSelecao', i3GEOF.selecao.dicionario) | |
| 234 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.operacao(\'inverte\')"><img src="' | |
| 235 | + + i3GEO.configura.locaplic | |
| 236 | + + '/imagens/gisicons/selection-invert.png" /></button>' | |
| 237 | + + ' <button title="' | |
| 238 | + + $trad('limpaSelecao', i3GEOF.selecao.dicionario) | |
| 239 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.operacao(\'limpa\')"><img src="' | |
| 240 | + + i3GEO.configura.locaplic | |
| 241 | + + '/imagens/gisicons/selected-delete.png" /></button>' | |
| 242 | + + ' <button title="' | |
| 243 | + + $trad('salvaSelecao', i3GEOF.selecao.dicionario) | |
| 244 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.criatema()"><img src="' | |
| 245 | + + i3GEO.configura.locaplic | |
| 246 | + + '/imagens/gisicons/save1.png" /></button>' | |
| 247 | + + ' <button title="' | |
| 248 | + + $trad('grafico', i3GEOF.selecao.dicionario) | |
| 249 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.grafico()"><img src="' | |
| 250 | + + i3GEO.configura.locaplic | |
| 251 | + + '/imagens/gisicons/layer-vector-chart-add.png" /></button>' | |
| 252 | + + ' <button title="' | |
| 253 | + + $trad('perfil', i3GEOF.selecao.dicionario) | |
| 254 | + + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.graficoPerfil()"><img src="' | |
| 255 | + + i3GEO.configura.locaplic | |
| 256 | + + '/imagens/gisicons/grafico-perfil.png" /></button>' | |
| 257 | + + ' <button title="' | |
| 258 | + + $trad('editor', i3GEOF.selecao.dicionario) | |
| 259 | + + '" onclick="i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.editor.inicia()"><img src="' | |
| 260 | + + i3GEO.configura.locaplic | |
| 261 | + + '/imagens/gisicons/edit.png" /></button>' | |
| 262 | + + ' <div style=margin-left:8px;text-align:left; >' | |
| 263 | + + ' <div class="styled-select">' | |
| 264 | + + ' <select title="' | |
| 265 | + + $trad('tipoOperacao', i3GEOF.selecao.dicionario) | |
| 266 | + + '" id=i3GEOselecaotipoOperacao >' | |
| 267 | + + ' <option value="adiciona" >' | |
| 268 | + + $trad('adicionaASelecao', i3GEOF.selecao.dicionario) | |
| 269 | + + '</option>' | |
| 270 | + + ' <option value="novo" >' | |
| 271 | + + $trad('novaSelecao', i3GEOF.selecao.dicionario) | |
| 272 | + + '</option>' | |
| 273 | + + ' <option value="retira" >' | |
| 274 | + + $trad('retiraDaSelecao', i3GEOF.selecao.dicionario) | |
| 275 | + + '</option>' | |
| 276 | + + ' </select></div>' | |
| 277 | + + ' <span id=i3GEOselecaoNsel class=paragrafo >0</span>' | |
| 278 | + + ' <br><p class=paragrafo >' | |
| 279 | + + $trad('temas', i3GEOF.selecao.dicionario) | |
| 280 | + + '<div id=i3GEOselecaoComboTemas style=text-align:left; ></div>' | |
| 281 | + + ' </div> ' | |
| 282 | + + ' </div>' | |
| 283 | + + '</div>' | |
| 284 | + + '<div class=guiaobj id="i3GEOselecaoguia2obj" style="left:1px;display:none;">' | |
| 285 | + + ' <p class=paragrafo ><input id=i3GEOselecaobotao1 size=18 type="button" value="' | |
| 286 | + + $trad('seleciona', i3GEOF.selecao.dicionario) | |
| 287 | + + '" /></p>' | |
| 288 | + + ' <table summary="" id="i3GEOselecaoparametros" style="width:380px" >' | |
| 289 | + + ' <tbody><tr><td></td><td></td>' | |
| 290 | + + ' <td style=background-color:yellow >' | |
| 291 | + + $trad('item', i3GEOF.selecao.dicionario) | |
| 292 | + + '</td>' | |
| 293 | + + ' <td style=background-color:yellow >' | |
| 294 | + + $trad('operador', i3GEOF.selecao.dicionario) | |
| 295 | + + '</td>' | |
| 296 | + + ' <td style=background-color:yellow >' | |
| 297 | + + $trad('valor', i3GEOF.selecao.dicionario) | |
| 298 | + + '</td>' | |
| 299 | + + ' <td style=background-color:yellow ></td>' | |
| 300 | + + ' <td style=background-color:yellow >' | |
| 301 | + + $trad('conector', i3GEOF.selecao.dicionario) | |
| 302 | + + '</td>' | |
| 303 | + + ' </tr>' | |
| 304 | + + ' <tr><td> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody>' | |
| 305 | + + ' </table>' | |
| 306 | + + ' <div id=i3GEOselecaoresultado style="position:relative;top:5px;left:0px">' | |
| 307 | + + ' </div>' | |
| 308 | + + ' <div id=i3GEOselecaovalores style="position:relative;top:5px;left:0px">' | |
| 309 | + + ' </div>' | |
| 310 | + + ' <div id=i3GEOselecaomen2 style=top:15px;left:0px; ><p class=paragrafo >' | |
| 311 | + + $trad('separaComVirgula', i3GEOF.selecao.dicionario) | |
| 312 | + + '</div>' | |
| 313 | + + '</div> ' | |
| 314 | + + '<div class=guiaobj id="i3GEOselecaoguia3obj" style="left:1px;display:none;">' | |
| 315 | + + ' <p class=paragrafo >' | |
| 316 | + + $trad('temaSelecaoMapa', i3GEOF.selecao.dicionario) | |
| 317 | + + '</p>' | |
| 318 | + + ' <div id="i3GEOselecaooverlay" class="styled-select" >' | |
| 319 | + + ' </div>' | |
| 320 | + + ' <br><p class=paragrafo ><input id=i3GEOselecaobotao2 size=10 type=button value="' | |
| 321 | + + $trad('aplica', i3GEOF.selecao.dicionario) | |
| 322 | + + '">' | |
| 323 | + + '</div>'; | |
| 241 | 324 | return ins; |
| 242 | 325 | }, |
| 243 | 326 | /* |
| 244 | - Function: iniciaJanelaFlutuante | |
| 245 | - | |
| 246 | - Cria a janela flutuante para controle da ferramenta. | |
| 327 | + * Function: iniciaJanelaFlutuante | |
| 328 | + * | |
| 329 | + * Cria a janela flutuante para controle da ferramenta. | |
| 247 | 330 | */ |
| 248 | - iniciaJanelaFlutuante: function(){ | |
| 249 | - var minimiza,cabecalho,janela,divid,temp,titulo; | |
| 250 | - if($i("i3GEOF.selecao")){ | |
| 331 | + iniciaJanelaFlutuante : function() { | |
| 332 | + var minimiza, cabecalho, janela, divid, temp, titulo; | |
| 333 | + if ($i("i3GEOF.selecao")) { | |
| 251 | 334 | return; |
| 252 | 335 | } |
| 253 | - //cria a janela flutuante | |
| 254 | - cabecalho = function(){ | |
| 336 | + // cria a janela flutuante | |
| 337 | + cabecalho = function() { | |
| 255 | 338 | i3GEOF.selecao.ativaFoco(); |
| 256 | 339 | }; |
| 257 | - minimiza = function(){ | |
| 258 | - var t = i3GEO.janela.minimiza("i3GEOF.selecao","100px"); | |
| 259 | - if(t === "min"){ | |
| 340 | + minimiza = function() { | |
| 341 | + var t = i3GEO.janela.minimiza("i3GEOF.selecao", "100px"); | |
| 342 | + if (t === "min") { | |
| 260 | 343 | $i("i3GEOFSelecaoCabecalhoI").style.display = "none"; |
| 261 | 344 | } else { |
| 262 | 345 | $i("i3GEOFSelecaoCabecalhoI").style.display = "block"; |
| 263 | 346 | } |
| 264 | 347 | }; |
| 265 | 348 | titulo = |
| 266 | - "<span class='i3GEOiconeFerramenta i3GEOiconeSelecao' title='"+$trad("x51")+"'></span>" | |
| 267 | - + "<div id='i3GEOFSelecaoCabecalhoI' style='left:10px;'>" | |
| 268 | - + "<div class='i3GeoTituloJanela'>" + $trad("x51") | |
| 269 | - + "<a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic | |
| 270 | - + "/ajuda_usuario.php?idcategoria=5&idajuda=48a' ><b> </b></a></div></div></div>"; | |
| 271 | - janela = i3GEO.janela.cria( | |
| 272 | - "510px", | |
| 273 | - "210px", | |
| 274 | - "", | |
| 275 | - "", | |
| 276 | - "", | |
| 277 | - titulo, | |
| 278 | - "i3GEOF.selecao", | |
| 279 | - false, | |
| 280 | - "hd", | |
| 281 | - cabecalho, | |
| 282 | - minimiza | |
| 283 | - ); | |
| 349 | + "<span class='i3GEOiconeFerramenta i3GEOiconeSelecao' title='" + $trad("x51") | |
| 350 | + + "'></span>" | |
| 351 | + + "<div id='i3GEOFSelecaoCabecalhoI' style='left:10px;'>" | |
| 352 | + + "<div class='i3GeoTituloJanela'>" | |
| 353 | + + $trad("x51") | |
| 354 | + + "<a class=ajuda_usuario target=_blank href='" | |
| 355 | + + i3GEO.configura.locaplic | |
| 356 | + + "/ajuda_usuario.php?idcategoria=5&idajuda=48a' ><b> </b></a></div></div></div>"; | |
| 357 | + janela = i3GEO.janela.cria("510px", "210px", "", "", "", titulo, "i3GEOF.selecao", false, "hd", cabecalho, minimiza); | |
| 284 | 358 | divid = janela[2].id; |
| 285 | 359 | i3GEOF.selecao.aguarde = $i("i3GEOF.selecao_imagemCabecalho").style; |
| 286 | 360 | $i("i3GEOF.selecao_corpo").style.backgroundColor = "white"; |
| 287 | 361 | i3GEOF.selecao.inicia(divid); |
| 288 | - i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS",["i3GEOF.selecao.criaCombosTemas()"]); | |
| 362 | + i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS", [ | |
| 363 | + "i3GEOF.selecao.criaCombosTemas()" | |
| 364 | + ]); | |
| 289 | 365 | i3GEO.eventos.cliquePerm.desativa(); |
| 290 | 366 | |
| 291 | - temp = function(){ | |
| 367 | + temp = function() { | |
| 368 | + var api; | |
| 292 | 369 | i3GEO.eventos.cliquePerm.ativa(); |
| 293 | - i3GEO.eventos.removeEventos("ATUALIZAARVORECAMADAS",["i3GEOF.selecao.criaCombosTemas()"]); | |
| 370 | + i3GEO.eventos.removeEventos("ATUALIZAARVORECAMADAS", [ | |
| 371 | + "i3GEOF.selecao.criaCombosTemas()" | |
| 372 | + ]); | |
| 294 | 373 | i3GEO.barraDeBotoes.ativaPadrao(); |
| 295 | - i3GEOF.selecao.removeFiguras[i3GEO.Interface["ATUAL"]](); | |
| 374 | + if(i3GEO.Interface["ATUAL"] === "openlayers"){ | |
| 375 | + if (typeof OpenLayers == "undefined") { | |
| 376 | + api = "ol3"; | |
| 377 | + } else { | |
| 378 | + api = "openlayers"; | |
| 379 | + } | |
| 380 | + } | |
| 381 | + else{ | |
| 382 | + api = i3GEO.Interface["ATUAL"]; | |
| 383 | + } | |
| 384 | + i3GEOF.selecao.removeFiguras[api](); | |
| 296 | 385 | }; |
| 297 | 386 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| 298 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,"crosshair",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 387 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores, "crosshair", i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic); | |
| 299 | 388 | }, |
| 300 | 389 | /* |
| 301 | - Function: ativaFoco | |
| 302 | - | |
| 303 | - Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | |
| 390 | + * Function: ativaFoco | |
| 391 | + * | |
| 392 | + * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | |
| 304 | 393 | */ |
| 305 | - ativaFoco: function(){ | |
| 394 | + ativaFoco : function() { | |
| 306 | 395 | i3GEO.eventos.cliquePerm.desativa(); |
| 307 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,"crosshair",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 396 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores, "crosshair", i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic); | |
| 308 | 397 | i3GEO.barraDeBotoes.ativaIcone("selecao"); |
| 309 | 398 | i3GEOF.selecao.pegaTemasSel(); |
| 310 | 399 | i3GEOF.selecao.mudaicone(); |
| 311 | 400 | var i = $i("i3GEOF.selecao_c").style; |
| 312 | 401 | i3GEO.janela.ULTIMOZINDEX++; |
| 313 | 402 | i.zIndex = 21000 + i3GEO.janela.ULTIMOZINDEX; |
| 314 | - if(i3GEO.Interface.ATUAL != "openlayers"){ | |
| 403 | + if (i3GEO.Interface.ATUAL != "openlayers") { | |
| 315 | 404 | i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar(); |
| 316 | 405 | } |
| 317 | 406 | }, |
| 318 | 407 | /* |
| 319 | - Function: criaCombosTemas | |
| 320 | - | |
| 321 | - Cria os combos de seleção de temas | |
| 408 | + * Function: criaCombosTemas | |
| 409 | + * | |
| 410 | + * Cria os combos de seleção de temas | |
| 322 | 411 | */ |
| 323 | - criaCombosTemas: function(){ | |
| 324 | - i3GEO.util.comboTemas( | |
| 325 | - "i3GEOselecaotemasLigados", | |
| 326 | - function(retorno){ | |
| 327 | - var nsel,temp; | |
| 328 | - temp = $i("i3GEOselecaoComboTemas"); | |
| 329 | - if(!temp){return;} | |
| 330 | - temp.innerHTML = retorno.dados; | |
| 331 | - if($i("i3GEOselecaotemasLigados")){ | |
| 332 | - $i("i3GEOselecaotemasLigados").value = i3GEO.temaAtivo; | |
| 333 | - //verifica qts elementos selecionados | |
| 334 | - if(i3GEO.temaAtivo != ""){ | |
| 335 | - nsel = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); | |
| 336 | - $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados',i3GEOF.selecao.dicionario)+": "+(nsel.nsel) + "<br>"; | |
| 337 | - } | |
| 338 | - $i("i3GEOselecaotemasLigados").onchange = function(){i3GEOF.selecao.pegaTemasSel();}; | |
| 339 | - } | |
| 340 | - }, | |
| 341 | - "i3GEOselecaoComboTemas", | |
| 342 | - "", | |
| 343 | - true, | |
| 344 | - "ligados", | |
| 345 | - "width:440px;font-size:12px" | |
| 346 | - ); | |
| 412 | + criaCombosTemas : function() { | |
| 413 | + i3GEO.util.comboTemas("i3GEOselecaotemasLigados", function(retorno) { | |
| 414 | + var nsel, temp; | |
| 415 | + temp = $i("i3GEOselecaoComboTemas"); | |
| 416 | + if (!temp) { | |
| 417 | + return; | |
| 418 | + } | |
| 419 | + temp.innerHTML = retorno.dados; | |
| 420 | + if ($i("i3GEOselecaotemasLigados")) { | |
| 421 | + $i("i3GEOselecaotemasLigados").value = i3GEO.temaAtivo; | |
| 422 | + // verifica qts elementos selecionados | |
| 423 | + if (i3GEO.temaAtivo != "") { | |
| 424 | + nsel = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); | |
| 425 | + $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel) + "<br>"; | |
| 426 | + } | |
| 427 | + $i("i3GEOselecaotemasLigados").onchange = function() { | |
| 428 | + i3GEOF.selecao.pegaTemasSel(); | |
| 429 | + }; | |
| 430 | + } | |
| 431 | + }, "i3GEOselecaoComboTemas", "", true, "ligados", "width:440px;font-size:12px"); | |
| 347 | 432 | }, |
| 348 | 433 | /* |
| 349 | - Function: mudaicone | |
| 350 | - | |
| 351 | - Altera as bordas dos ícones | |
| 434 | + * Function: mudaicone | |
| 435 | + * | |
| 436 | + * Altera as bordas dos ícones | |
| 352 | 437 | */ |
| 353 | - mudaicone: function(){ | |
| 438 | + mudaicone : function() { | |
| 354 | 439 | $i("i3GEOselecaopt").parentNode.style.backgroundColor = "#F5F5F5"; |
| 355 | 440 | $i("i3GEOselecaoext").parentNode.style.backgroundColor = "#F5F5F5"; |
| 356 | - if($i("i3GEOselecaobox")){ | |
| 441 | + if ($i("i3GEOselecaobox")) { | |
| 357 | 442 | $i("i3GEOselecaobox").parentNode.style.backgroundColor = "#F5F5F5"; |
| 358 | 443 | } |
| 359 | - if($i("i3GEOselecaopoli")){ | |
| 444 | + if ($i("i3GEOselecaopoli")) { | |
| 360 | 445 | $i("i3GEOselecaopoli").parentNode.style.backgroundColor = "#F5F5F5"; |
| 361 | 446 | } |
| 362 | - if($i("i3GEOselecaoFigura")){ | |
| 447 | + if ($i("i3GEOselecaoFigura")) { | |
| 363 | 448 | $i("i3GEOselecaoFigura").parentNode.style.backgroundColor = "#F5F5F5"; |
| 364 | 449 | } |
| 365 | 450 | }, |
| 366 | 451 | /* |
| 367 | - Function: pegaTemasSel | |
| 368 | - | |
| 369 | - Pega a lista de temas escolhidos pelo usuário | |
| 452 | + * Function: pegaTemasSel | |
| 453 | + * | |
| 454 | + * Pega a lista de temas escolhidos pelo usuário | |
| 370 | 455 | */ |
| 371 | - pegaTemasSel: function(){ | |
| 372 | - var selObj = $i("i3GEOselecaotemasLigados"), | |
| 373 | - selectedArray = [], | |
| 374 | - i, | |
| 375 | - nsel; | |
| 376 | - if(selObj){ | |
| 377 | - for (i=0; i<selObj.options.length; i++) { | |
| 456 | + pegaTemasSel : function() { | |
| 457 | + var selObj = $i("i3GEOselecaotemasLigados"), selectedArray = [], i, nsel; | |
| 458 | + if (selObj) { | |
| 459 | + for (i = 0; i < selObj.options.length; i++) { | |
| 378 | 460 | if (selObj.options[i].selected) { |
| 379 | 461 | selectedArray.push(selObj.options[i].value); |
| 380 | 462 | } |
| 381 | 463 | } |
| 382 | 464 | i3GEO.mapa.ativaTema(selectedArray[0]); |
| 383 | - if(i3GEO.temaAtivo != ""){ | |
| 465 | + if (i3GEO.temaAtivo != "") { | |
| 384 | 466 | nsel = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); |
| 385 | - $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados',i3GEOF.selecao.dicionario)+": "+(nsel.nsel) + "<br>"; | |
| 467 | + $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel) + "<br>"; | |
| 386 | 468 | } |
| 387 | 469 | } |
| 388 | 470 | return selectedArray.toString(); |
| 389 | 471 | }, |
| 390 | 472 | /* |
| 391 | - Function: fimSelecao | |
| 392 | - | |
| 393 | - Funcoes executadas quando uma operacao de selecao e concluida | |
| 394 | - | |
| 395 | - */ | |
| 396 | - fimSelecao: function(retorno){ | |
| 397 | - var nsel, | |
| 398 | - tema = i3GEO.temaAtivo; | |
| 473 | + * Function: fimSelecao | |
| 474 | + * | |
| 475 | + * Funcoes executadas quando uma operacao de selecao e concluida | |
| 476 | + * | |
| 477 | + */ | |
| 478 | + fimSelecao : function(retorno) { | |
| 479 | + var nsel, tema = i3GEO.temaAtivo; | |
| 399 | 480 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 400 | 481 | i3GEO.janela.fechaAguarde("i3GEO.atualiza"); |
| 401 | - i3GEO.Interface.atualizaTema(retorno,tema); | |
| 402 | - nsel = i3GEO.arvoreDeCamadas.pegaTema(tema,retorno.data.temas); | |
| 403 | - $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados',i3GEOF.selecao.dicionario)+": "+(nsel.nsel); | |
| 404 | - i3GEO.eventos.adicionaEventos("SELECAO",["i3GEOF.tabela.atualizaListaDeRegistros()"]); | |
| 482 | + i3GEO.Interface.atualizaTema(retorno, tema); | |
| 483 | + nsel = i3GEO.arvoreDeCamadas.pegaTema(tema, retorno.data.temas); | |
| 484 | + $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel); | |
| 485 | + i3GEO.eventos.adicionaEventos("SELECAO", [ | |
| 486 | + "i3GEOF.tabela.atualizaListaDeRegistros()" | |
| 487 | + ]); | |
| 405 | 488 | i3GEO.eventos.executaEventos(i3GEO.eventos.SELECAO); |
| 406 | 489 | }, |
| 407 | 490 | /* |
| 408 | - Function: operacao | |
| 409 | - | |
| 410 | - Executa uma operação sobre o conjunto de elementos selecionados | |
| 411 | - | |
| 412 | - Veja: | |
| 413 | - | |
| 414 | - <i3GEO.php.selecaopt> | |
| 415 | - | |
| 416 | - Parametro: | |
| 417 | - | |
| 418 | - tipo {String} - tipo de operação inverte|limpa | |
| 491 | + * Function: operacao | |
| 492 | + * | |
| 493 | + * Executa uma operação sobre o conjunto de elementos selecionados | |
| 494 | + * | |
| 495 | + * Veja: | |
| 496 | + * | |
| 497 | + * <i3GEO.php.selecaopt> | |
| 498 | + * | |
| 499 | + * Parametro: | |
| 500 | + * | |
| 501 | + * tipo {String} - tipo de operação inverte|limpa | |
| 419 | 502 | */ |
| 420 | - operacao: function(tipo){ | |
| 421 | - if(i3GEOF.selecao.aguarde.visibility === "visible"){ | |
| 503 | + operacao : function(tipo) { | |
| 504 | + if (i3GEOF.selecao.aguarde.visibility === "visible") { | |
| 422 | 505 | return; |
| 423 | 506 | } |
| 424 | - try{ | |
| 425 | - if($i("i3GEOselecaotemasLigados").value === ""){ | |
| 507 | + try { | |
| 508 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 426 | 509 | i3GEO.janela.tempoMsg("Escolha um tema"); |
| 427 | 510 | return; |
| 428 | 511 | } |
| 429 | 512 | i3GEOF.selecao.aguarde.visibility = "visible"; |
| 430 | 513 | i3GEO.mapa.ativaTema($i("i3GEOselecaotemasLigados").value); |
| 431 | - var tema = i3GEO.temaAtivo, | |
| 432 | - fim = function(retorno){ | |
| 514 | + var tema = i3GEO.temaAtivo, fim = function(retorno) { | |
| 433 | 515 | i3GEOF.selecao.fimSelecao(retorno); |
| 434 | 516 | }; |
| 435 | - i3GEO.php.selecaopt(fim,tema,"",tipo,0); | |
| 517 | + i3GEO.php.selecaopt(fim, tema, "", tipo, 0); | |
| 518 | + } catch (e) { | |
| 519 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
| 520 | + i3GEOF.selecao.aguarde.visibility = "hidden"; | |
| 436 | 521 | } |
| 437 | - catch(e){i3GEO.janela.tempoMsg("Erro: "+e);i3GEOF.selecao.aguarde.visibility = "hidden";} | |
| 438 | 522 | }, |
| 439 | 523 | /* |
| 440 | - Function: tiposel | |
| 441 | - | |
| 442 | - Executa um tipo de seleção interativa | |
| 443 | - | |
| 444 | - Parameter: | |
| 445 | - | |
| 446 | - obj {objeto dom) - objeto que foi clicado para disparar a operação. O valor identifica o tipo de operação | |
| 524 | + * Function: tiposel | |
| 525 | + * | |
| 526 | + * Executa um tipo de seleção interativa | |
| 527 | + * | |
| 528 | + * Parameter: | |
| 529 | + * | |
| 530 | + * obj {objeto dom) - objeto que foi clicado para disparar a operação. O valor identifica o tipo de | |
| 531 | + * operação | |
| 447 | 532 | */ |
| 448 | - tiposel: function(obj){ | |
| 449 | - if(i3GEOF.selecao.aguarde.visibility === "visible"){ | |
| 533 | + tiposel : function(obj) { | |
| 534 | + if (i3GEOF.selecao.aguarde.visibility === "visible") { | |
| 450 | 535 | return; |
| 451 | 536 | } |
| 452 | - try{ | |
| 453 | - if($i("i3GEOselecaotemasLigados").value === ""){ | |
| 537 | + //try { | |
| 538 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 454 | 539 | i3GEO.janela.tempoMsg("Escolha um tema"); |
| 455 | 540 | return; |
| 456 | 541 | } |
| 457 | - var fim = function(retorno){ | |
| 542 | + var api, fim = function(retorno) { | |
| 458 | 543 | i3GEOF.selecao.fimSelecao(retorno); |
| 459 | - }, | |
| 460 | - tema = i3GEOF.selecao.pegaTemasSel(); | |
| 461 | - if (obj.value == "i3GEOselecaoext"){ | |
| 544 | + }, tema = i3GEOF.selecao.pegaTemasSel(); | |
| 545 | + if (i3GEO.Interface["ATUAL"] === "openlayers") { | |
| 546 | + if (typeof OpenLayers == "undefined") { | |
| 547 | + api = "ol3"; | |
| 548 | + } else { | |
| 549 | + api = "openlayers"; | |
| 550 | + } | |
| 551 | + } else { | |
| 552 | + api = i3GEO.Interface["ATUAL"]; | |
| 553 | + } | |
| 554 | + if (obj.value == "i3GEOselecaoext") { | |
| 462 | 555 | i3GEOF.selecao.tipoSel = obj.value; |
| 463 | 556 | i3GEOF.selecao.aguarde.visibility = "visible"; |
| 464 | - i3GEO.php.selecaobox(fim,tema,$i("i3GEOselecaotipoOperacao").value,i3GEO.parametros.mapexten); | |
| 557 | + i3GEO.php.selecaobox(fim, tema, $i("i3GEOselecaotipoOperacao").value, i3GEO.parametros.mapexten); | |
| 465 | 558 | } |
| 466 | - if (obj.value == "i3GEOselecaobox"){ | |
| 559 | + if (obj.value == "i3GEOselecaobox") { | |
| 467 | 560 | i3GEOF.selecao.tipoSel = obj.value; |
| 468 | 561 | i3GEOF.selecao.mudaicone(); |
| 469 | 562 | obj.style.backgroundColor = "#cedff2"; |
| 470 | 563 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 471 | - i3GEOF.selecao.box[i3GEO.Interface["ATUAL"]].inicia(); | |
| 564 | + i3GEOF.selecao.box[api].inicia(); | |
| 472 | 565 | } |
| 473 | - if (obj.value == "i3GEOselecaopt"){ | |
| 566 | + if (obj.value == "i3GEOselecaopt") { | |
| 474 | 567 | i3GEOF.selecao.tipoSel = obj.value; |
| 475 | 568 | i3GEOF.selecao.mudaicone(); |
| 476 | 569 | obj.style.backgroundColor = "#cedff2"; |
| 477 | 570 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 478 | - i3GEOF.selecao.clique[i3GEO.Interface["ATUAL"]].inicia(); | |
| 571 | + i3GEOF.selecao.clique[api].inicia(); | |
| 479 | 572 | } |
| 480 | - if (obj.value == "i3GEOselecaopoli"){ | |
| 573 | + if (obj.value == "i3GEOselecaopoli") { | |
| 481 | 574 | i3GEOF.selecao.tipoSel = obj.value; |
| 482 | 575 | i3GEOF.selecao.mudaicone(); |
| 483 | 576 | obj.style.backgroundColor = "#cedff2"; |
| 484 | 577 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 485 | - i3GEOF.selecao.poligono[i3GEO.Interface["ATUAL"]].inicia(); | |
| 578 | + i3GEOF.selecao.poligono[api].inicia(); | |
| 486 | 579 | } |
| 487 | - if (obj.value == "i3GEOselecaofigura"){ | |
| 580 | + if (obj.value == "i3GEOselecaofigura") { | |
| 488 | 581 | i3GEOF.selecao.tipoSel = obj.value; |
| 489 | 582 | i3GEOF.selecao.mudaicone(); |
| 490 | 583 | obj.style.backgroundColor = "#cedff2"; |
| 491 | 584 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 492 | - i3GEOF.selecao.figura[i3GEO.Interface["ATUAL"]].inicia(); | |
| 585 | + i3GEOF.selecao.figura[api].inicia(); | |
| 493 | 586 | } |
| 494 | - } | |
| 495 | - catch(e){i3GEO.janela.tempoMsg("Erro: "+e);i3GEOF.selecao.aguarde.visibility = "hidden";} | |
| 587 | + //} catch (e) { | |
| 588 | + //i3GEO.janela.tempoMsg("Erro: " + e); | |
| 589 | + //i3GEOF.selecao.aguarde.visibility = "hidden"; | |
| 590 | + //} | |
| 496 | 591 | }, |
| 497 | 592 | /* |
| 498 | - Function: removeFiguras | |
| 499 | - Remove as figuras marcadas como origem igual a i3GEOFselecao | |
| 500 | - */ | |
| 501 | - removeFiguras:{ | |
| 502 | - openlayers: function(){ | |
| 503 | - if(i3GEO.desenho.layergrafico){ | |
| 593 | + * Function: removeFiguras Remove as figuras marcadas como origem igual a i3GEOFselecao | |
| 594 | + */ | |
| 595 | + removeFiguras : { | |
| 596 | + ol3 : function(){ | |
| 597 | + var features, n, f, i; | |
| 598 | + features = i3GEO.desenho.layergrafico.getFeatures(); | |
| 599 | + n = features.getLength(); | |
| 600 | + for(i=0; i< n; i++){ | |
| 601 | + f = features.item(i); | |
| 602 | + if(f.getGeometryName() === "i3GEOFselecao"){ | |
| 603 | + i3GEO.desenho.layergrafico.getFeatures().removeAt(i); | |
| 604 | + } | |
| 605 | + } | |
| 606 | + }, | |
| 607 | + openlayers : function() { | |
| 608 | + if (i3GEO.desenho.layergrafico) { | |
| 504 | 609 | var temp, f = i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem", "i3GEOFselecao"); |
| 505 | - if(f && f.length > 0){ | |
| 610 | + if (f && f.length > 0) { | |
| 506 | 611 | temp = window.confirm($trad("x94")); |
| 507 | 612 | if (temp) { |
| 508 | 613 | i3GEO.desenho.layergrafico.destroyFeatures(f); |
| ... | ... | @@ -510,9 +615,9 @@ i3GEOF.selecao = { |
| 510 | 615 | } |
| 511 | 616 | } |
| 512 | 617 | }, |
| 513 | - googlemaps: function(){ | |
| 514 | - var temp, f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","i3GEOFselecao"); | |
| 515 | - if(f && f.length > 0){ | |
| 618 | + googlemaps : function() { | |
| 619 | + var temp, f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem", "i3GEOFselecao"); | |
| 620 | + if (f && f.length > 0) { | |
| 516 | 621 | temp = window.confirm($trad("x94")); |
| 517 | 622 | if (temp) { |
| 518 | 623 | i3GEO.desenho.googlemaps.destroyFeatures(f); |
| ... | ... | @@ -521,378 +626,388 @@ i3GEOF.selecao = { |
| 521 | 626 | } |
| 522 | 627 | }, |
| 523 | 628 | /* |
| 524 | - Classe: i3GEOF.selecao.box | |
| 525 | - | |
| 526 | - Controla o desenho do box para a seleção e executa a operação de seleção | |
| 629 | + * Classe: i3GEOF.selecao.box | |
| 630 | + * | |
| 631 | + * Controla o desenho do box para a seleção e executa a operação de seleção | |
| 527 | 632 | */ |
| 528 | - box:{ | |
| 529 | - openlayers: { | |
| 530 | - inicia: function(){ | |
| 633 | + box : { | |
| 634 | + openlayers : { | |
| 635 | + inicia : function() { | |
| 531 | 636 | i3GEO.eventos.cliquePerm.desativa(); |
| 532 | 637 | i3GEOF.selecao.box.openlayers.removeControle(); |
| 533 | - var box = new OpenLayers.Control.DrawFeature( | |
| 534 | - i3GEO.desenho.layergrafico, | |
| 535 | - OpenLayers.Handler.Box, | |
| 536 | - { | |
| 537 | - autoActivate: true, | |
| 538 | - id: "i3GEOFselecaoBox", | |
| 539 | - type: OpenLayers.Control.TYPE_TOOL, | |
| 540 | - callbacks:{ | |
| 541 | - done: function(feature){ | |
| 542 | - i3GEOF.selecao.box.openlayers.removeControle(); | |
| 543 | - var g,f,xminymin = i3geoOL.getLonLatFromPixel({ | |
| 544 | - x: feature.left, | |
| 545 | - y: feature.bottom | |
| 546 | - }), | |
| 547 | - xmaxymax = i3geoOL.getLonLatFromPixel({ | |
| 548 | - x: feature.right, | |
| 549 | - y: feature.top | |
| 638 | + var box = | |
| 639 | + new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico, OpenLayers.Handler.Box, { | |
| 640 | + autoActivate : true, | |
| 641 | + id : "i3GEOFselecaoBox", | |
| 642 | + type : OpenLayers.Control.TYPE_TOOL, | |
| 643 | + callbacks : { | |
| 644 | + done : function(feature) { | |
| 645 | + i3GEOF.selecao.box.openlayers.removeControle(); | |
| 646 | + var g, f, xminymin = i3geoOL.getLonLatFromPixel({ | |
| 647 | + x : feature.left, | |
| 648 | + y : feature.bottom | |
| 649 | + }), xmaxymax = i3geoOL.getLonLatFromPixel({ | |
| 650 | + x : feature.right, | |
| 651 | + y : feature.top | |
| 652 | + }); | |
| 653 | + i3GEOF.selecao.box.termina(i3GEO.temaAtivo, $i("i3GEOselecaotipoOperacao").value, xminymin.lon + " " | |
| 654 | + + xminymin.lat | |
| 655 | + + " " | |
| 656 | + + xmaxymax.lon | |
| 657 | + + " " | |
| 658 | + + xmaxymax.lat); | |
| 659 | + if ($i("i3GEOFselecaoMantemFigura").checked === true) { | |
| 660 | + g = new OpenLayers.Bounds(xminymin.lon, xminymin.lat, xmaxymax.lon, xmaxymax.lat); | |
| 661 | + f = new OpenLayers.Feature.Vector(g.toGeometry(), { | |
| 662 | + origem : "i3GEOFselecao" | |
| 663 | + }, { | |
| 664 | + fillColor : "orange", | |
| 665 | + fillOpacity : 0.4, | |
| 666 | + strokeColor : "orange", | |
| 667 | + strokeOpacity : 1, | |
| 668 | + strokeWidth : 2 | |
| 550 | 669 | }); |
| 551 | - i3GEOF.selecao.box.termina( | |
| 552 | - i3GEO.temaAtivo, | |
| 553 | - $i("i3GEOselecaotipoOperacao").value, | |
| 554 | - xminymin.lon+" "+xminymin.lat+" "+xmaxymax.lon+" "+xmaxymax.lat | |
| 555 | - ); | |
| 556 | - if($i("i3GEOFselecaoMantemFigura").checked === true){ | |
| 557 | - g = new OpenLayers.Bounds(xminymin.lon,xminymin.lat,xmaxymax.lon,xmaxymax.lat); | |
| 558 | - f = new OpenLayers.Feature.Vector(g.toGeometry(), { | |
| 559 | - origem : "i3GEOFselecao" | |
| 560 | - }, { | |
| 561 | - fillColor: "orange", | |
| 562 | - fillOpacity: 0.4, | |
| 563 | - strokeColor: "orange", | |
| 564 | - strokeOpacity: 1, | |
| 565 | - strokeWidth: 2 | |
| 566 | - }); | |
| 567 | 670 | |
| 568 | - i3GEO.desenho.layergrafico.addFeatures([f]); | |
| 569 | - if (i3GEO.Interface) { | |
| 570 | - i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 571 | - } | |
| 671 | + i3GEO.desenho.layergrafico.addFeatures([ | |
| 672 | + f | |
| 673 | + ]); | |
| 674 | + if (i3GEO.Interface) { | |
| 675 | + i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 572 | 676 | } |
| 573 | 677 | } |
| 574 | 678 | } |
| 575 | - }); | |
| 679 | + } | |
| 680 | + }); | |
| 576 | 681 | i3geoOL.addControl(box); |
| 577 | 682 | }, |
| 578 | - removeControle: function(){ | |
| 579 | - var controle = i3geoOL.getControlsBy("id","i3GEOFselecaoBox"); | |
| 580 | - if(controle.length > 0){ | |
| 683 | + removeControle : function() { | |
| 684 | + var controle = i3geoOL.getControlsBy("id", "i3GEOFselecaoBox"); | |
| 685 | + if (controle.length > 0) { | |
| 581 | 686 | controle[0].deactivate(); |
| 582 | 687 | i3geoOL.removeControl(controle[0]); |
| 583 | 688 | } |
| 584 | 689 | } |
| 585 | 690 | }, |
| 586 | - termina: function(tema,tipo,box){ | |
| 587 | - var retorna = function(retorno){ | |
| 691 | + termina : function(tema, tipo, box) { | |
| 692 | + var retorna = function(retorno) { | |
| 588 | 693 | i3GEOF.selecao.fimSelecao(retorno); |
| 589 | 694 | }; |
| 590 | - i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); | |
| 695 | + i3GEO.janela.abreAguarde("i3GEO.atualiza", $trad("o1")); | |
| 591 | 696 | i3GEO.eventos.cliquePerm.ativa(); |
| 592 | - i3GEO.php.selecaobox(retorna,tema,tipo,box); | |
| 697 | + i3GEO.php.selecaobox(retorna, tema, tipo, box); | |
| 593 | 698 | } |
| 594 | 699 | }, |
| 595 | 700 | /* |
| 596 | - Function: clique | |
| 597 | - | |
| 598 | - Seleciona elementos clicando no mapa | |
| 701 | + * Function: clique | |
| 702 | + * | |
| 703 | + * Seleciona elementos clicando no mapa | |
| 599 | 704 | */ |
| 600 | - clique: { | |
| 601 | - openlayers: { | |
| 602 | - inicia: function(){ | |
| 705 | + clique : { | |
| 706 | + ol3 : { | |
| 707 | + draw : "", | |
| 708 | + inicia : function() { | |
| 709 | + i3GEO.eventos.cliquePerm.desativa(); | |
| 710 | + i3GEOF.selecao.clique.ol3.removeControle(); | |
| 711 | + i3GEOF.selecao.clique.ol3.draw = new ol.interaction.Draw({ | |
| 712 | + //features : i3GEO.desenho.layergrafico.getFeatures(), | |
| 713 | + type : "Point", | |
| 714 | + maxPoints : 1 | |
| 715 | + }); | |
| 716 | + i3GEOF.selecao.clique.ol3.draw.on("drawend",function(evt){ | |
| 717 | + var geo, ponto = evt.feature.getGeometry(); | |
| 718 | + if ($i("i3GEOFselecaoMantemFigura").checked === true) { | |
| 719 | + evt.feature.setProperties({origem : "i3GEOFselecao"}); | |
| 720 | + i3GEO.desenho.layergrafico.addFeature(evt.feature); | |
| 721 | + } | |
| 722 | + i3GEOF.selecao.clique.ol3.removeControle(); | |
| 723 | + i3GEO.eventos.cliquePerm.ativa(); | |
| 724 | + ponto = i3GEO.util.projOSM2Geo(ponto); | |
| 725 | + geo = ponto.getCoordinates(); | |
| 726 | + i3GEOF.selecao.clique.termina( | |
| 727 | + i3GEO.temaAtivo, | |
| 728 | + $i("i3GEOselecaotipoOperacao").value, | |
| 729 | + $i("i3GEOselecaotoleranciapt").value, | |
| 730 | + geo[0], | |
| 731 | + geo[1]); | |
| 732 | + }); | |
| 733 | + i3geoOL.addInteraction(i3GEOF.selecao.clique.ol3.draw); | |
| 734 | + }, | |
| 735 | + removeControle : function() { | |
| 736 | + i3geoOL.removeInteraction(i3GEOF.selecao.clique.ol3.draw); | |
| 737 | + i3GEOF.selecao.clique.ol3.draw = ""; | |
| 738 | + } | |
| 739 | + }, | |
| 740 | + //versao 2 do openlayers | |
| 741 | + openlayers : { | |
| 742 | + inicia : function() { | |
| 603 | 743 | i3GEO.eventos.cliquePerm.desativa(); |
| 604 | 744 | i3GEOF.selecao.clique.openlayers.removeControle(); |
| 605 | - var ponto = new OpenLayers.Control.DrawFeature( | |
| 606 | - i3GEO.desenho.layergrafico, | |
| 607 | - OpenLayers.Handler.Point, | |
| 608 | - { | |
| 609 | - autoActivate: true, | |
| 610 | - id: "i3GEOFselecaoPonto", | |
| 611 | - type: OpenLayers.Control.TYPE_TOOL, | |
| 612 | - callbacks:{ | |
| 613 | - done: function(feature){ | |
| 614 | - i3GEOF.selecao.clique.openlayers.removeControle(); | |
| 615 | - feature = i3GEO.util.projOSM2Geo(feature); | |
| 616 | - i3GEOF.selecao.clique.termina( | |
| 617 | - i3GEO.temaAtivo, | |
| 618 | - $i("i3GEOselecaotipoOperacao").value, | |
| 619 | - $i("i3GEOselecaotoleranciapt").value, | |
| 620 | - feature.x, | |
| 621 | - feature.y | |
| 622 | - ); | |
| 623 | - if($i("i3GEOFselecaoMantemFigura").checked === true){ | |
| 624 | - feature = i3GEO.util.projGeo2OSM(feature); | |
| 625 | - f = new OpenLayers.Feature.Vector(feature, { | |
| 626 | - origem : "i3GEOFselecao" | |
| 627 | - }, { | |
| 628 | - fillColor: "orange", | |
| 629 | - fillOpacity: 0.4, | |
| 630 | - strokeColor: "orange", | |
| 631 | - strokeOpacity: 1, | |
| 632 | - strokeWidth: 2, | |
| 633 | - graphicName : "square", | |
| 634 | - pointRadius : 6 | |
| 635 | - }); | |
| 745 | + var ponto = | |
| 746 | + new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico, OpenLayers.Handler.Point, { | |
| 747 | + autoActivate : true, | |
| 748 | + id : "i3GEOFselecaoPonto", | |
| 749 | + type : OpenLayers.Control.TYPE_TOOL, | |
| 750 | + callbacks : { | |
| 751 | + done : function(feature) { | |
| 752 | + i3GEOF.selecao.clique.openlayers.removeControle(); | |
| 753 | + feature = i3GEO.util.projOSM2Geo(feature); | |
| 754 | + i3GEOF.selecao.clique.termina( | |
| 755 | + i3GEO.temaAtivo, | |
| 756 | + $i("i3GEOselecaotipoOperacao").value, | |
| 757 | + $i("i3GEOselecaotoleranciapt").value, | |
| 758 | + feature.x, | |
| 759 | + feature.y); | |
| 760 | + if ($i("i3GEOFselecaoMantemFigura").checked === true) { | |
| 761 | + feature = i3GEO.util.projGeo2OSM(feature); | |
| 762 | + f = new OpenLayers.Feature.Vector(feature, { | |
| 763 | + origem : "i3GEOFselecao" | |
| 764 | + }, { | |
| 765 | + fillColor : "orange", | |
| 766 | + fillOpacity : 0.4, | |
| 767 | + strokeColor : "orange", | |
| 768 | + strokeOpacity : 1, | |
| 769 | + strokeWidth : 2, | |
| 770 | + graphicName : "square", | |
| 771 | + pointRadius : 6 | |
| 772 | + }); | |
| 636 | 773 | |
| 637 | - i3GEO.desenho.layergrafico.addFeatures([f]); | |
| 638 | - if (i3GEO.Interface) { | |
| 639 | - i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 640 | - } | |
| 774 | + i3GEO.desenho.layergrafico.addFeatures([ | |
| 775 | + f | |
| 776 | + ]); | |
| 777 | + if (i3GEO.Interface) { | |
| 778 | + i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 641 | 779 | } |
| 642 | 780 | } |
| 643 | 781 | } |
| 644 | - }); | |
| 782 | + } | |
| 783 | + }); | |
| 645 | 784 | i3geoOL.addControl(ponto); |
| 646 | 785 | }, |
| 647 | - removeControle: function(){ | |
| 648 | - var controle = i3geoOL.getControlsBy("id","i3GEOFselecaoPonto"); | |
| 649 | - if(controle.length > 0){ | |
| 786 | + removeControle : function() { | |
| 787 | + var controle = i3geoOL.getControlsBy("id", "i3GEOFselecaoPonto"); | |
| 788 | + if (controle.length > 0) { | |
| 650 | 789 | controle[0].deactivate(); |
| 651 | 790 | i3geoOL.removeControl(controle[0]); |
| 652 | 791 | } |
| 653 | 792 | } |
| 654 | 793 | }, |
| 655 | - googlemaps: { | |
| 656 | - inicia: function(){ | |
| 794 | + googlemaps : { | |
| 795 | + inicia : function() { | |
| 657 | 796 | var evtclick = null; |
| 658 | 797 | i3GEO.eventos.cliquePerm.desativa(); |
| 659 | - evtclick = google.maps.event.addListener(i3GeoMap, "click", function(evt) { | |
| 660 | - if(i3GEOF.selecao.tipoSel === "i3GEOselecaopt"){ | |
| 661 | - i3GEOF.selecao.clique.termina( | |
| 798 | + evtclick = | |
| 799 | + google.maps.event.addListener(i3GeoMap, "click", function(evt) { | |
| 800 | + if (i3GEOF.selecao.tipoSel === "i3GEOselecaopt") { | |
| 801 | + i3GEOF.selecao.clique.termina( | |
| 662 | 802 | i3GEO.temaAtivo, |
| 663 | 803 | $i("i3GEOselecaotipoOperacao").value, |
| 664 | 804 | $i("i3GEOselecaotoleranciapt").value, |
| 665 | 805 | evt.latLng.lng(), |
| 666 | - evt.latLng.lat() | |
| 667 | - ); | |
| 668 | - if($i("i3GEOFselecaoMantemFigura").checked === true){ | |
| 669 | - i3GEO.desenho.googlemaps.shapes.push( | |
| 670 | - new google.maps.Marker({ | |
| 671 | - map: i3GeoMap, | |
| 672 | - fillOpacity: 0, | |
| 673 | - clickable: false, | |
| 674 | - position:evt.latLng, | |
| 675 | - icon: { | |
| 676 | - path: google.maps.SymbolPath.CIRCLE, | |
| 677 | - scale: 4, | |
| 678 | - strokeColor: "orange" | |
| 806 | + evt.latLng.lat()); | |
| 807 | + if ($i("i3GEOFselecaoMantemFigura").checked === true) { | |
| 808 | + i3GEO.desenho.googlemaps.shapes.push(new google.maps.Marker({ | |
| 809 | + map : i3GeoMap, | |
| 810 | + fillOpacity : 0, | |
| 811 | + clickable : false, | |
| 812 | + position : evt.latLng, | |
| 813 | + icon : { | |
| 814 | + path : google.maps.SymbolPath.CIRCLE, | |
| 815 | + scale : 4, | |
| 816 | + strokeColor : "orange" | |
| 679 | 817 | }, |
| 680 | - origem: "i3GEOFselecao" | |
| 681 | - }) | |
| 682 | - ); | |
| 683 | - } | |
| 818 | + origem : "i3GEOFselecao" | |
| 819 | + })); | |
| 820 | + } | |
| 684 | 821 | |
| 685 | - } | |
| 686 | - google.maps.event.removeListener(evtclick); | |
| 687 | - }); | |
| 822 | + } | |
| 823 | + google.maps.event.removeListener(evtclick); | |
| 824 | + }); | |
| 688 | 825 | } |
| 689 | 826 | }, |
| 690 | - termina: function(tema,tipo,tolerancia,x,y){ | |
| 691 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.selecao.porxy()");} | |
| 692 | - var retorna = function(retorno){ | |
| 827 | + termina : function(tema, tipo, tolerancia, x, y) { | |
| 828 | + if (typeof (console) !== 'undefined') { | |
| 829 | + console.info("i3GEO.selecao.porxy()"); | |
| 830 | + } | |
| 831 | + var retorna = function(retorno) { | |
| 693 | 832 | i3GEOF.selecao.fimSelecao(retorno); |
| 694 | 833 | }; |
| 695 | 834 | i3GEO.eventos.cliquePerm.ativa(); |
| 696 | - i3GEO.php.selecaopt(retorna,tema,x+" "+y,tipo,tolerancia); | |
| 835 | + i3GEO.php.selecaopt(retorna, tema, x + " " + y, tipo, tolerancia); | |
| 697 | 836 | } |
| 698 | 837 | }, |
| 699 | 838 | /* |
| 700 | - Function: figura | |
| 701 | - | |
| 702 | - Seleciona elementos com base em uma figura existente no mapa | |
| 839 | + * Function: figura | |
| 840 | + * | |
| 841 | + * Seleciona elementos com base em uma figura existente no mapa | |
| 703 | 842 | */ |
| 704 | - figura: { | |
| 705 | - openlayers: { | |
| 706 | - executa: function(feature){ | |
| 843 | + figura : { | |
| 844 | + openlayers : { | |
| 845 | + executa : function(feature) { | |
| 707 | 846 | i3GEOF.selecao.figura.openlayers.removeControle(); |
| 708 | 847 | var wkt = i3GEO.util.projOSM2Geo(feature.geometry); |
| 709 | - //var wkt = feature.geometry; | |
| 710 | - i3GEOF.selecao.figura.termina( | |
| 711 | - i3GEO.temaAtivo, | |
| 712 | - $i("i3GEOselecaotipoOperacao").value, | |
| 713 | - wkt | |
| 714 | - ); | |
| 848 | + // var wkt = feature.geometry; | |
| 849 | + i3GEOF.selecao.figura.termina(i3GEO.temaAtivo, $i("i3GEOselecaotipoOperacao").value, wkt); | |
| 715 | 850 | }, |
| 716 | - inicia: function(){ | |
| 717 | - var ponto,f; | |
| 851 | + inicia : function() { | |
| 852 | + var ponto, f; | |
| 718 | 853 | i3GEO.eventos.cliquePerm.desativa(); |
| 719 | 854 | i3GEOF.selecao.figura.openlayers.removeControle(); |
| 720 | - //verifica se ja tem uma figura selecionada | |
| 855 | + // verifica se ja tem uma figura selecionada | |
| 721 | 856 | f = i3GEO.desenho.layergrafico.selectedFeatures; |
| 722 | - if(f && f.length > 0){ | |
| 857 | + if (f && f.length > 0) { | |
| 723 | 858 | i3GEOF.selecao.figura.openlayers.executa(f[0]); |
| 724 | 859 | return; |
| 725 | 860 | } |
| 726 | - ponto = new OpenLayers.Control.SelectFeature( | |
| 727 | - i3GEO.desenho.layergrafico, | |
| 728 | - { | |
| 729 | - clickout: true, | |
| 730 | - toggle: true, | |
| 731 | - multiple: false, | |
| 732 | - hover: false, | |
| 733 | - toggleKey: "ctrlKey", // ctrl key removes from selection | |
| 734 | - box: false, | |
| 735 | - autoActivate: true, | |
| 736 | - id: "i3GEOFselecaoFigura", | |
| 737 | - type: OpenLayers.Control.TYPE_TOOL, | |
| 738 | - onSelect: function(feature){ | |
| 739 | - i3GEOF.selecao.figura.openlayers.executa(feature); | |
| 740 | - } | |
| 741 | - }); | |
| 861 | + ponto = new OpenLayers.Control.SelectFeature(i3GEO.desenho.layergrafico, { | |
| 862 | + clickout : true, | |
| 863 | + toggle : true, | |
| 864 | + multiple : false, | |
| 865 | + hover : false, | |
| 866 | + toggleKey : "ctrlKey", // ctrl key removes from selection | |
| 867 | + box : false, | |
| 868 | + autoActivate : true, | |
| 869 | + id : "i3GEOFselecaoFigura", | |
| 870 | + type : OpenLayers.Control.TYPE_TOOL, | |
| 871 | + onSelect : function(feature) { | |
| 872 | + i3GEOF.selecao.figura.openlayers.executa(feature); | |
| 873 | + } | |
| 874 | + }); | |
| 742 | 875 | i3geoOL.addControl(ponto); |
| 743 | 876 | }, |
| 744 | - removeControle: function(){ | |
| 745 | - var controle = i3geoOL.getControlsBy("id","i3GEOFselecaoFigura"); | |
| 746 | - if(controle.length > 0){ | |
| 877 | + removeControle : function() { | |
| 878 | + var controle = i3geoOL.getControlsBy("id", "i3GEOFselecaoFigura"); | |
| 879 | + if (controle.length > 0) { | |
| 747 | 880 | controle[0].deactivate(); |
| 748 | 881 | i3geoOL.removeControl(controle[0]); |
| 749 | 882 | } |
| 750 | 883 | } |
| 751 | 884 | }, |
| 752 | - //FIXME nao funciona no googlemaps | |
| 753 | - googlemaps: { | |
| 754 | - inicia: function(){ | |
| 755 | - var n,i, | |
| 756 | - evtclick = null; | |
| 885 | + // FIXME nao funciona no googlemaps | |
| 886 | + googlemaps : { | |
| 887 | + inicia : function() { | |
| 888 | + var n, i, evtclick = null; | |
| 757 | 889 | i3GEO.eventos.cliquePerm.desativa(); |
| 758 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 890 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores, "pointer", i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic); | |
| 759 | 891 | i3GEO.editorGM.drawingManager.setOptions({ |
| 760 | - drawingMode: null | |
| 892 | + drawingMode : null | |
| 761 | 893 | }); |
| 762 | 894 | n = i3GEO.desenho.googlemaps.shapes.length; |
| 763 | - for(i=0;i<n;i++){ | |
| 895 | + for (i = 0; i < n; i++) { | |
| 764 | 896 | evtclick = google.maps.event.addListener(i3GEO.desenho.googlemaps.shapes[i], "click", function(evt) { |
| 765 | - if(i3GEOF.selecao.tipoSel === "i3GEOselecaofigura"){ | |
| 766 | - var i,s = [], | |
| 767 | - wkt = new Wkt.Wkt(), | |
| 768 | - n = i3GEO.desenho.googlemaps.shapes.length; | |
| 769 | - for(i=0;i<n;i++){ | |
| 770 | - if(i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].editable === true){ | |
| 897 | + if (i3GEOF.selecao.tipoSel === "i3GEOselecaofigura") { | |
| 898 | + var i, s = [], wkt = new Wkt.Wkt(), n = i3GEO.desenho.googlemaps.shapes.length; | |
| 899 | + for (i = 0; i < n; i++) { | |
| 900 | + if (i3GEO.desenho.googlemaps.shapes[i] != "" && i3GEO.desenho.googlemaps.shapes[i].editable === true) { | |
| 771 | 901 | s = i3GEO.desenho.googlemaps.shapes[i]; |
| 772 | 902 | } |
| 773 | 903 | } |
| 774 | 904 | wkt.fromObject(s); |
| 775 | 905 | wkt = wkt.write(); |
| 776 | - i3GEOF.selecao.figura.termina( | |
| 777 | - i3GEO.temaAtivo, | |
| 778 | - $i("i3GEOselecaotipoOperacao").value, | |
| 779 | - wkt | |
| 780 | - ); | |
| 906 | + i3GEOF.selecao.figura.termina(i3GEO.temaAtivo, $i("i3GEOselecaotipoOperacao").value, wkt); | |
| 781 | 907 | } |
| 782 | 908 | google.maps.event.removeListener(evtclick); |
| 783 | 909 | }); |
| 784 | 910 | } |
| 785 | 911 | } |
| 786 | 912 | }, |
| 787 | - termina: function(tema,tipo,wkt){ | |
| 788 | - var retorna = function(retorno){ | |
| 913 | + termina : function(tema, tipo, wkt) { | |
| 914 | + var retorna = function(retorno) { | |
| 789 | 915 | i3GEOF.selecao.fimSelecao(retorno); |
| 790 | 916 | }; |
| 791 | 917 | i3GEO.eventos.cliquePerm.ativa(); |
| 792 | - i3GEO.php.selecaoWkt( | |
| 793 | - retorna, | |
| 794 | - tema, | |
| 795 | - tipo, | |
| 796 | - wkt, | |
| 797 | - $i("i3GEOselecaotoleranciapt").value | |
| 798 | - ); | |
| 918 | + i3GEO.php.selecaoWkt(retorna, tema, tipo, wkt, $i("i3GEOselecaotoleranciapt").value); | |
| 799 | 919 | } |
| 800 | 920 | }, |
| 801 | 921 | /* |
| 802 | - Classe: i3GEOF.selecao.poligono | |
| 803 | - | |
| 804 | - Realiza a seleção desenhando um polígono no mapa | |
| 922 | + * Classe: i3GEOF.selecao.poligono | |
| 923 | + * | |
| 924 | + * Realiza a seleção desenhando um polígono no mapa | |
| 805 | 925 | */ |
| 806 | - poligono:{ | |
| 807 | - openlayers: { | |
| 808 | - inicia: function(){ | |
| 926 | + poligono : { | |
| 927 | + openlayers : { | |
| 928 | + inicia : function() { | |
| 809 | 929 | var poligono; |
| 810 | 930 | i3GEO.eventos.cliquePerm.desativa(); |
| 811 | 931 | i3GEOF.selecao.poligono.openlayers.removeControle(); |
| 812 | - poligono = new OpenLayers.Control.DrawFeature( | |
| 813 | - i3GEO.desenho.layergrafico, | |
| 814 | - OpenLayers.Handler.Polygon, | |
| 815 | - { | |
| 816 | - autoActivate: true, | |
| 817 | - id: "i3GEOFselecaoPoli", | |
| 818 | - type: OpenLayers.Control.TYPE_TOOL, | |
| 819 | - callbacks:{ | |
| 820 | - done: function(feature){ | |
| 821 | - i3GEOF.selecao.poligono.openlayers.removeControle(); | |
| 822 | - feature = i3GEO.util.projOSM2Geo(feature); | |
| 823 | - //pega as coordenadas | |
| 824 | - var i, | |
| 825 | - x = [], | |
| 826 | - y = [], | |
| 827 | - vertices = feature.components[0].components, | |
| 828 | - n = vertices.length; | |
| 829 | - for(i=0;i<n;i++){ | |
| 830 | - x.push(vertices[i].x); | |
| 831 | - y.push(vertices[i].y); | |
| 832 | - } | |
| 833 | - i3GEOF.selecao.poligono.termina({ | |
| 834 | - xpt: x, | |
| 835 | - ypt: y | |
| 836 | - }); | |
| 837 | - if($i("i3GEOFselecaoMantemFigura").checked === true){ | |
| 838 | - feature = i3GEO.util.projGeo2OSM(feature); | |
| 839 | - f = new OpenLayers.Feature.Vector(feature, { | |
| 840 | - origem : "i3GEOFselecao" | |
| 841 | - }, { | |
| 842 | - fillColor: "orange", | |
| 843 | - fillOpacity: 0.4, | |
| 844 | - strokeColor: "orange", | |
| 845 | - strokeOpacity: 1, | |
| 846 | - strokeWidth: 2 | |
| 847 | - }); | |
| 848 | - | |
| 849 | - i3GEO.desenho.layergrafico.addFeatures([f]); | |
| 850 | - if (i3GEO.Interface) { | |
| 851 | - i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 852 | - } | |
| 853 | - } | |
| 932 | + poligono = new OpenLayers.Control.DrawFeature(i3GEO.desenho.layergrafico, OpenLayers.Handler.Polygon, { | |
| 933 | + autoActivate : true, | |
| 934 | + id : "i3GEOFselecaoPoli", | |
| 935 | + type : OpenLayers.Control.TYPE_TOOL, | |
| 936 | + callbacks : { | |
| 937 | + done : function(feature) { | |
| 938 | + i3GEOF.selecao.poligono.openlayers.removeControle(); | |
| 939 | + feature = i3GEO.util.projOSM2Geo(feature); | |
| 940 | + // pega as coordenadas | |
| 941 | + var i, x = [], y = [], vertices = feature.components[0].components, n = vertices.length; | |
| 942 | + for (i = 0; i < n; i++) { | |
| 943 | + x.push(vertices[i].x); | |
| 944 | + y.push(vertices[i].y); | |
| 945 | + } | |
| 946 | + i3GEOF.selecao.poligono.termina({ | |
| 947 | + xpt : x, | |
| 948 | + ypt : y | |
| 949 | + }); | |
| 950 | + if ($i("i3GEOFselecaoMantemFigura").checked === true) { | |
| 951 | + feature = i3GEO.util.projGeo2OSM(feature); | |
| 952 | + f = new OpenLayers.Feature.Vector(feature, { | |
| 953 | + origem : "i3GEOFselecao" | |
| 954 | + }, { | |
| 955 | + fillColor : "orange", | |
| 956 | + fillOpacity : 0.4, | |
| 957 | + strokeColor : "orange", | |
| 958 | + strokeOpacity : 1, | |
| 959 | + strokeWidth : 2 | |
| 960 | + }); | |
| 961 | + | |
| 962 | + i3GEO.desenho.layergrafico.addFeatures([ | |
| 963 | + f | |
| 964 | + ]); | |
| 965 | + if (i3GEO.Interface) { | |
| 966 | + i3GEO.Interface.openlayers.sobeLayersGraficos(); | |
| 854 | 967 | } |
| 855 | 968 | } |
| 856 | - }); | |
| 969 | + } | |
| 970 | + } | |
| 971 | + }); | |
| 857 | 972 | i3geoOL.addControl(poligono); |
| 858 | 973 | }, |
| 859 | - removeControle: function(){ | |
| 860 | - var controle = i3geoOL.getControlsBy("id","i3GEOFselecaoPoli"); | |
| 861 | - if(controle.length > 0){ | |
| 974 | + removeControle : function() { | |
| 975 | + var controle = i3geoOL.getControlsBy("id", "i3GEOFselecaoPoli"); | |
| 976 | + if (controle.length > 0) { | |
| 862 | 977 | controle[0].deactivate(); |
| 863 | 978 | i3geoOL.removeControl(controle[0]); |
| 864 | 979 | } |
| 865 | 980 | } |
| 866 | 981 | }, |
| 867 | - googlemaps: { | |
| 868 | - inicia: function(){ | |
| 982 | + googlemaps : { | |
| 983 | + inicia : function() { | |
| 869 | 984 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 870 | - i3GeoMap.setOptions({disableDoubleClickZoom:true}); | |
| 871 | - i3GeoMap.setOptions({draggableCursor:'crosshair'}); | |
| 872 | - var evtdblclick = null, | |
| 873 | - evtclick = null, | |
| 874 | - evtmousemove = null, | |
| 875 | - pontos = { | |
| 876 | - mvcLine: new google.maps.MVCArray(), | |
| 877 | - line: null, | |
| 878 | - polygon: null, | |
| 879 | - x: [], | |
| 880 | - y: [] | |
| 881 | - }, | |
| 882 | - termina = function(){ | |
| 985 | + i3GeoMap.setOptions({ | |
| 986 | + disableDoubleClickZoom : true | |
| 987 | + }); | |
| 988 | + i3GeoMap.setOptions({ | |
| 989 | + draggableCursor : 'crosshair' | |
| 990 | + }); | |
| 991 | + var evtdblclick = null, evtclick = null, evtmousemove = null, pontos = { | |
| 992 | + mvcLine : new google.maps.MVCArray(), | |
| 993 | + line : null, | |
| 994 | + polygon : null, | |
| 995 | + x : [], | |
| 996 | + y : [] | |
| 997 | + }, termina = function() { | |
| 883 | 998 | google.maps.event.removeListener(evtdblclick); |
| 884 | 999 | google.maps.event.removeListener(evtclick); |
| 885 | 1000 | google.maps.event.removeListener(evtmousemove); |
| 886 | - var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","i3GEOFselecao"); | |
| 1001 | + var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem", "i3GEOFselecao"); | |
| 887 | 1002 | i3GEOF.selecao.poligono.termina({ |
| 888 | - xpt: pontos.x, | |
| 889 | - ypt: pontos.y | |
| 1003 | + xpt : pontos.x, | |
| 1004 | + ypt : pontos.y | |
| 890 | 1005 | }); |
| 891 | - if(f && f.length > 0 && $i("i3GEOFselecaoMantemFigura").checked === false){ | |
| 1006 | + if (f && f.length > 0 && $i("i3GEOFselecaoMantemFigura").checked === false) { | |
| 892 | 1007 | i3GEO.desenho.googlemaps.destroyFeatures(f); |
| 893 | 1008 | } |
| 894 | - f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem","i3GEOFselecaoMarcas"); | |
| 895 | - if(f && f.length > 0){ | |
| 1009 | + f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem", "i3GEOFselecaoMarcas"); | |
| 1010 | + if (f && f.length > 0) { | |
| 896 | 1011 | i3GEO.desenho.googlemaps.destroyFeatures(f); |
| 897 | 1012 | } |
| 898 | 1013 | }; |
| ... | ... | @@ -900,21 +1015,19 @@ i3GEOF.selecao = { |
| 900 | 1015 | pontos.mvcLine.push(evt.latLng); |
| 901 | 1016 | pontos.x.push(evt.latLng.lng()); |
| 902 | 1017 | pontos.y.push(evt.latLng.lat()); |
| 903 | - i3GEO.desenho.googlemaps.shapes.push( | |
| 904 | - new google.maps.Marker({ | |
| 905 | - map: i3GeoMap, | |
| 906 | - fillOpacity: 0, | |
| 907 | - clickable: false, | |
| 908 | - position:evt.latLng, | |
| 909 | - icon: { | |
| 910 | - path: google.maps.SymbolPath.CIRCLE, | |
| 911 | - scale: 2.5, | |
| 912 | - strokeColor: "#ffffff" | |
| 913 | - }, | |
| 914 | - origem: "i3GEOFselecaoMarcas" | |
| 915 | - }) | |
| 916 | - ); | |
| 917 | - //mais um ponto para criar uma linha movel | |
| 1018 | + i3GEO.desenho.googlemaps.shapes.push(new google.maps.Marker({ | |
| 1019 | + map : i3GeoMap, | |
| 1020 | + fillOpacity : 0, | |
| 1021 | + clickable : false, | |
| 1022 | + position : evt.latLng, | |
| 1023 | + icon : { | |
| 1024 | + path : google.maps.SymbolPath.CIRCLE, | |
| 1025 | + scale : 2.5, | |
| 1026 | + strokeColor : "#ffffff" | |
| 1027 | + }, | |
| 1028 | + origem : "i3GEOFselecaoMarcas" | |
| 1029 | + })); | |
| 1030 | + // mais um ponto para criar uma linha movel | |
| 918 | 1031 | pontos.mvcLine.push(evt.latLng); |
| 919 | 1032 | }); |
| 920 | 1033 | evtmousemove = google.maps.event.addListener(i3GeoMap, "mousemove", function(evt) { |
| ... | ... | @@ -922,13 +1035,13 @@ i3GEOF.selecao = { |
| 922 | 1035 | if (!pontos.line) { |
| 923 | 1036 | // Create the line (google.maps.Polyline) |
| 924 | 1037 | pontos.line = new google.maps.Polygon({ |
| 925 | - map: i3GeoMap, | |
| 926 | - clickable: false, | |
| 927 | - strokeColor: "#000000", | |
| 928 | - strokeOpacity: 1, | |
| 929 | - strokeWeight: 2, | |
| 930 | - path: pontos.mvcLine, | |
| 931 | - origem: "i3GEOFselecao" | |
| 1038 | + map : i3GeoMap, | |
| 1039 | + clickable : false, | |
| 1040 | + strokeColor : "#000000", | |
| 1041 | + strokeOpacity : 1, | |
| 1042 | + strokeWeight : 2, | |
| 1043 | + path : pontos.mvcLine, | |
| 1044 | + origem : "i3GEOFselecao" | |
| 932 | 1045 | }); |
| 933 | 1046 | i3GEO.desenho.googlemaps.shapes.push(pontos.line); |
| 934 | 1047 | } |
| ... | ... | @@ -942,107 +1055,108 @@ i3GEOF.selecao = { |
| 942 | 1055 | } |
| 943 | 1056 | }, |
| 944 | 1057 | /* |
| 945 | - Function: termina | |
| 946 | - | |
| 947 | - Termina o desenho do polígono e executa a operação de seleção | |
| 1058 | + * Function: termina | |
| 1059 | + * | |
| 1060 | + * Termina o desenho do polígono e executa a operação de seleção | |
| 948 | 1061 | */ |
| 949 | - termina: function(pontos){ | |
| 950 | - var xs,ys,retorna,p,cp,tema=i3GEO.temaAtivo; | |
| 1062 | + termina : function(pontos) { | |
| 1063 | + var xs, ys, retorna, p, cp, tema = i3GEO.temaAtivo; | |
| 951 | 1064 | n = pontos.xpt.length; |
| 952 | 1065 | xs = pontos.xpt.toString(","); |
| 953 | 1066 | ys = pontos.ypt.toString(","); |
| 954 | - retorna = function(retorno){ | |
| 1067 | + retorna = function(retorno) { | |
| 955 | 1068 | i3GEOF.selecao.fimSelecao(retorno); |
| 956 | 1069 | }; |
| 957 | - i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); | |
| 1070 | + i3GEO.janela.abreAguarde("i3GEO.atualiza", $trad("o1")); | |
| 958 | 1071 | i3GEO.eventos.cliquePerm.ativa(); |
| 959 | - p = i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoPoli"; | |
| 1072 | + p = i3GEO.configura.locaplic + "/ferramentas/selecao/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=selecaoPoli"; | |
| 960 | 1073 | cp = new cpaint(); |
| 961 | - //cp.set_debug(2) | |
| 1074 | + // cp.set_debug(2) | |
| 962 | 1075 | cp.set_transfer_mode('POST'); |
| 963 | 1076 | cp.set_response_type("JSON"); |
| 964 | 1077 | cp.call( |
| 965 | 1078 | p, |
| 966 | 1079 | "selecaoPoli", |
| 967 | 1080 | retorna, |
| 968 | - "xs="+xs, | |
| 969 | - "ys="+ys, | |
| 970 | - "tema="+tema, | |
| 971 | - "tipo="+$i("i3GEOselecaotipoOperacao").value, | |
| 972 | - "buffer="+$i("i3GEOselecaotoleranciapt").value | |
| 973 | - ); | |
| 1081 | + "xs=" + xs, | |
| 1082 | + "ys=" + ys, | |
| 1083 | + "tema=" + tema, | |
| 1084 | + "tipo=" + $i("i3GEOselecaotipoOperacao").value, | |
| 1085 | + "buffer=" + $i("i3GEOselecaotoleranciapt").value); | |
| 974 | 1086 | } |
| 975 | 1087 | }, |
| 976 | 1088 | /* |
| 977 | - Function: criatema | |
| 978 | - | |
| 979 | - Cria um novo tema com a seleção atual | |
| 1089 | + * Function: criatema | |
| 1090 | + * | |
| 1091 | + * Cria um novo tema com a seleção atual | |
| 980 | 1092 | */ |
| 981 | - criatema: function(){ | |
| 982 | - if(i3GEOF.selecao.aguarde.visibility === "visible") | |
| 983 | - {return;} | |
| 984 | - try{ | |
| 985 | - if($i("i3GEOselecaotemasLigados").value === "") | |
| 986 | - {i3GEO.janela.tempoMsg("Escolha um tema");return;} | |
| 1093 | + criatema : function() { | |
| 1094 | + if (i3GEOF.selecao.aguarde.visibility === "visible") { | |
| 1095 | + return; | |
| 1096 | + } | |
| 1097 | + try { | |
| 1098 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 1099 | + i3GEO.janela.tempoMsg("Escolha um tema"); | |
| 1100 | + return; | |
| 1101 | + } | |
| 987 | 1102 | i3GEOF.selecao.aguarde.visibility = "visible"; |
| 988 | - var fim = function(){ | |
| 1103 | + var fim = function() { | |
| 989 | 1104 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 990 | 1105 | i3GEO.atualiza(); |
| 991 | 1106 | }; |
| 992 | - i3GEO.php.criatemaSel(fim,$i("i3GEOselecaotemasLigados").value); | |
| 1107 | + i3GEO.php.criatemaSel(fim, $i("i3GEOselecaotemasLigados").value); | |
| 1108 | + } catch (e) { | |
| 1109 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1110 | + i3GEOF.selecao.aguarde.visibility = "hidden"; | |
| 993 | 1111 | } |
| 994 | - catch(e){i3GEO.janela.tempoMsg("Erro: "+e);i3GEOF.selecao.aguarde.visibility = "hidden";} | |
| 995 | 1112 | }, |
| 996 | 1113 | /* |
| 997 | - Function: adicionaLinhaFiltro | |
| 998 | - | |
| 999 | - Adiciona uma nova linha de filtro | |
| 1114 | + * Function: adicionaLinhaFiltro | |
| 1115 | + * | |
| 1116 | + * Adiciona uma nova linha de filtro | |
| 1000 | 1117 | */ |
| 1001 | - adicionaLinhaFiltro: function(){ | |
| 1002 | - var add,xis,interrogacao,operador,conector,valor,ntr,ntad,ntd,ntd1,ntd2,ntd3,ntd4,ntd5,tabela; | |
| 1003 | - try{ | |
| 1118 | + adicionaLinhaFiltro : function() { | |
| 1119 | + var add, xis, interrogacao, operador, conector, valor, ntr, ntad, ntd, ntd1, ntd2, ntd3, ntd4, ntd5, tabela; | |
| 1120 | + try { | |
| 1004 | 1121 | add = document.createElement("img"); |
| 1005 | - add.src = i3GEO.configura.locaplic+'/imagens/oxygen/16x16/list-add.png'; | |
| 1006 | - add.style.cursor="pointer"; | |
| 1007 | - add.onclick = function(){ | |
| 1122 | + add.src = i3GEO.configura.locaplic + '/imagens/oxygen/16x16/list-add.png'; | |
| 1123 | + add.style.cursor = "pointer"; | |
| 1124 | + add.onclick = function() { | |
| 1008 | 1125 | i3GEOF.selecao.adicionaLinhaFiltro(); |
| 1009 | 1126 | }; |
| 1010 | 1127 | |
| 1011 | 1128 | xis = document.createElement("img"); |
| 1012 | - xis.src = i3GEO.configura.locaplic+'/imagens/oxygen/16x16/edit-delete.png'; | |
| 1013 | - xis.style.cursor="pointer"; | |
| 1014 | - xis.onclick = function(){ | |
| 1015 | - var p = this.parentNode.parentNode.parentNode, | |
| 1016 | - i; | |
| 1017 | - for (i = 0; i < p.childNodes.length;i++){ | |
| 1129 | + xis.src = i3GEO.configura.locaplic + '/imagens/oxygen/16x16/edit-delete.png'; | |
| 1130 | + xis.style.cursor = "pointer"; | |
| 1131 | + xis.onclick = function() { | |
| 1132 | + var p = this.parentNode.parentNode.parentNode, i; | |
| 1133 | + for (i = 0; i < p.childNodes.length; i++) { | |
| 1018 | 1134 | p.removeChild(p.childNodes[i]); |
| 1019 | 1135 | } |
| 1020 | 1136 | }; |
| 1021 | 1137 | interrogacao = document.createElement("img"); |
| 1022 | - interrogacao.src = i3GEO.configura.locaplic+'/imagens/oxygen/16x16/format-line-spacing-normal.png'; | |
| 1023 | - interrogacao.title='mostra valores'; | |
| 1024 | - interrogacao.style.cursor="pointer"; | |
| 1025 | - interrogacao.style.margin="5px"; | |
| 1026 | - interrogacao.onclick = function(){ | |
| 1027 | - var obj = (this.parentNode.parentNode.getElementsByTagName("input"))[0], | |
| 1028 | - itemTema = (this.parentNode.parentNode.getElementsByTagName("select"))[0].value; | |
| 1029 | - i3GEO.util.comboValoresItem( | |
| 1030 | - "i3GEOselecaocbitens", | |
| 1031 | - i3GEO.temaAtivo, | |
| 1032 | - itemTema, | |
| 1033 | - function(retorno){ | |
| 1034 | - $i("i3GEOselecaovalores").innerHTML = "<br><p class=paragrafo >" + $trad('selecionaValor',i3GEOF.selecao.dicionario) + ":</p>" | |
| 1035 | - + "<div class='styled-select' >" + retorno.dados + "</div>"; | |
| 1036 | - if ($i("i3GEOselecaocbitens")){ | |
| 1037 | - $i("i3GEOselecaocbitens").onchange = function(){ | |
| 1038 | - obj.value = this.value; | |
| 1039 | - }; | |
| 1040 | - } | |
| 1041 | - }, | |
| 1042 | - "i3GEOselecaovalores", | |
| 1043 | - "display:block" | |
| 1044 | - ); | |
| 1045 | - }; | |
| 1138 | + interrogacao.src = i3GEO.configura.locaplic + '/imagens/oxygen/16x16/format-line-spacing-normal.png'; | |
| 1139 | + interrogacao.title = 'mostra valores'; | |
| 1140 | + interrogacao.style.cursor = "pointer"; | |
| 1141 | + interrogacao.style.margin = "5px"; | |
| 1142 | + interrogacao.onclick = | |
| 1143 | + function() { | |
| 1144 | + var obj = (this.parentNode.parentNode.getElementsByTagName("input"))[0], itemTema = | |
| 1145 | + (this.parentNode.parentNode.getElementsByTagName("select"))[0].value; | |
| 1146 | + i3GEO.util.comboValoresItem("i3GEOselecaocbitens", i3GEO.temaAtivo, itemTema, function(retorno) { | |
| 1147 | + $i("i3GEOselecaovalores").innerHTML = | |
| 1148 | + "<br><p class=paragrafo >" + $trad('selecionaValor', i3GEOF.selecao.dicionario) | |
| 1149 | + + ":</p>" | |
| 1150 | + + "<div class='styled-select' >" | |
| 1151 | + + retorno.dados | |
| 1152 | + + "</div>"; | |
| 1153 | + if ($i("i3GEOselecaocbitens")) { | |
| 1154 | + $i("i3GEOselecaocbitens").onchange = function() { | |
| 1155 | + obj.value = this.value; | |
| 1156 | + }; | |
| 1157 | + } | |
| 1158 | + }, "i3GEOselecaovalores", "display:block"); | |
| 1159 | + }; | |
| 1046 | 1160 | operador = "<div class='styled-select' style='width:95px;margin-left:5px;'><select>"; |
| 1047 | 1161 | operador += "<option value='='>=</option>"; |
| 1048 | 1162 | operador += "<option value='!='> != </option>"; |
| ... | ... | @@ -1062,10 +1176,9 @@ i3GEOF.selecao = { |
| 1062 | 1176 | |
| 1063 | 1177 | valor = document.createElement("div"); |
| 1064 | 1178 | valor.className = 'i3geoForm100 i3geoFormIconeEdita'; |
| 1065 | - valor.style.marginLeft="5px"; | |
| 1179 | + valor.style.marginLeft = "5px"; | |
| 1066 | 1180 | valor.innerHTML = "<input type=text value='' />"; |
| 1067 | 1181 | |
| 1068 | - | |
| 1069 | 1182 | ntr = document.createElement("tr"); |
| 1070 | 1183 | ntad = document.createElement("td"); |
| 1071 | 1184 | ntad.appendChild(add); |
| ... | ... | @@ -1076,16 +1189,12 @@ i3GEOF.selecao = { |
| 1076 | 1189 | ntr.appendChild(ntd); |
| 1077 | 1190 | |
| 1078 | 1191 | ntd1 = document.createElement("td"); |
| 1079 | - i3GEO.util.comboItens( | |
| 1080 | - "i3GEOselecaoItensAtrib", | |
| 1081 | - i3GEO.temaAtivo, | |
| 1082 | - function(retorno){ | |
| 1083 | - ntd1.innerHTML = "<div class='styled-select' style='width:95px;margin-left:5px;' >" + retorno.dados + "</div>"; | |
| 1084 | - $i("i3GEOselecaoItensAtrib").onchange = function(){ | |
| 1085 | - $i("i3GEOselecaovalores").innerHTML = ""; | |
| 1086 | - }; | |
| 1087 | - } | |
| 1088 | - ); | |
| 1192 | + i3GEO.util.comboItens("i3GEOselecaoItensAtrib", i3GEO.temaAtivo, function(retorno) { | |
| 1193 | + ntd1.innerHTML = "<div class='styled-select' style='width:95px;margin-left:5px;' >" + retorno.dados + "</div>"; | |
| 1194 | + $i("i3GEOselecaoItensAtrib").onchange = function() { | |
| 1195 | + $i("i3GEOselecaovalores").innerHTML = ""; | |
| 1196 | + }; | |
| 1197 | + }); | |
| 1089 | 1198 | ntr.appendChild(ntd1); |
| 1090 | 1199 | |
| 1091 | 1200 | ntd2 = document.createElement("td"); |
| ... | ... | @@ -1104,37 +1213,43 @@ i3GEOF.selecao = { |
| 1104 | 1213 | ntd5.innerHTML = conector; |
| 1105 | 1214 | ntr.appendChild(ntd5); |
| 1106 | 1215 | |
| 1107 | - //ntb = document.createElement("tbody"); | |
| 1108 | - //ntb.appendChild(ntr); | |
| 1109 | - if(navm) | |
| 1110 | - {tabela = $i("i3GEOselecaoparametros").getElementsByTagName("tbody")[0];} | |
| 1111 | - else | |
| 1112 | - {tabela = $i("i3GEOselecaoparametros");} | |
| 1216 | + // ntb = document.createElement("tbody"); | |
| 1217 | + // ntb.appendChild(ntr); | |
| 1218 | + if (navm) { | |
| 1219 | + tabela = $i("i3GEOselecaoparametros").getElementsByTagName("tbody")[0]; | |
| 1220 | + } else { | |
| 1221 | + tabela = $i("i3GEOselecaoparametros"); | |
| 1222 | + } | |
| 1113 | 1223 | tabela.appendChild(ntr); |
| 1224 | + } catch (e) { | |
| 1225 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1114 | 1226 | } |
| 1115 | - catch(e){i3GEO.janela.tempoMsg("Erro: "+e);} | |
| 1116 | 1227 | }, |
| 1117 | 1228 | /* |
| 1118 | - Function: atributo | |
| 1119 | - | |
| 1120 | - Seleciona por atributo | |
| 1229 | + * Function: atributo | |
| 1230 | + * | |
| 1231 | + * Seleciona por atributo | |
| 1121 | 1232 | */ |
| 1122 | - atributo: function(){ | |
| 1123 | - if(i3GEOF.selecao.aguarde.visibility === "visible") | |
| 1124 | - {return;} | |
| 1125 | - if($i("i3GEOselecaotemasLigados").value === "") | |
| 1126 | - {i3GEO.janela.tempoMsg($trad('selecionaTema',i3GEOF.selecao.dicionario));return;} | |
| 1127 | - try{ | |
| 1233 | + atributo : function() { | |
| 1234 | + if (i3GEOF.selecao.aguarde.visibility === "visible") { | |
| 1235 | + return; | |
| 1236 | + } | |
| 1237 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 1238 | + i3GEO.janela.tempoMsg($trad('selecionaTema', i3GEOF.selecao.dicionario)); | |
| 1239 | + return; | |
| 1240 | + } | |
| 1241 | + try { | |
| 1128 | 1242 | i3GEOF.selecao.aguarde.visibility = "visible"; |
| 1129 | - var filtro = "", | |
| 1130 | - g,ipt,i,ii,nos,s,itemsel,valor,operador,conector,temp; | |
| 1131 | - if(navm){ii = 2;} | |
| 1132 | - else | |
| 1133 | - {ii = 0;} | |
| 1243 | + var filtro = "", g, ipt, i, ii, nos, s, itemsel, valor, operador, conector, temp; | |
| 1244 | + if (navm) { | |
| 1245 | + ii = 2; | |
| 1246 | + } else { | |
| 1247 | + ii = 0; | |
| 1248 | + } | |
| 1134 | 1249 | g = $i("i3GEOselecaoparametros"); |
| 1135 | 1250 | ipt = g.getElementsByTagName("tr"); |
| 1136 | - if (ipt.length > 0){ | |
| 1137 | - for (i=ii;i<ipt.length; i++){ | |
| 1251 | + if (ipt.length > 0) { | |
| 1252 | + for (i = ii; i < ipt.length; i++) { | |
| 1138 | 1253 | nos = ipt[i].childNodes; |
| 1139 | 1254 | s = nos[2].getElementsByTagName("select"); |
| 1140 | 1255 | itemsel = s[0].value; |
| ... | ... | @@ -1144,46 +1259,49 @@ i3GEOF.selecao = { |
| 1144 | 1259 | valor = s[0].value; |
| 1145 | 1260 | s = nos[6].getElementsByTagName("select"); |
| 1146 | 1261 | conector = s[0].value; |
| 1147 | - if (valor*1) | |
| 1148 | - {filtro = filtro + "(["+itemsel+"] "+operador+" "+valor+")";} | |
| 1149 | - else | |
| 1150 | - {filtro = filtro + "(|["+itemsel+"]| "+operador+" |"+valor+"|)";} | |
| 1151 | - if ((i + 1) != ipt.length) //tem conector | |
| 1152 | - {filtro = filtro + conector;} | |
| 1153 | - else | |
| 1154 | - {filtro = "("+filtro+")";} | |
| 1262 | + if (valor * 1) { | |
| 1263 | + filtro = filtro + "([" + itemsel + "] " + operador + " " + valor + ")"; | |
| 1264 | + } else { | |
| 1265 | + filtro = filtro + "(|[" + itemsel + "]| " + operador + " |" + valor + "|)"; | |
| 1266 | + } | |
| 1267 | + if ((i + 1) != ipt.length) // tem conector | |
| 1268 | + { | |
| 1269 | + filtro = filtro + conector; | |
| 1270 | + } else { | |
| 1271 | + filtro = "(" + filtro + ")"; | |
| 1272 | + } | |
| 1155 | 1273 | } |
| 1156 | 1274 | } |
| 1157 | - if (filtro === ""){ | |
| 1275 | + if (filtro === "") { | |
| 1158 | 1276 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1159 | 1277 | return; |
| 1160 | 1278 | } |
| 1161 | - temp = function(retorno){ | |
| 1279 | + temp = function(retorno) { | |
| 1162 | 1280 | i3GEOF.selecao.fimSelecao(retorno); |
| 1163 | 1281 | }; |
| 1164 | - i3GEO.php.selecaoatrib2(temp,i3GEO.temaAtivo,filtro,$i("i3GEOselecaotipoOperacao").value); | |
| 1165 | - } | |
| 1166 | - catch(e){ | |
| 1167 | - i3GEO.janela.tempoMsg("Erro: "+e); | |
| 1282 | + i3GEO.php.selecaoatrib2(temp, i3GEO.temaAtivo, filtro, $i("i3GEOselecaotipoOperacao").value); | |
| 1283 | + } catch (e) { | |
| 1284 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1168 | 1285 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1169 | 1286 | } |
| 1170 | 1287 | }, |
| 1171 | 1288 | /* |
| 1172 | - Function: aplicaselecaoTema | |
| 1173 | - | |
| 1174 | - Realiza a seleção cruzando um tema com outro | |
| 1289 | + * Function: aplicaselecaoTema | |
| 1290 | + * | |
| 1291 | + * Realiza a seleção cruzando um tema com outro | |
| 1175 | 1292 | */ |
| 1176 | - aplicaselecaoTema: function(){ | |
| 1177 | - if(i3GEOF.selecao.aguarde.visibility === "visible") | |
| 1178 | - {return;} | |
| 1179 | - if($i("i3GEOselecaotemasLigados").value === ""){ | |
| 1180 | - i3GEO.janela.tempoMsg($trad('selecionaTema',i3GEOF.selecao.dicionario)); | |
| 1293 | + aplicaselecaoTema : function() { | |
| 1294 | + if (i3GEOF.selecao.aguarde.visibility === "visible") { | |
| 1295 | + return; | |
| 1296 | + } | |
| 1297 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 1298 | + i3GEO.janela.tempoMsg($trad('selecionaTema', i3GEOF.selecao.dicionario)); | |
| 1181 | 1299 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1182 | 1300 | return; |
| 1183 | 1301 | } |
| 1184 | - try{ | |
| 1302 | + try { | |
| 1185 | 1303 | i3GEOF.selecao.aguarde.visibility = "visible"; |
| 1186 | - var temp = function(retorno){ | |
| 1304 | + var temp = function(retorno) { | |
| 1187 | 1305 | i3GEOF.selecao.fimSelecao(retorno); |
| 1188 | 1306 | }; |
| 1189 | 1307 | i3GEO.php.selecaotema( |
| ... | ... | @@ -1191,64 +1309,66 @@ i3GEOF.selecao = { |
| 1191 | 1309 | $i("i3GEOselecaoTemaoverlay").value, |
| 1192 | 1310 | i3GEO.temaAtivo, |
| 1193 | 1311 | $i("i3GEOselecaotipoOperacao").value, |
| 1194 | - $i("i3GEOselecaotoleranciapt").value | |
| 1195 | - ); | |
| 1196 | - } | |
| 1197 | - catch(e){ | |
| 1198 | - i3GEO.janela.tempoMsg("Erro: "+e); | |
| 1312 | + $i("i3GEOselecaotoleranciapt").value); | |
| 1313 | + } catch (e) { | |
| 1314 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1199 | 1315 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1200 | 1316 | } |
| 1201 | 1317 | }, |
| 1202 | 1318 | /* |
| 1203 | - Function: grafico | |
| 1204 | - | |
| 1205 | - Abre uma janela flutuante para criar gráficos | |
| 1319 | + * Function: grafico | |
| 1320 | + * | |
| 1321 | + * Abre uma janela flutuante para criar gráficos | |
| 1206 | 1322 | */ |
| 1207 | - grafico: function(){ | |
| 1323 | + grafico : function() { | |
| 1208 | 1324 | i3GEO.analise.dialogo.graficoInterativo1(); |
| 1209 | 1325 | }, |
| 1210 | 1326 | /* |
| 1211 | - Function: graficoPerfil | |
| 1212 | - | |
| 1213 | - Abre uma janela flutuante para criar gráficos de perfil | |
| 1327 | + * Function: graficoPerfil | |
| 1328 | + * | |
| 1329 | + * Abre uma janela flutuante para criar gráficos de perfil | |
| 1214 | 1330 | */ |
| 1215 | - graficoPerfil: function(){ | |
| 1216 | - var cp,p; | |
| 1217 | - if(i3GEOF.selecao.aguarde.visibility === "visible") | |
| 1218 | - {return;} | |
| 1219 | - if($i("i3GEOselecaotemasLigados").value === "") | |
| 1220 | - {i3GEO.janela.tempoMsg("Escolha um tema");return;} | |
| 1221 | - try{ | |
| 1331 | + graficoPerfil : function() { | |
| 1332 | + var cp, p; | |
| 1333 | + if (i3GEOF.selecao.aguarde.visibility === "visible") { | |
| 1334 | + return; | |
| 1335 | + } | |
| 1336 | + if ($i("i3GEOselecaotemasLigados").value === "") { | |
| 1337 | + i3GEO.janela.tempoMsg("Escolha um tema"); | |
| 1338 | + return; | |
| 1339 | + } | |
| 1340 | + try { | |
| 1222 | 1341 | i3GEOF.selecao.aguarde.visibility = "visible"; |
| 1223 | - var temp = function(retorno){ | |
| 1342 | + var temp = function(retorno) { | |
| 1224 | 1343 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1225 | - if (retorno.data != undefined){ | |
| 1226 | - var x = [], | |
| 1227 | - y = [], | |
| 1228 | - i, | |
| 1229 | - n = retorno.data.length, | |
| 1230 | - js = i3GEO.configura.locaplic+"/ferramentas/perfil/index.js"; | |
| 1231 | - for (i=0;i<n; i++){ | |
| 1344 | + if (retorno.data != undefined) { | |
| 1345 | + var x = [], y = [], i, n = retorno.data.length, js = i3GEO.configura.locaplic + "/ferramentas/perfil/index.js"; | |
| 1346 | + for (i = 0; i < n; i++) { | |
| 1232 | 1347 | x.push(retorno.data[i].x); |
| 1233 | 1348 | y.push(retorno.data[i].y); |
| 1234 | 1349 | } |
| 1235 | - if(x.length == 0) | |
| 1236 | - {i3GEO.janela.tempoMsg($trad('msgNenhumPontoEncontrado',i3GEOF.selecao.dicionario));return;} | |
| 1350 | + if (x.length == 0) { | |
| 1351 | + i3GEO.janela.tempoMsg($trad('msgNenhumPontoEncontrado', i3GEOF.selecao.dicionario)); | |
| 1352 | + return; | |
| 1353 | + } | |
| 1237 | 1354 | pontosdistobj = { |
| 1238 | - xpt: x, | |
| 1239 | - ypt: y | |
| 1355 | + xpt : x, | |
| 1356 | + ypt : y | |
| 1240 | 1357 | }; |
| 1241 | - i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script"); | |
| 1358 | + i3GEO.util.scriptTag(js, "i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)", "i3GEOF.perfil_script"); | |
| 1242 | 1359 | } |
| 1243 | 1360 | }; |
| 1244 | 1361 | cp = new cpaint(); |
| 1245 | 1362 | cp.set_response_type("JSON"); |
| 1246 | - p = i3GEO.configura.locaplic+"/ferramentas/selecao/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=listaPontosShapeSel&tema="+i3GEO.temaAtivo; | |
| 1247 | - cp.call(p,"listaPontosShape",temp); | |
| 1248 | - } | |
| 1249 | - catch(e){ | |
| 1250 | - i3GEO.janela.tempoMsg("Erro: "+e); | |
| 1363 | + p = | |
| 1364 | + i3GEO.configura.locaplic + "/ferramentas/selecao/exec.php?g_sid=" | |
| 1365 | + + i3GEO.configura.sid | |
| 1366 | + + "&funcao=listaPontosShapeSel&tema=" | |
| 1367 | + + i3GEO.temaAtivo; | |
| 1368 | + cp.call(p, "listaPontosShape", temp); | |
| 1369 | + } catch (e) { | |
| 1370 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1251 | 1371 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1252 | 1372 | } |
| 1253 | 1373 | } |
| 1254 | -}; | |
| 1374 | + }; | ... | ... |
js/desenho.js
| ... | ... | @@ -21,407 +21,344 @@ |
| 21 | 21 | */ |
| 22 | 22 | /** |
| 23 | 23 | * Licença |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * GPL2 |
| 26 | - * | |
| 26 | + * | |
| 27 | 27 | * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet |
| 28 | - * | |
| 29 | - * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente | |
| 30 | - * Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
| 31 | - * | |
| 32 | - * Este programa é software livre; você pode redistribuí-lo | |
| 33 | - * e/ou modificá-lo sob os termos da Licença Pública Geral | |
| 34 | - * GNU conforme publicada pela Free Software Foundation; | |
| 35 | - * | |
| 36 | - * Este programa é distribuído na expectativa de que seja | |
| 37 | - * útil, porém, SEM NENHUMA GARANTIA; nem mesmo a garantia | |
| 38 | - * implícita de COMERCIABILIDADE OU ADEQUACÃO A UMA FINALIDADE | |
| 39 | - * ESPECÍFICA. Consulte a Licença Pública Geral do GNU para | |
| 40 | - * mais detalhes. Você deve ter recebido uma cópia da | |
| 41 | - * Licença Pública Geral do GNU junto com este programa; se | |
| 42 | - * não, escreva para a Free Software Foundation, Inc., no endereço | |
| 43 | - * 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
| 28 | + * | |
| 29 | + * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
| 30 | + * | |
| 31 | + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença | |
| 32 | + * Pública Geral GNU conforme publicada pela Free Software Foundation; | |
| 33 | + * | |
| 34 | + * Este programa é distribuído na expectativa de que seja útil, porém, SEM NENHUMA GARANTIA; nem mesmo a | |
| 35 | + * garantia implícita de COMERCIABILIDADE OU ADEQUACÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença | |
| 36 | + * Pública Geral do GNU para mais detalhes. Você deve ter recebido uma cópia da Licença Pública Geral do | |
| 37 | + * GNU junto com este programa; se não, escreva para a Free Software Foundation, Inc., no endereço 59 Temple Street, Suite | |
| 38 | + * 330, Boston, MA 02111-1307 USA. | |
| 44 | 39 | */ |
| 45 | 40 | if (typeof (i3GEO) === 'undefined') { |
| 46 | 41 | var i3GEO = {}; |
| 47 | 42 | } |
| 48 | -i3GEO.desenho = { | |
| 49 | - /** | |
| 50 | - * Constant: layergrafico | |
| 51 | - * | |
| 52 | - * Objeto LAYER para a interface OpenLayers criado com | |
| 53 | - * i3GEO.desenho.openlayers.criaLayerGrafico | |
| 54 | - * | |
| 55 | - * Tipo: | |
| 56 | - * | |
| 57 | - * {OpenLayers.Layer.Vector} | |
| 58 | - * | |
| 59 | - */ | |
| 60 | - layergrafico : null, | |
| 61 | - /** | |
| 62 | - * Propriedade: estilos | |
| 63 | - * | |
| 64 | - * Estilos que podem ser utilizados para desenhar os elementos | |
| 65 | - * | |
| 66 | - * Tipo: | |
| 67 | - * | |
| 68 | - * {objeto} | |
| 69 | - */ | |
| 70 | - estilos : { | |
| 71 | - "normal" : { | |
| 72 | - fillcolor : '#ffffff', | |
| 73 | - linecolor : '#000000', | |
| 74 | - linewidth : '2', | |
| 75 | - circcolor : '#ffffff', | |
| 76 | - textcolor : '#787A78' | |
| 43 | +i3GEO.desenho = | |
| 44 | + { | |
| 45 | + /** | |
| 46 | + * Constant: layergrafico | |
| 47 | + * | |
| 48 | + * Objeto LAYER para a interface OpenLayers criado com i3GEO.desenho.openlayers.criaLayerGrafico | |
| 49 | + * | |
| 50 | + * Tipo: | |
| 51 | + * | |
| 52 | + * {OpenLayers.Layer.Vector} | |
| 53 | + * | |
| 54 | + */ | |
| 55 | + layergrafico : null, | |
| 56 | + /** | |
| 57 | + * Propriedade: estilos | |
| 58 | + * | |
| 59 | + * Estilos que podem ser utilizados para desenhar os elementos | |
| 60 | + * | |
| 61 | + * Tipo: | |
| 62 | + * | |
| 63 | + * {objeto} | |
| 64 | + */ | |
| 65 | + estilos : { | |
| 66 | + "normal" : { | |
| 67 | + fillcolor : '#ffffff', | |
| 68 | + linecolor : '#000000', | |
| 69 | + linewidth : '2', | |
| 70 | + circcolor : '#ffffff', | |
| 71 | + textcolor : '#787A78' | |
| 72 | + }, | |
| 73 | + "palido" : { | |
| 74 | + fillcolor : '#B5A8A8', | |
| 75 | + linecolor : '#BAA4AE', | |
| 76 | + linewidth : '1', | |
| 77 | + circcolor : '#E0D7DC', | |
| 78 | + textcolor : '#787A78' | |
| 79 | + }, | |
| 80 | + "vermelho" : { | |
| 81 | + fillcolor : '#E8ACAC', | |
| 82 | + linecolor : '#F50707', | |
| 83 | + linewidth : '1', | |
| 84 | + circcolor : '#F09EA6', | |
| 85 | + textcolor : '#787A78' | |
| 86 | + }, | |
| 87 | + "verde" : { | |
| 88 | + fillcolor : '#3CCC2F', | |
| 89 | + linecolor : '#0C6642', | |
| 90 | + linewidth : '1', | |
| 91 | + circcolor : '#C7D9D2', | |
| 92 | + textcolor : '#787A78' | |
| 93 | + } | |
| 77 | 94 | }, |
| 78 | - "palido" : { | |
| 79 | - fillcolor : '#B5A8A8', | |
| 80 | - linecolor : '#BAA4AE', | |
| 81 | - linewidth : '1', | |
| 82 | - circcolor : '#E0D7DC', | |
| 83 | - textcolor : '#787A78' | |
| 95 | + // @TODO remover apos refatorar codigo | |
| 96 | + estilosOld : { | |
| 97 | + "normal" : { | |
| 98 | + fillcolor : 'red', | |
| 99 | + linecolor : 'black', | |
| 100 | + linewidth : '1', | |
| 101 | + circcolor : 'white', | |
| 102 | + textcolor : 'gray' | |
| 103 | + }, | |
| 104 | + "palido" : { | |
| 105 | + fillcolor : 'gray', | |
| 106 | + linecolor : 'gray', | |
| 107 | + linewidth : '1', | |
| 108 | + circcolor : 'gray', | |
| 109 | + textcolor : 'gray' | |
| 110 | + }, | |
| 111 | + "vermelho" : { | |
| 112 | + fillcolor : 'gray', | |
| 113 | + linecolor : 'red', | |
| 114 | + linewidth : '1', | |
| 115 | + circcolor : 'pink', | |
| 116 | + textcolor : 'brown' | |
| 117 | + }, | |
| 118 | + "verde" : { | |
| 119 | + fillcolor : 'gray', | |
| 120 | + linecolor : 'green', | |
| 121 | + linewidth : '1', | |
| 122 | + circcolor : 'DarkGreen', | |
| 123 | + textcolor : 'GreenYellow' | |
| 124 | + } | |
| 84 | 125 | }, |
| 85 | - "vermelho" : { | |
| 86 | - fillcolor : '#E8ACAC', | |
| 87 | - linecolor : '#F50707', | |
| 88 | - linewidth : '1', | |
| 89 | - circcolor : '#F09EA6', | |
| 90 | - textcolor : '#787A78' | |
| 126 | + /** | |
| 127 | + * Propriedade: estiloPadrao | |
| 128 | + * | |
| 129 | + * Estilo utilizado como padrão | |
| 130 | + */ | |
| 131 | + estiloPadrao : "normal", | |
| 132 | + /** | |
| 133 | + * Cria uma caixa de seleção para escolha do estilo a ser utilizado | |
| 134 | + */ | |
| 135 | + caixaEstilos : function() { | |
| 136 | + var lista = i3GEO.util.listaChaves(i3GEO.desenho.estilos), n = lista.length, i, caixa, sel; | |
| 137 | + caixa = "<select onchange='i3GEO.desenho.definePadrao(this.value)'>"; | |
| 138 | + for (i = 0; i < n; i += 1) { | |
| 139 | + sel = ""; | |
| 140 | + if (lista[i] === i3GEO.desenho.estiloPadrao) { | |
| 141 | + sel = "select"; | |
| 142 | + } | |
| 143 | + caixa += "<option value='" + lista[i] + "'" + sel + ">" + lista[i] + "</option>"; | |
| 144 | + } | |
| 145 | + caixa += "</select>"; | |
| 146 | + return caixa; | |
| 91 | 147 | }, |
| 92 | - "verde" : { | |
| 93 | - fillcolor : '#3CCC2F', | |
| 94 | - linecolor : '#0C6642', | |
| 95 | - linewidth : '1', | |
| 96 | - circcolor : '#C7D9D2', | |
| 97 | - textcolor : '#787A78' | |
| 98 | - } | |
| 99 | - }, | |
| 100 | - // @TODO remover apos refatorar codigo | |
| 101 | - estilosOld : { | |
| 102 | - "normal" : { | |
| 103 | - fillcolor : 'red', | |
| 104 | - linecolor : 'black', | |
| 105 | - linewidth : '1', | |
| 106 | - circcolor : 'white', | |
| 107 | - textcolor : 'gray' | |
| 148 | + /** | |
| 149 | + * Function: addBox | |
| 150 | + * | |
| 151 | + * Adiciona um retangulo | |
| 152 | + * | |
| 153 | + * Parameter: | |
| 154 | + * | |
| 155 | + * {numeric} - novo xmin | |
| 156 | + * | |
| 157 | + * {numeric} - novo ymin | |
| 158 | + * | |
| 159 | + * {numeric} - novo xmax | |
| 160 | + * | |
| 161 | + * {numeric} - novo ymax | |
| 162 | + * | |
| 163 | + * {string} - namespace que identifica o elemento grafico, permitindo busca | |
| 164 | + * | |
| 165 | + * {string} - cor do contorno | |
| 166 | + * | |
| 167 | + * {string} - expessura do contorno | |
| 168 | + */ | |
| 169 | + addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { | |
| 170 | + if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 171 | + return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth); | |
| 172 | + } else { | |
| 173 | + return false; | |
| 174 | + } | |
| 108 | 175 | }, |
| 109 | - "palido" : { | |
| 110 | - fillcolor : 'gray', | |
| 111 | - linecolor : 'gray', | |
| 112 | - linewidth : '1', | |
| 113 | - circcolor : 'gray', | |
| 114 | - textcolor : 'gray' | |
| 176 | + /** | |
| 177 | + * Function: moveBox | |
| 178 | + * | |
| 179 | + * Reposiciona um retangulo | |
| 180 | + * | |
| 181 | + * Parameter: | |
| 182 | + * | |
| 183 | + * {object} - box | |
| 184 | + * | |
| 185 | + * {numeric} - novo xmin | |
| 186 | + * | |
| 187 | + * {numeric} - novo ymin | |
| 188 | + * | |
| 189 | + * {numeric} - novo xmax | |
| 190 | + * | |
| 191 | + * {numeric} - novo ymax | |
| 192 | + */ | |
| 193 | + moveBox : function(box, xmin, ymin, xmax, ymax) { | |
| 194 | + if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 195 | + return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox(box, xmin, ymin, xmax, ymax); | |
| 196 | + } else { | |
| 197 | + return false; | |
| 198 | + } | |
| 115 | 199 | }, |
| 116 | - "vermelho" : { | |
| 117 | - fillcolor : 'gray', | |
| 118 | - linecolor : 'red', | |
| 119 | - linewidth : '1', | |
| 120 | - circcolor : 'pink', | |
| 121 | - textcolor : 'brown' | |
| 200 | + /** | |
| 201 | + * Function: removeBox | |
| 202 | + * | |
| 203 | + * Remove box do mapa (apenas alias para removePins) | |
| 204 | + * | |
| 205 | + * Parameter: | |
| 206 | + * | |
| 207 | + * {string} - namespace que identifica o grupo de marcas que serao removidas | |
| 208 | + */ | |
| 209 | + removeBox : function(namespace) { | |
| 210 | + i3GEO.desenho.removePins(namespace); | |
| 122 | 211 | }, |
| 123 | - "verde" : { | |
| 124 | - fillcolor : 'gray', | |
| 125 | - linecolor : 'green', | |
| 126 | - linewidth : '1', | |
| 127 | - circcolor : 'DarkGreen', | |
| 128 | - textcolor : 'GreenYellow' | |
| 129 | - } | |
| 130 | - }, | |
| 131 | - /** | |
| 132 | - * Propriedade: estiloPadrao | |
| 133 | - * | |
| 134 | - * Estilo utilizado como padrão | |
| 135 | - */ | |
| 136 | - estiloPadrao : "normal", | |
| 137 | - /** | |
| 138 | - * Cria uma caixa de seleção para escolha do estilo a ser | |
| 139 | - * utilizado | |
| 140 | - */ | |
| 141 | - caixaEstilos : function() { | |
| 142 | - var lista = i3GEO.util.listaChaves(i3GEO.desenho.estilos), n = lista.length, i, caixa, sel; | |
| 143 | - caixa = "<select onchange='i3GEO.desenho.definePadrao(this.value)'>"; | |
| 144 | - for (i = 0; i < n; i += 1) { | |
| 145 | - sel = ""; | |
| 146 | - if (lista[i] === i3GEO.desenho.estiloPadrao) { | |
| 147 | - sel = "select"; | |
| 148 | - } | |
| 149 | - caixa += "<option value='" | |
| 150 | - + lista[i] | |
| 151 | - + "'" | |
| 152 | - + sel | |
| 153 | - + ">" | |
| 154 | - + lista[i] | |
| 155 | - + "</option>"; | |
| 156 | - } | |
| 157 | - caixa += "</select>"; | |
| 158 | - return caixa; | |
| 159 | - }, | |
| 160 | - /** | |
| 161 | - * Function: addBox | |
| 162 | - * | |
| 163 | - * Adiciona um retangulo | |
| 164 | - * | |
| 165 | - * Parameter: | |
| 166 | - * | |
| 167 | - * {numeric} - novo xmin | |
| 168 | - * | |
| 169 | - * {numeric} - novo ymin | |
| 170 | - * | |
| 171 | - * {numeric} - novo xmax | |
| 172 | - * | |
| 173 | - * {numeric} - novo ymax | |
| 174 | - * | |
| 175 | - * {string} - namespace que identifica o elemento grafico, permitindo busca | |
| 176 | - * | |
| 177 | - * {string} - cor do contorno | |
| 178 | - * | |
| 179 | - * {string} - expessura do contorno | |
| 180 | - */ | |
| 181 | - addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { | |
| 182 | - if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 183 | - return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox( | |
| 184 | - xmin, | |
| 185 | - ymin, | |
| 186 | - xmax, | |
| 187 | - ymax, | |
| 188 | - namespace, | |
| 189 | - strokeColor, | |
| 190 | - strokeWidth); | |
| 191 | - } else { | |
| 192 | - return false; | |
| 193 | - } | |
| 194 | - }, | |
| 195 | - /** | |
| 196 | - * Function: moveBox | |
| 197 | - * | |
| 198 | - * Reposiciona um retangulo | |
| 199 | - * | |
| 200 | - * Parameter: | |
| 201 | - * | |
| 202 | - * {object} - box | |
| 203 | - * | |
| 204 | - * {numeric} - novo xmin | |
| 205 | - * | |
| 206 | - * {numeric} - novo ymin | |
| 207 | - * | |
| 208 | - * {numeric} - novo xmax | |
| 209 | - * | |
| 210 | - * {numeric} - novo ymax | |
| 211 | - */ | |
| 212 | - moveBox : function(box, xmin, ymin, xmax, ymax) { | |
| 213 | - if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 214 | - return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox( | |
| 215 | - box, | |
| 216 | - xmin, | |
| 217 | - ymin, | |
| 218 | - xmax, | |
| 219 | - ymax); | |
| 220 | - } else { | |
| 221 | - return false; | |
| 222 | - } | |
| 223 | - }, | |
| 224 | - /** | |
| 225 | - * Function: removeBox | |
| 226 | - * | |
| 227 | - * Remove box do mapa (apenas alias para removePins) | |
| 228 | - * | |
| 229 | - * Parameter: | |
| 230 | - * | |
| 231 | - * {string} - namespace que identifica o grupo de marcas que serao removidas | |
| 232 | - */ | |
| 233 | - removeBox : function(namespace) { | |
| 234 | - i3GEO.desenho.removePins(namespace); | |
| 235 | - }, | |
| 236 | - /** | |
| 237 | - * Function: addPin | |
| 238 | - * | |
| 239 | - * Adiciona uma marca no mapa em uma determinada coordenada | |
| 240 | - * | |
| 241 | - * Parameters: | |
| 242 | - * | |
| 243 | - * {numeric} - longitude | |
| 244 | - * | |
| 245 | - * {numeric} - latitude | |
| 246 | - * | |
| 247 | - * {numeric} - largura da imagem | |
| 248 | - * | |
| 249 | - * {numeric} - altura da imagem | |
| 250 | - * | |
| 251 | - * {string} - namespace utilizado para agrupar a marca, permitindo sua | |
| 252 | - * remocao | |
| 253 | - * | |
| 254 | - * {boolean} - posiciona a marca no centro do ponto | |
| 255 | - * | |
| 256 | - * {function} - função disparada no evento onclick | |
| 257 | - * | |
| 258 | - * Return: | |
| 259 | - * | |
| 260 | - * {objeto} | |
| 261 | - * | |
| 262 | - */ | |
| 263 | - addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { | |
| 264 | - if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 265 | - return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin( | |
| 266 | - x, | |
| 267 | - y, | |
| 268 | - w, | |
| 269 | - h, | |
| 270 | - imagem, | |
| 271 | - namespace, | |
| 272 | - centro); | |
| 273 | - } else { | |
| 274 | - return false; | |
| 275 | - } | |
| 276 | - }, | |
| 277 | - /** | |
| 278 | - * Function: removePins | |
| 279 | - * | |
| 280 | - * Remove marcas do mapa | |
| 281 | - * | |
| 282 | - * Parameter: | |
| 283 | - * | |
| 284 | - * {string} - namespace que identifica o grupo de marcas que serao removidas | |
| 285 | - */ | |
| 286 | - removePins : function(namespace) { | |
| 287 | - if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 288 | - i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace); | |
| 289 | - } | |
| 290 | - }, | |
| 291 | - /** | |
| 292 | - * Function: movePin | |
| 293 | - * | |
| 294 | - * Reposiciona uma marca | |
| 295 | - * | |
| 296 | - * Parameter: | |
| 297 | - * | |
| 298 | - * {object} - marca | |
| 299 | - * | |
| 300 | - * {numeric} - novo x | |
| 301 | - * | |
| 302 | - * {numeric} - novo y | |
| 303 | - */ | |
| 304 | - movePin : function(pin, x, y) { | |
| 305 | - if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 306 | - i3GEO.desenho[i3GEO.Interface.ATUAL].movePin( | |
| 307 | - pin, | |
| 308 | - x, | |
| 309 | - y); | |
| 310 | - } | |
| 311 | - }, | |
| 312 | - /** | |
| 313 | - * Section: i3GEO.desenho.openlayers | |
| 314 | - * | |
| 315 | - * Funções utilizadas quando o mapa baseia-se na interface | |
| 316 | - * OpenLayers | |
| 317 | - */ | |
| 318 | - openlayers : { | |
| 319 | 212 | /** |
| 320 | - * Function: inicia | |
| 321 | - * | |
| 322 | - * Cria o layer onde os desenhos serao inseridos | |
| 213 | + * Function: addPin | |
| 214 | + * | |
| 215 | + * Adiciona uma marca no mapa em uma determinada coordenada | |
| 216 | + * | |
| 217 | + * Parameters: | |
| 218 | + * | |
| 219 | + * {numeric} - longitude | |
| 220 | + * | |
| 221 | + * {numeric} - latitude | |
| 222 | + * | |
| 223 | + * {numeric} - largura da imagem | |
| 224 | + * | |
| 225 | + * {numeric} - altura da imagem | |
| 226 | + * | |
| 227 | + * {string} - namespace utilizado para agrupar a marca, permitindo sua remocao | |
| 228 | + * | |
| 229 | + * {boolean} - posiciona a marca no centro do ponto | |
| 230 | + * | |
| 231 | + * {function} - função disparada no evento onclick | |
| 232 | + * | |
| 233 | + * Return: | |
| 234 | + * | |
| 235 | + * {objeto} | |
| 236 | + * | |
| 323 | 237 | */ |
| 324 | - inicia : function() { | |
| 325 | - if (!i3GEO.desenho.layergrafico) { | |
| 326 | - i3GEO.desenho.openlayers.criaLayerGrafico(); | |
| 238 | + addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { | |
| 239 | + if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 240 | + return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin(x, y, w, h, imagem, namespace, centro); | |
| 241 | + } else { | |
| 242 | + return false; | |
| 327 | 243 | } |
| 328 | 244 | }, |
| 329 | - addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { | |
| 330 | - var bounds, f; | |
| 331 | - if (!namespace) { | |
| 332 | - namespace = "box"; | |
| 333 | - } | |
| 334 | - if (!strokeColor) { | |
| 335 | - strokeColor = "#FF0000"; | |
| 245 | + /** | |
| 246 | + * Function: removePins | |
| 247 | + * | |
| 248 | + * Remove marcas do mapa | |
| 249 | + * | |
| 250 | + * Parameter: | |
| 251 | + * | |
| 252 | + * {string} - namespace que identifica o grupo de marcas que serao removidas | |
| 253 | + */ | |
| 254 | + removePins : function(namespace) { | |
| 255 | + if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 256 | + i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace); | |
| 336 | 257 | } |
| 337 | - if (!strokeWidth) { | |
| 338 | - strokeWidth = 2; | |
| 258 | + }, | |
| 259 | + /** | |
| 260 | + * Function: movePin | |
| 261 | + * | |
| 262 | + * Reposiciona uma marca | |
| 263 | + * | |
| 264 | + * Parameter: | |
| 265 | + * | |
| 266 | + * {object} - marca | |
| 267 | + * | |
| 268 | + * {numeric} - novo x | |
| 269 | + * | |
| 270 | + * {numeric} - novo y | |
| 271 | + */ | |
| 272 | + movePin : function(pin, x, y) { | |
| 273 | + if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 274 | + i3GEO.desenho[i3GEO.Interface.ATUAL].movePin(pin, x, y); | |
| 339 | 275 | } |
| 340 | - i3GEO.desenho.openlayers.inicia(); | |
| 341 | - bounds = OpenLayers.Bounds.fromArray([ | |
| 342 | - xmin, | |
| 343 | - ymin, | |
| 344 | - xmax, | |
| 345 | - ymax | |
| 346 | - ]); | |
| 347 | - bounds = bounds.toGeometry(); | |
| 348 | - bounds = i3GEO.util.extGeo2OSM(bounds); | |
| 349 | - f = new OpenLayers.Feature.Vector( | |
| 350 | - bounds, { | |
| 276 | + }, | |
| 277 | + /** | |
| 278 | + * Section: i3GEO.desenho.openlayers | |
| 279 | + * | |
| 280 | + * Funções utilizadas quando o mapa baseia-se na interface OpenLayers | |
| 281 | + */ | |
| 282 | + openlayers : { | |
| 283 | + /** | |
| 284 | + * Function: inicia | |
| 285 | + * | |
| 286 | + * Cria o layer onde os desenhos serao inseridos | |
| 287 | + */ | |
| 288 | + inicia : function() { | |
| 289 | + if (!i3GEO.desenho.layergrafico) { | |
| 290 | + i3GEO.desenho.openlayers.criaLayerGrafico(); | |
| 291 | + } | |
| 292 | + }, | |
| 293 | + addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { | |
| 294 | + var bounds, f; | |
| 295 | + if (!namespace) { | |
| 296 | + namespace = "box"; | |
| 297 | + } | |
| 298 | + if (!strokeColor) { | |
| 299 | + strokeColor = "#FF0000"; | |
| 300 | + } | |
| 301 | + if (!strokeWidth) { | |
| 302 | + strokeWidth = 2; | |
| 303 | + } | |
| 304 | + i3GEO.desenho.openlayers.inicia(); | |
| 305 | + bounds = OpenLayers.Bounds.fromArray([ | |
| 306 | + xmin, ymin, xmax, ymax | |
| 307 | + ]); | |
| 308 | + bounds = bounds.toGeometry(); | |
| 309 | + bounds = i3GEO.util.extGeo2OSM(bounds); | |
| 310 | + f = new OpenLayers.Feature.Vector(bounds, { | |
| 351 | 311 | origem : namespace |
| 352 | 312 | }, { |
| 353 | 313 | fill : false, |
| 354 | 314 | strokeColor : strokeColor, |
| 355 | 315 | strokeWidth : strokeWidth |
| 356 | 316 | }); |
| 357 | - i3GEO.desenho.layergrafico.addFeatures([ | |
| 358 | - f | |
| 359 | - ]); | |
| 360 | - return f; | |
| 361 | - }, | |
| 362 | - moveBox : function(box, xmin, ymin, xmax, ymax) { | |
| 363 | - i3GEO.desenho.layergrafico.removeFeatures(box); | |
| 364 | - var namespace = box["attributes"].origem, strokeWidth = box["style"].strokeWidth, strokeColor = box["style"].strokeColor; | |
| 365 | - box = i3GEO.desenho.addBox( | |
| 366 | - xmin, | |
| 367 | - ymin, | |
| 368 | - xmax, | |
| 369 | - ymax, | |
| 370 | - namespace, | |
| 371 | - strokeColor, | |
| 372 | - strokeWidth); | |
| 373 | - return box; | |
| 374 | - }, | |
| 375 | - addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { | |
| 376 | - return; | |
| 377 | - if (!imagem | |
| 378 | - || imagem === "") { | |
| 379 | - imagem = i3GEO.configura.locaplic | |
| 380 | - + "/imagens/google/confluence.png"; | |
| 381 | - } | |
| 382 | - if (!namespace) { | |
| 383 | - namespace = "pin"; | |
| 384 | - } | |
| 385 | - if (!w | |
| 386 | - || w === "") { | |
| 387 | - w = 27; | |
| 388 | - } | |
| 389 | - if (!h | |
| 390 | - || h === "") { | |
| 391 | - h = 27; | |
| 392 | - } | |
| 393 | - if (!funcaoclick) { | |
| 394 | - funcaoclick = function() { | |
| 395 | - i3GEO.desenho.openlayers.removePins(namespace); | |
| 396 | - }; | |
| 397 | - } | |
| 398 | - if (!centro) { | |
| 399 | - centro = false; | |
| 400 | - } | |
| 401 | - i3GEO.desenho.openlayers.inicia(); | |
| 402 | - var point, f, ox, oy; | |
| 403 | - if (centro === true) { | |
| 404 | - ox = parseInt( | |
| 405 | - w / 2, | |
| 406 | - 10) | |
| 407 | - * -1; | |
| 408 | - oy = parseInt( | |
| 409 | - h / 2, | |
| 410 | - 10) | |
| 411 | - * -1; | |
| 412 | - } else { | |
| 413 | - ox = parseInt( | |
| 414 | - w / 2, | |
| 415 | - 10) | |
| 416 | - * -1; | |
| 417 | - oy = h | |
| 418 | - * -1; | |
| 419 | - } | |
| 420 | - point = new OpenLayers.Geometry.Point( | |
| 421 | - x, y); | |
| 422 | - point = i3GEO.util.extGeo2OSM(point); | |
| 423 | - f = new OpenLayers.Feature.Vector( | |
| 424 | - point, { | |
| 317 | + i3GEO.desenho.layergrafico.addFeatures([ | |
| 318 | + f | |
| 319 | + ]); | |
| 320 | + return f; | |
| 321 | + }, | |
| 322 | + moveBox : function(box, xmin, ymin, xmax, ymax) { | |
| 323 | + i3GEO.desenho.layergrafico.removeFeatures(box); | |
| 324 | + var namespace = box["attributes"].origem, strokeWidth = box["style"].strokeWidth, strokeColor = box["style"].strokeColor; | |
| 325 | + box = i3GEO.desenho.addBox(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth); | |
| 326 | + return box; | |
| 327 | + }, | |
| 328 | + addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { | |
| 329 | + return; | |
| 330 | + if (!imagem || imagem === "") { | |
| 331 | + imagem = i3GEO.configura.locaplic + "/imagens/google/confluence.png"; | |
| 332 | + } | |
| 333 | + if (!namespace) { | |
| 334 | + namespace = "pin"; | |
| 335 | + } | |
| 336 | + if (!w || w === "") { | |
| 337 | + w = 27; | |
| 338 | + } | |
| 339 | + if (!h || h === "") { | |
| 340 | + h = 27; | |
| 341 | + } | |
| 342 | + if (!funcaoclick) { | |
| 343 | + funcaoclick = function() { | |
| 344 | + i3GEO.desenho.openlayers.removePins(namespace); | |
| 345 | + }; | |
| 346 | + } | |
| 347 | + if (!centro) { | |
| 348 | + centro = false; | |
| 349 | + } | |
| 350 | + i3GEO.desenho.openlayers.inicia(); | |
| 351 | + var point, f, ox, oy; | |
| 352 | + if (centro === true) { | |
| 353 | + ox = parseInt(w / 2, 10) * -1; | |
| 354 | + oy = parseInt(h / 2, 10) * -1; | |
| 355 | + } else { | |
| 356 | + ox = parseInt(w / 2, 10) * -1; | |
| 357 | + oy = h * -1; | |
| 358 | + } | |
| 359 | + point = new OpenLayers.Geometry.Point(x, y); | |
| 360 | + point = i3GEO.util.extGeo2OSM(point); | |
| 361 | + f = new OpenLayers.Feature.Vector(point, { | |
| 425 | 362 | origem : namespace, |
| 426 | 363 | click : funcaoclick |
| 427 | 364 | }, { |
| ... | ... | @@ -431,70 +368,85 @@ i3GEO.desenho = { |
| 431 | 368 | graphicYOffset : oy, |
| 432 | 369 | externalGraphic : imagem |
| 433 | 370 | }); |
| 434 | - i3GEO.desenho.layergrafico.addFeatures([ | |
| 435 | - f | |
| 436 | - ]); | |
| 437 | - return f; | |
| 438 | - }, | |
| 439 | - removePins : function(namespace) { | |
| 440 | - return; | |
| 441 | - if (!namespace) { | |
| 442 | - namespace = "pin"; | |
| 443 | - } | |
| 444 | - if (i3GEO.desenho.layergrafico) { | |
| 445 | - var f = i3GEO.desenho.layergrafico.getFeaturesByAttribute( | |
| 446 | - "origem", | |
| 447 | - namespace); | |
| 448 | - if (f | |
| 449 | - && f.length > 0) { | |
| 450 | - i3GEO.desenho.layergrafico.destroyFeatures(f); | |
| 371 | + i3GEO.desenho.layergrafico.addFeatures([ | |
| 372 | + f | |
| 373 | + ]); | |
| 374 | + return f; | |
| 375 | + }, | |
| 376 | + removePins : function(namespace) { | |
| 377 | + return; | |
| 378 | + if (!namespace) { | |
| 379 | + namespace = "pin"; | |
| 451 | 380 | } |
| 452 | - } | |
| 453 | - }, | |
| 454 | - movePin : function(pin, x, y) { | |
| 455 | - return; | |
| 456 | - var point = new OpenLayers.LonLat( | |
| 457 | - x, y); | |
| 458 | - point = i3GEO.util.extGeo2OSM(point); | |
| 459 | - pin.move(point); | |
| 460 | - }, | |
| 461 | - criaLayerGrafico : function() { | |
| 462 | - return; | |
| 463 | - if (!i3GEO.desenho.layergrafico) { | |
| 464 | - var sketchSymbolizers = { | |
| 465 | - "Point" : { | |
| 466 | - fillColor : "rgb(${fillColor})", | |
| 467 | - fillOpacity : "${opacidade}", | |
| 468 | - strokeWidth : "${strokeWidth}", | |
| 469 | - strokeOpacity : "${opacidade}", | |
| 470 | - strokeColor : "rgb(${strokeColor})", | |
| 471 | - label : "${texto}", | |
| 472 | - pointRadius : "${pointRadius}", | |
| 473 | - graphicName : "${graphicName}", | |
| 474 | - fontSize : "${fontSize}", | |
| 475 | - fontColor : "rgb(${fontColor})", | |
| 476 | - fontFamily : "Arial", | |
| 477 | - fontWeight : "normal", | |
| 478 | - labelAlign : "lb", | |
| 479 | - labelXOffset : "3", | |
| 480 | - labelYOffset : "3", | |
| 481 | - externalGraphic : "${externalGraphic}" | |
| 482 | - }, | |
| 483 | - "Line" : { | |
| 484 | - strokeWidth : "${strokeWidth}", | |
| 485 | - strokeOpacity : "${opacidade}", | |
| 486 | - strokeColor : "rgb(${strokeColor})" | |
| 487 | - }, | |
| 488 | - "Polygon" : { | |
| 489 | - strokeWidth : "${strokeWidth}", | |
| 490 | - strokeOpacity : "${opacidade}", | |
| 491 | - strokeColor : "rgb(${strokeColor})", | |
| 492 | - fillColor : "rgb(${fillColor})", | |
| 493 | - fillOpacity : "${opacidade}", | |
| 494 | - zIndex : 5000 | |
| 381 | + if (i3GEO.desenho.layergrafico) { | |
| 382 | + var f = i3GEO.desenho.layergrafico.getFeaturesByAttribute("origem", namespace); | |
| 383 | + if (f && f.length > 0) { | |
| 384 | + i3GEO.desenho.layergrafico.destroyFeatures(f); | |
| 495 | 385 | } |
| 496 | - }, style = new OpenLayers.Style(), styleMap1 = new OpenLayers.StyleMap( | |
| 497 | - { | |
| 386 | + } | |
| 387 | + }, | |
| 388 | + movePin : function(pin, x, y) { | |
| 389 | + return; | |
| 390 | + var point = new OpenLayers.LonLat(x, y); | |
| 391 | + point = i3GEO.util.extGeo2OSM(point); | |
| 392 | + pin.move(point); | |
| 393 | + }, | |
| 394 | + criaLayerGrafico : function() { | |
| 395 | + if (!i3GEO.desenho.layergrafico) { | |
| 396 | + i3GEO.desenho.layergrafico = new ol.FeatureOverlay({ | |
| 397 | + style : new ol.style.Style({ | |
| 398 | + fill : new ol.style.Fill({ | |
| 399 | + color : 'rgba(255, 255, 255, 0.2)' | |
| 400 | + }), | |
| 401 | + stroke : new ol.style.Stroke({ | |
| 402 | + color : '#ffcc33', | |
| 403 | + width : 2 | |
| 404 | + }), | |
| 405 | + image : new ol.style.Circle({ | |
| 406 | + radius : 7, | |
| 407 | + fill : new ol.style.Fill({ | |
| 408 | + color : '#ffcc33' | |
| 409 | + }) | |
| 410 | + }) | |
| 411 | + }) | |
| 412 | + }); | |
| 413 | + i3GEO.desenho.layergrafico.setMap(i3geoOL); | |
| 414 | + } | |
| 415 | + return; | |
| 416 | + if (!i3GEO.desenho.layergrafico) { | |
| 417 | + var sketchSymbolizers = { | |
| 418 | + "Point" : { | |
| 419 | + fillColor : "rgb(${fillColor})", | |
| 420 | + fillOpacity : "${opacidade}", | |
| 421 | + strokeWidth : "${strokeWidth}", | |
| 422 | + strokeOpacity : "${opacidade}", | |
| 423 | + strokeColor : "rgb(${strokeColor})", | |
| 424 | + label : "${texto}", | |
| 425 | + pointRadius : "${pointRadius}", | |
| 426 | + graphicName : "${graphicName}", | |
| 427 | + fontSize : "${fontSize}", | |
| 428 | + fontColor : "rgb(${fontColor})", | |
| 429 | + fontFamily : "Arial", | |
| 430 | + fontWeight : "normal", | |
| 431 | + labelAlign : "lb", | |
| 432 | + labelXOffset : "3", | |
| 433 | + labelYOffset : "3", | |
| 434 | + externalGraphic : "${externalGraphic}" | |
| 435 | + }, | |
| 436 | + "Line" : { | |
| 437 | + strokeWidth : "${strokeWidth}", | |
| 438 | + strokeOpacity : "${opacidade}", | |
| 439 | + strokeColor : "rgb(${strokeColor})" | |
| 440 | + }, | |
| 441 | + "Polygon" : { | |
| 442 | + strokeWidth : "${strokeWidth}", | |
| 443 | + strokeOpacity : "${opacidade}", | |
| 444 | + strokeColor : "rgb(${strokeColor})", | |
| 445 | + fillColor : "rgb(${fillColor})", | |
| 446 | + fillOpacity : "${opacidade}", | |
| 447 | + zIndex : 5000 | |
| 448 | + } | |
| 449 | + }, style = new OpenLayers.Style(), styleMap1 = new OpenLayers.StyleMap({ | |
| 498 | 450 | "default" : style, |
| 499 | 451 | "vertex" : { |
| 500 | 452 | strokeOpacity : 1, |
| ... | ... | @@ -506,14 +458,12 @@ i3GEO.desenho = { |
| 506 | 458 | }, { |
| 507 | 459 | extendDefault : false |
| 508 | 460 | }); |
| 509 | - style.addRules([ | |
| 510 | - new OpenLayers.Rule( | |
| 511 | - { | |
| 461 | + style.addRules([ | |
| 462 | + new OpenLayers.Rule({ | |
| 512 | 463 | symbolizer : sketchSymbolizers |
| 513 | 464 | }) |
| 514 | - ]); | |
| 515 | - i3GEO.desenho.layergrafico = new OpenLayers.Layer.Vector( | |
| 516 | - "Graf", { | |
| 465 | + ]); | |
| 466 | + i3GEO.desenho.layergrafico = new OpenLayers.Layer.Vector("Graf", { | |
| 517 | 467 | styleMap : styleMap1, |
| 518 | 468 | displayInLayerSwitcher : true, |
| 519 | 469 | visibility : true, |
| ... | ... | @@ -529,292 +479,238 @@ i3GEO.desenho = { |
| 529 | 479 | } |
| 530 | 480 | } |
| 531 | 481 | }); |
| 532 | - // para efeitos de compatibilidade | |
| 533 | - if (i3GEO.editorOL | |
| 534 | - && i3GEO.editorOL.mapa) { | |
| 535 | - i3GEO.editorOL.mapa.addLayers([ | |
| 536 | - i3GEO.desenho.layergrafico | |
| 537 | - ]); | |
| 538 | - } else { | |
| 539 | - i3geoOL.addLayers([ | |
| 540 | - i3GEO.desenho.layergrafico | |
| 541 | - ]); | |
| 482 | + // para efeitos de compatibilidade | |
| 483 | + if (i3GEO.editorOL && i3GEO.editorOL.mapa) { | |
| 484 | + i3GEO.editorOL.mapa.addLayers([ | |
| 485 | + i3GEO.desenho.layergrafico | |
| 486 | + ]); | |
| 487 | + } else { | |
| 488 | + i3geoOL.addLayers([ | |
| 489 | + i3GEO.desenho.layergrafico | |
| 490 | + ]); | |
| 491 | + } | |
| 542 | 492 | } |
| 543 | 493 | } |
| 544 | - } | |
| 545 | - }, | |
| 546 | - /** | |
| 547 | - * Section: i3GEO.desenho.googlemaps | |
| 548 | - * | |
| 549 | - * Funções utilizadas quando o mapa baseia-se na interface | |
| 550 | - * GoogleMaps | |
| 551 | - */ | |
| 552 | - googlemaps : { | |
| 494 | + }, | |
| 553 | 495 | /** |
| 554 | - * Variavel: shapes | |
| 555 | - * | |
| 556 | - * Array que guarda todos os objetos que estao atualmente no mapa E | |
| 557 | - * atualizado toda vez que uma figura e acrescentada ou removida | |
| 496 | + * Section: i3GEO.desenho.googlemaps | |
| 497 | + * | |
| 498 | + * Funções utilizadas quando o mapa baseia-se na interface GoogleMaps | |
| 558 | 499 | */ |
| 559 | - shapes : [], | |
| 560 | - inicia : function() { | |
| 561 | - }, | |
| 562 | - addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { | |
| 563 | - var f; | |
| 564 | - if (!namespace) { | |
| 565 | - namespace = "box"; | |
| 566 | - } | |
| 567 | - if (!strokeColor) { | |
| 568 | - strokeColor = "#FF0000"; | |
| 569 | - } | |
| 570 | - if (!strokeWidth) { | |
| 571 | - strokeWidth = 2; | |
| 572 | - } | |
| 573 | - i3GEO.desenho.googlemaps.inicia(); | |
| 574 | - f = new google.maps.Rectangle( | |
| 575 | - { | |
| 500 | + googlemaps : { | |
| 501 | + /** | |
| 502 | + * Variavel: shapes | |
| 503 | + * | |
| 504 | + * Array que guarda todos os objetos que estao atualmente no mapa E atualizado toda vez que uma figura e acrescentada ou | |
| 505 | + * removida | |
| 506 | + */ | |
| 507 | + shapes : [], | |
| 508 | + inicia : function() { | |
| 509 | + }, | |
| 510 | + addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { | |
| 511 | + var f; | |
| 512 | + if (!namespace) { | |
| 513 | + namespace = "box"; | |
| 514 | + } | |
| 515 | + if (!strokeColor) { | |
| 516 | + strokeColor = "#FF0000"; | |
| 517 | + } | |
| 518 | + if (!strokeWidth) { | |
| 519 | + strokeWidth = 2; | |
| 520 | + } | |
| 521 | + i3GEO.desenho.googlemaps.inicia(); | |
| 522 | + f = new google.maps.Rectangle({ | |
| 576 | 523 | origem : namespace, |
| 577 | 524 | strokeColor : strokeColor, |
| 578 | 525 | strokeWeight : strokeWidth, |
| 579 | - fillOpacity: 0, | |
| 526 | + fillOpacity : 0, | |
| 580 | 527 | map : i3GeoMap, |
| 581 | - bounds : new google.maps.LatLngBounds( | |
| 582 | - new google.maps.LatLng( | |
| 583 | - ymin, xmin), new google.maps.LatLng( | |
| 584 | - ymax, xmax)) | |
| 528 | + bounds : new google.maps.LatLngBounds(new google.maps.LatLng(ymin, xmin), new google.maps.LatLng(ymax, xmax)) | |
| 585 | 529 | }); |
| 586 | - i3GEO.desenho.googlemaps.shapes.push(f); | |
| 587 | - return f; | |
| 588 | - }, | |
| 589 | - moveBox : function(box, xmin, ymin, xmax, ymax) { | |
| 590 | - box.setBounds(new google.maps.LatLngBounds( | |
| 591 | - new google.maps.LatLng( | |
| 592 | - ymin, xmin), new google.maps.LatLng( | |
| 593 | - ymax, xmax))); | |
| 594 | - return box; | |
| 595 | - }, | |
| 596 | - addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { | |
| 597 | - if (!imagem | |
| 598 | - || imagem === "") { | |
| 599 | - imagem = i3GEO.configura.locaplic | |
| 600 | - + "/imagens/google/confluence.png"; | |
| 601 | - } | |
| 602 | - if (!namespace) { | |
| 603 | - namespace = "pin"; | |
| 604 | - } | |
| 605 | - if (!w | |
| 606 | - || w === "") { | |
| 607 | - w = 27; | |
| 608 | - } | |
| 609 | - if (!h | |
| 610 | - || h === "") { | |
| 611 | - h = 27; | |
| 612 | - } | |
| 613 | - if (!funcaoclick) { | |
| 614 | - funcaoclick = function() { | |
| 615 | - i3GEO.desenho.googlemaps.removePins(namespace); | |
| 616 | - }; | |
| 617 | - } | |
| 618 | - if (!centro) { | |
| 619 | - centro = false; | |
| 620 | - } | |
| 621 | - i3GEO.desenho.googlemaps.inicia(); | |
| 622 | - var point, f, icon; | |
| 623 | - if (centro === false) { | |
| 624 | - icon = { | |
| 625 | - url : imagem, | |
| 626 | - size : new google.maps.Size( | |
| 627 | - w, h) | |
| 628 | - }; | |
| 629 | - } else { | |
| 630 | - icon = { | |
| 631 | - url : imagem, | |
| 632 | - size : new google.maps.Size( | |
| 633 | - w, h), | |
| 634 | - origin : new google.maps.Point( | |
| 635 | - 0, 0), | |
| 636 | - anchor : new google.maps.Point( | |
| 637 | - w / 2, h / 2) | |
| 638 | - }; | |
| 639 | - } | |
| 640 | - point = new google.maps.LatLng( | |
| 641 | - y, x); | |
| 530 | + i3GEO.desenho.googlemaps.shapes.push(f); | |
| 531 | + return f; | |
| 532 | + }, | |
| 533 | + moveBox : function(box, xmin, ymin, xmax, ymax) { | |
| 534 | + box.setBounds(new google.maps.LatLngBounds(new google.maps.LatLng(ymin, xmin), new google.maps.LatLng(ymax, xmax))); | |
| 535 | + return box; | |
| 536 | + }, | |
| 537 | + addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { | |
| 538 | + if (!imagem || imagem === "") { | |
| 539 | + imagem = i3GEO.configura.locaplic + "/imagens/google/confluence.png"; | |
| 540 | + } | |
| 541 | + if (!namespace) { | |
| 542 | + namespace = "pin"; | |
| 543 | + } | |
| 544 | + if (!w || w === "") { | |
| 545 | + w = 27; | |
| 546 | + } | |
| 547 | + if (!h || h === "") { | |
| 548 | + h = 27; | |
| 549 | + } | |
| 550 | + if (!funcaoclick) { | |
| 551 | + funcaoclick = function() { | |
| 552 | + i3GEO.desenho.googlemaps.removePins(namespace); | |
| 553 | + }; | |
| 554 | + } | |
| 555 | + if (!centro) { | |
| 556 | + centro = false; | |
| 557 | + } | |
| 558 | + i3GEO.desenho.googlemaps.inicia(); | |
| 559 | + var point, f, icon; | |
| 560 | + if (centro === false) { | |
| 561 | + icon = { | |
| 562 | + url : imagem, | |
| 563 | + size : new google.maps.Size(w, h) | |
| 564 | + }; | |
| 565 | + } else { | |
| 566 | + icon = { | |
| 567 | + url : imagem, | |
| 568 | + size : new google.maps.Size(w, h), | |
| 569 | + origin : new google.maps.Point(0, 0), | |
| 570 | + anchor : new google.maps.Point(w / 2, h / 2) | |
| 571 | + }; | |
| 572 | + } | |
| 573 | + point = new google.maps.LatLng(y, x); | |
| 642 | 574 | |
| 643 | - f = new google.maps.Marker( | |
| 644 | - { | |
| 575 | + f = new google.maps.Marker({ | |
| 645 | 576 | position : point, |
| 646 | 577 | map : i3GeoMap, |
| 647 | 578 | origem : namespace, |
| 648 | 579 | icon : icon |
| 649 | 580 | }); |
| 650 | - i3GEO.desenho.googlemaps.shapes.push(f); | |
| 651 | - return f; | |
| 652 | - }, | |
| 653 | - removePins : function(namespace) { | |
| 654 | - if (!namespace) { | |
| 655 | - namespace = "pin"; | |
| 656 | - } | |
| 657 | - var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute( | |
| 658 | - "origem", | |
| 659 | - namespace); | |
| 660 | - if (f | |
| 661 | - && f.length > 0) { | |
| 662 | - i3GEO.desenho.googlemaps.destroyFeatures(f); | |
| 663 | - } | |
| 664 | - }, | |
| 665 | - movePin : function(pin, x, y) { | |
| 666 | - var point = new google.maps.LatLng( | |
| 667 | - y, x); | |
| 668 | - pin.setPosition(point); | |
| 669 | - }, | |
| 670 | - /** | |
| 671 | - * Function: getFeaturesByAttribute | |
| 672 | - * | |
| 673 | - * Obtém uma figura com base em um atributo | |
| 674 | - * | |
| 675 | - * {string} | |
| 676 | - * | |
| 677 | - * {string} | |
| 678 | - */ | |
| 679 | - getFeaturesByAttribute : function(atributo, valor) { | |
| 680 | - var i, s = [], n = i3GEO.desenho.googlemaps.shapes.length; | |
| 681 | - for (i = 0; i < n; i++) { | |
| 682 | - if (i3GEO.desenho.googlemaps.shapes[i] | |
| 683 | - && i3GEO.desenho.googlemaps.shapes[i] != "") { | |
| 684 | - if (i3GEO.desenho.googlemaps.shapes[i][atributo] == valor) { | |
| 685 | - s.push(i3GEO.desenho.googlemaps.shapes[i]); | |
| 581 | + i3GEO.desenho.googlemaps.shapes.push(f); | |
| 582 | + return f; | |
| 583 | + }, | |
| 584 | + removePins : function(namespace) { | |
| 585 | + if (!namespace) { | |
| 586 | + namespace = "pin"; | |
| 587 | + } | |
| 588 | + var f = i3GEO.desenho.googlemaps.getFeaturesByAttribute("origem", namespace); | |
| 589 | + if (f && f.length > 0) { | |
| 590 | + i3GEO.desenho.googlemaps.destroyFeatures(f); | |
| 591 | + } | |
| 592 | + }, | |
| 593 | + movePin : function(pin, x, y) { | |
| 594 | + var point = new google.maps.LatLng(y, x); | |
| 595 | + pin.setPosition(point); | |
| 596 | + }, | |
| 597 | + /** | |
| 598 | + * Function: getFeaturesByAttribute | |
| 599 | + * | |
| 600 | + * Obtém uma figura com base em um atributo | |
| 601 | + * | |
| 602 | + * {string} | |
| 603 | + * | |
| 604 | + * {string} | |
| 605 | + */ | |
| 606 | + getFeaturesByAttribute : function(atributo, valor) { | |
| 607 | + var i, s = [], n = i3GEO.desenho.googlemaps.shapes.length; | |
| 608 | + for (i = 0; i < n; i++) { | |
| 609 | + if (i3GEO.desenho.googlemaps.shapes[i] && i3GEO.desenho.googlemaps.shapes[i] != "") { | |
| 610 | + if (i3GEO.desenho.googlemaps.shapes[i][atributo] == valor) { | |
| 611 | + s.push(i3GEO.desenho.googlemaps.shapes[i]); | |
| 612 | + } | |
| 613 | + } | |
| 614 | + } | |
| 615 | + return s; | |
| 616 | + }, | |
| 617 | + /** | |
| 618 | + * Function: destroyFeatures | |
| 619 | + * | |
| 620 | + * Destroi as figuras | |
| 621 | + * | |
| 622 | + * {array} - lista de objetos | |
| 623 | + */ | |
| 624 | + destroyFeatures : function(f) { | |
| 625 | + if (f) { | |
| 626 | + var i, n = f.length; | |
| 627 | + for (i = 0; i < n; i++) { | |
| 628 | + f[i].setMap(null); | |
| 629 | + f[i] = ""; | |
| 686 | 630 | } |
| 687 | 631 | } |
| 688 | 632 | } |
| 689 | - return s; | |
| 690 | 633 | }, |
| 691 | 634 | /** |
| 692 | - * Function: destroyFeatures | |
| 693 | - * | |
| 694 | - * Destroi as figuras | |
| 695 | - * | |
| 696 | - * {array} - lista de objetos | |
| 635 | + * Section: i3GEO.desenho.googleearth | |
| 636 | + * | |
| 637 | + * Funções utilizadas quando o mapa baseia-se na interface GoogleEarth | |
| 697 | 638 | */ |
| 698 | - destroyFeatures : function(f) { | |
| 699 | - if (f) { | |
| 700 | - var i, n = f.length; | |
| 701 | - for (i = 0; i < n; i++) { | |
| 702 | - f[i].setMap(null); | |
| 703 | - f[i] = ""; | |
| 704 | - } | |
| 705 | - } | |
| 706 | - } | |
| 707 | - }, | |
| 708 | - /** | |
| 709 | - * Section: i3GEO.desenho.googleearth | |
| 710 | - * | |
| 711 | - * Funções utilizadas quando o mapa baseia-se na interface | |
| 712 | - * GoogleEarth | |
| 713 | - */ | |
| 714 | - googleearth : { | |
| 715 | - insereMarca : function(description, ddx, ddy, name, snippet) { | |
| 716 | - if (typeof (console) !== 'undefined') | |
| 717 | - console.info("i3GEO.Interface.googleearth.insereMarca()"); | |
| 639 | + googleearth : { | |
| 640 | + insereMarca : function(description, ddx, ddy, name, snippet) { | |
| 641 | + if (typeof (console) !== 'undefined') | |
| 642 | + console.info("i3GEO.Interface.googleearth.insereMarca()"); | |
| 718 | 643 | |
| 719 | - var placemark = i3GeoMap.createPlacemark(''), point = i3GeoMap.createPoint(''); | |
| 720 | - placemark.setName(name); | |
| 721 | - point.setLatitude(ddy); | |
| 722 | - point.setLongitude(ddx); | |
| 723 | - placemark.setGeometry(point); | |
| 724 | - if (description !== "") { | |
| 725 | - placemark.setDescription(description); | |
| 726 | - } | |
| 727 | - placemark.setSnippet(snippet); | |
| 728 | - i3GeoMap.getFeatures().appendChild( | |
| 729 | - placemark); | |
| 730 | - }, | |
| 731 | - // | |
| 732 | - // código obtido em | |
| 733 | - // http://code.google.com/intl/pt-BR/apis/earth/documentation/geometries.html | |
| 734 | - // | |
| 735 | - insereCirculo : function(centerLng, centerLat, radius, name, snippet) { | |
| 736 | - function makeCircle(centerLat, centerLng, radius) { | |
| 737 | - var ring = i3GeoMap.createLinearRing(''), steps = 25, i, pi2 = Math.PI * 2, lat, lng; | |
| 738 | - for (i = 0; i < steps; i++) { | |
| 739 | - lat = centerLat | |
| 740 | - + radius | |
| 741 | - * Math.cos(i | |
| 742 | - / steps | |
| 743 | - * pi2); | |
| 744 | - lng = centerLng | |
| 745 | - + radius | |
| 746 | - * Math.sin(i | |
| 747 | - / steps | |
| 748 | - * pi2); | |
| 749 | - ring.getCoordinates().pushLatLngAlt( | |
| 750 | - lat, | |
| 751 | - lng, | |
| 752 | - 0); | |
| 753 | - } | |
| 754 | - return ring; | |
| 755 | - } | |
| 756 | - var polygonPlacemark = i3GeoMap.createPlacemark(''), poly = i3GeoMap.createPolygon(''), polyStyle; | |
| 757 | - poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); | |
| 758 | - polygonPlacemark.setGeometry(poly); | |
| 759 | - polygonPlacemark.getGeometry().setOuterBoundary( | |
| 760 | - makeCircle( | |
| 761 | - centerLat, | |
| 762 | - centerLng, | |
| 763 | - radius)); | |
| 764 | - polygonPlacemark.setName(name); | |
| 765 | - polygonPlacemark.setSnippet(snippet); | |
| 766 | - polygonPlacemark.setStyleSelector(i3GeoMap.createStyle('')); | |
| 767 | - polyStyle = polygonPlacemark.getStyleSelector().getPolyStyle(); | |
| 768 | - polyStyle.setFill(0); | |
| 769 | - i3GeoMap.getFeatures().appendChild( | |
| 770 | - polygonPlacemark); | |
| 771 | - }, | |
| 772 | - insereLinha : function(xi, yi, xf, yf, name, snippet) { | |
| 773 | - var lineStringPlacemark = i3GeoMap.createPlacemark(''), lineString, lineStyle; | |
| 774 | - lineStringPlacemark.setName(name); | |
| 775 | - lineString = i3GeoMap.createLineString(''); | |
| 776 | - lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); | |
| 777 | - lineStringPlacemark.setGeometry(lineString); | |
| 778 | - lineString.getCoordinates().pushLatLngAlt( | |
| 779 | - yi, | |
| 780 | - xi, | |
| 781 | - 0); | |
| 782 | - lineString.getCoordinates().pushLatLngAlt( | |
| 783 | - yf, | |
| 784 | - xf, | |
| 785 | - 0); | |
| 644 | + var placemark = i3GeoMap.createPlacemark(''), point = i3GeoMap.createPoint(''); | |
| 645 | + placemark.setName(name); | |
| 646 | + point.setLatitude(ddy); | |
| 647 | + point.setLongitude(ddx); | |
| 648 | + placemark.setGeometry(point); | |
| 649 | + if (description !== "") { | |
| 650 | + placemark.setDescription(description); | |
| 651 | + } | |
| 652 | + placemark.setSnippet(snippet); | |
| 653 | + i3GeoMap.getFeatures().appendChild(placemark); | |
| 654 | + }, | |
| 655 | + // | |
| 656 | + // código obtido em | |
| 657 | + // http://code.google.com/intl/pt-BR/apis/earth/documentation/geometries.html | |
| 658 | + // | |
| 659 | + insereCirculo : function(centerLng, centerLat, radius, name, snippet) { | |
| 660 | + function makeCircle(centerLat, centerLng, radius) { | |
| 661 | + var ring = i3GeoMap.createLinearRing(''), steps = 25, i, pi2 = Math.PI * 2, lat, lng; | |
| 662 | + for (i = 0; i < steps; i++) { | |
| 663 | + lat = centerLat + radius * Math.cos(i / steps * pi2); | |
| 664 | + lng = centerLng + radius * Math.sin(i / steps * pi2); | |
| 665 | + ring.getCoordinates().pushLatLngAlt(lat, lng, 0); | |
| 666 | + } | |
| 667 | + return ring; | |
| 668 | + } | |
| 669 | + var polygonPlacemark = i3GeoMap.createPlacemark(''), poly = i3GeoMap.createPolygon(''), polyStyle; | |
| 670 | + poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); | |
| 671 | + polygonPlacemark.setGeometry(poly); | |
| 672 | + polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat, centerLng, radius)); | |
| 673 | + polygonPlacemark.setName(name); | |
| 674 | + polygonPlacemark.setSnippet(snippet); | |
| 675 | + polygonPlacemark.setStyleSelector(i3GeoMap.createStyle('')); | |
| 676 | + polyStyle = polygonPlacemark.getStyleSelector().getPolyStyle(); | |
| 677 | + polyStyle.setFill(0); | |
| 678 | + i3GeoMap.getFeatures().appendChild(polygonPlacemark); | |
| 679 | + }, | |
| 680 | + insereLinha : function(xi, yi, xf, yf, name, snippet) { | |
| 681 | + var lineStringPlacemark = i3GeoMap.createPlacemark(''), lineString, lineStyle; | |
| 682 | + lineStringPlacemark.setName(name); | |
| 683 | + lineString = i3GeoMap.createLineString(''); | |
| 684 | + lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); | |
| 685 | + lineStringPlacemark.setGeometry(lineString); | |
| 686 | + lineString.getCoordinates().pushLatLngAlt(yi, xi, 0); | |
| 687 | + lineString.getCoordinates().pushLatLngAlt(yf, xf, 0); | |
| 786 | 688 | |
| 787 | - lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle('')); | |
| 788 | - lineStringPlacemark.setSnippet(snippet); | |
| 789 | - lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle(); | |
| 790 | - lineStyle.setWidth(3); | |
| 689 | + lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle('')); | |
| 690 | + lineStringPlacemark.setSnippet(snippet); | |
| 691 | + lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle(); | |
| 692 | + lineStyle.setWidth(3); | |
| 791 | 693 | |
| 792 | - i3GeoMap.getFeatures().appendChild( | |
| 793 | - lineStringPlacemark); | |
| 794 | - }, | |
| 795 | - removePlacemark : function(nome) { | |
| 796 | - var features = i3GeoMap.getFeatures(), n = features.getChildNodes().getLength(), i, nfeatures = []; | |
| 797 | - for (i = 0; i < n; i++) { | |
| 798 | - try { | |
| 799 | - if (features.getChildNodes().item( | |
| 800 | - i).getName() === nome | |
| 801 | - || features.getChildNodes().item( | |
| 802 | - i).getDescription() === nome | |
| 803 | - || features.getChildNodes().item( | |
| 804 | - i).getSnippet() === nome) { | |
| 805 | - // features.getChildNodes().item(i).setVisibility(false); | |
| 806 | - nfeatures.push(features.getChildNodes().item( | |
| 807 | - i)); | |
| 808 | - // features.removeChild(features.getChildNodes().item(i)); | |
| 694 | + i3GeoMap.getFeatures().appendChild(lineStringPlacemark); | |
| 695 | + }, | |
| 696 | + removePlacemark : function(nome) { | |
| 697 | + var features = i3GeoMap.getFeatures(), n = features.getChildNodes().getLength(), i, nfeatures = []; | |
| 698 | + for (i = 0; i < n; i++) { | |
| 699 | + try { | |
| 700 | + if (features.getChildNodes().item(i).getName() === nome || features.getChildNodes().item(i).getDescription() === nome | |
| 701 | + || features.getChildNodes().item(i).getSnippet() === nome) { | |
| 702 | + // features.getChildNodes().item(i).setVisibility(false); | |
| 703 | + nfeatures.push(features.getChildNodes().item(i)); | |
| 704 | + // features.removeChild(features.getChildNodes().item(i)); | |
| 705 | + } | |
| 706 | + } catch (e) { | |
| 809 | 707 | } |
| 810 | - } catch (e) { | |
| 811 | 708 | } |
| 812 | - } | |
| 813 | - n = nfeatures.length; | |
| 814 | - for (i = 0; i < n; i++) { | |
| 815 | - features.removeChild(nfeatures[i]); | |
| 709 | + n = nfeatures.length; | |
| 710 | + for (i = 0; i < n; i++) { | |
| 711 | + features.removeChild(nfeatures[i]); | |
| 712 | + } | |
| 816 | 713 | } |
| 817 | 714 | } |
| 818 | - } | |
| 819 | -}; | |
| 715 | + }; | |
| 820 | 716 | // YAHOO.log("carregou classe desenho", "Classes i3geo"); | ... | ... |
js/eventos.js
| ... | ... | @@ -290,7 +290,8 @@ i3GEO.eventos = |
| 290 | 290 | } |
| 291 | 291 | i3GEO.eventos.executaEventos(this.MOUSEUP); |
| 292 | 292 | } |
| 293 | - else if (i3GEO.Interface.ATUAL === "openlayers"){ | |
| 293 | + else if (i3GEO.Interface.ATUAL === "openlayers" && exy.target && exy.target.tagName === "CANVAS"){ | |
| 294 | + //para evitar bubble | |
| 294 | 295 | i3GEO.eventos.executaEventos(this.MOUSEUP); |
| 295 | 296 | } |
| 296 | 297 | ... | ... |
js/ini_i3geo.js
| ... | ... | @@ -780,10 +780,6 @@ var i3GEO = { |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | i3GEO.eventos.navegaMapa(); |
| 783 | - i3GEO.ajuda.mostraJanela( | |
| 784 | - "Tempo de redesenho em segundos: " | |
| 785 | - + retorno.data.variaveis.tempo, | |
| 786 | - ""); | |
| 787 | 783 | // |
| 788 | 784 | // verifica se deve ser feito o zoom em algum tema |
| 789 | 785 | // | ... | ... |
js/interface.js
| ... | ... | @@ -723,21 +723,40 @@ i3GEO.Interface = |
| 723 | 723 | googleLike : false, |
| 724 | 724 | BALAOPROP : { |
| 725 | 725 | removeAoAdicionar : true, |
| 726 | - classeCadeado : "i3GEOiconeAberto" | |
| 726 | + classeCadeado : "i3GEOiconeAberto", | |
| 727 | + autoPan : true, | |
| 728 | + autoPanAnimation: { | |
| 729 | + duration: 250 | |
| 730 | + }, | |
| 731 | + width: '200px', | |
| 732 | + baloes: [] | |
| 727 | 733 | }, |
| 728 | 734 | balao : function(texto, completo, x, y) { |
| 729 | - var e, b, c, temp, p = i3GEO.Interface.openlayers.BALAOPROP; | |
| 735 | + var icone, painel, b, cabecalho, conteudo, p = i3GEO.Interface.openlayers.BALAOPROP, removeBaloes; | |
| 730 | 736 | |
| 731 | - // cabecalho de opcoes | |
| 732 | - c = "<div class='i3GEOCabecalhoInfoWindow' ></div>"; | |
| 733 | - texto = c + texto; | |
| 734 | - b = new OpenLayers.Popup.FramedCloud(null, i3GEO.util.projGeo2OSM(new OpenLayers.LonLat(x, y)), null, texto, null, true); | |
| 735 | - b.maxsize = new OpenLayers.Size(parseInt(i3GEO.parametros.w / 2, 10), parseInt(i3GEO.parametros.h / 2, 10)); | |
| 737 | + removeBaloes = function(){ | |
| 738 | + var t, n = i3GEO.Interface.openlayers.BALAOPROP.baloes.length, i; | |
| 739 | + for(i=0; i<n; i++){ | |
| 740 | + t = i3GEO.Interface.openlayers.BALAOPROP.baloes[i]; | |
| 741 | + t.setPosition(undefined); | |
| 742 | + t.getElement().parentNode.innerHTML = ""; | |
| 743 | + } | |
| 744 | + i3GEO.Interface.openlayers.BALAOPROP.baloes = []; | |
| 745 | + return false; | |
| 746 | + }; | |
| 747 | + if(p.classeCadeado === "i3GEOiconeAberto"){ | |
| 748 | + removeBaloes(); | |
| 749 | + } | |
| 750 | + painel = document.createElement("div"); | |
| 751 | + painel.style.width = p.width; | |
| 752 | + painel.className = "ol-popup"; | |
| 736 | 753 | |
| 737 | - i3geoOL.addPopup(b, p.removeAoAdicionar); | |
| 738 | - e = document.createElement("div"); | |
| 739 | - e.className = p.classeCadeado; | |
| 740 | - e.onclick = function() { | |
| 754 | + cabecalho = document.createElement("div"); | |
| 755 | + cabecalho.className = "i3GEOCabecalhoInfoWindow"; | |
| 756 | + //icone que indica se os baloes devem ficar na tela ou nao | |
| 757 | + icone = document.createElement("div"); | |
| 758 | + icone.className = p.classeCadeado; | |
| 759 | + icone.onclick = function() { | |
| 741 | 760 | if (p.classeCadeado === "i3GEOiconeAberto") { |
| 742 | 761 | p.classeCadeado = "i3GEOiconeFechado"; |
| 743 | 762 | } else { |
| ... | ... | @@ -745,25 +764,50 @@ i3GEO.Interface = |
| 745 | 764 | } |
| 746 | 765 | this.className = p.classeCadeado; |
| 747 | 766 | p.removeAoAdicionar = !p.removeAoAdicionar; |
| 767 | + return false; | |
| 748 | 768 | }; |
| 749 | - temp = $i(b.id).getElementsByClassName("i3GEOCabecalhoInfoWindow")[0]; | |
| 750 | - temp.appendChild(e); | |
| 751 | - e = document.createElement("div"); | |
| 752 | - e.className = "i3GEOiconeFerramentas"; | |
| 753 | - e.style.left = "3px"; | |
| 754 | - e.onclick = function() { | |
| 769 | + cabecalho.appendChild(icone); | |
| 770 | + //icone das propriedades | |
| 771 | + icone = document.createElement("div"); | |
| 772 | + icone.className = "i3GEOiconeFerramentas"; | |
| 773 | + icone.style.left = "3px"; | |
| 774 | + icone.onclick = function() { | |
| 755 | 775 | i3GEO.janela.prompt($trad("tolerancia"), function() { |
| 756 | 776 | i3GEO.mapa.RESOLUCAOTIP = $i("i3GEOjanelaprompt").value; |
| 757 | 777 | }, i3GEO.mapa.RESOLUCAOTIP); |
| 778 | + return false; | |
| 758 | 779 | }; |
| 759 | - temp.appendChild(e); | |
| 760 | - e = document.createElement("div"); | |
| 761 | - e.className = "i3GEOiconeMais"; | |
| 762 | - e.style.left = "9px"; | |
| 763 | - e.onclick = function() { | |
| 780 | + cabecalho.appendChild(icone); | |
| 781 | + //icone mais info | |
| 782 | + icone = document.createElement("div"); | |
| 783 | + icone.className = "i3GEOiconeMais"; | |
| 784 | + icone.style.left = "9px"; | |
| 785 | + icone.onclick = function() { | |
| 764 | 786 | i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>" + completo + "</div>", ""); |
| 787 | + return false; | |
| 765 | 788 | }; |
| 766 | - temp.appendChild(e); | |
| 789 | + cabecalho.appendChild(icone); | |
| 790 | + //icone x | |
| 791 | + icone = document.createElement("div"); | |
| 792 | + icone.className = "ol-popup-closer"; | |
| 793 | + icone.onclick = removeBaloes; | |
| 794 | + cabecalho.appendChild(icone); | |
| 795 | + | |
| 796 | + painel.appendChild(cabecalho); | |
| 797 | + | |
| 798 | + conteudo = document.createElement("div"); | |
| 799 | + conteudo.innerHTML = texto; | |
| 800 | + painel.appendChild(conteudo); | |
| 801 | + | |
| 802 | + b = new ol.Overlay({ | |
| 803 | + element: painel, | |
| 804 | + stopEvent: true, | |
| 805 | + autoPan: p.autoPan, | |
| 806 | + autoPanAnimation: p.autoPanAnimation | |
| 807 | + }); | |
| 808 | + p.baloes.push(b); | |
| 809 | + i3geoOL.addOverlay(b); | |
| 810 | + b.setPosition([x,y]); | |
| 767 | 811 | }, |
| 768 | 812 | /** |
| 769 | 813 | * Redesenha o mapa atual |
| ... | ... | @@ -814,6 +858,12 @@ i3GEO.Interface = |
| 814 | 858 | ol.layer.Layer.prototype.setVisibility = function(v) { |
| 815 | 859 | this.setVisible(v); |
| 816 | 860 | }; |
| 861 | + ol.layer.Layer.prototype.getVisibility = function(v) { | |
| 862 | + this.getVisible(v); | |
| 863 | + }; | |
| 864 | + i3geoOL.panTo = function(x,y){ | |
| 865 | + this.getView().setCenter([x,y]); | |
| 866 | + }; | |
| 817 | 867 | i3geoOL.getLayersByName = function(nome) { |
| 818 | 868 | var res = [], layers = this.getLayers(), n = layers.getLength(), i; |
| 819 | 869 | for (i = 0; i < n; i++) { |
| ... | ... | @@ -847,6 +897,15 @@ i3GEO.Interface = |
| 847 | 897 | } |
| 848 | 898 | return res; |
| 849 | 899 | }; |
| 900 | + i3geoOL.getControlsBy = function(chave, valor) { | |
| 901 | + var res = [], controles = this.getControls(), n = controles.getLength(), i; | |
| 902 | + for (i = 0; i < n; i++) { | |
| 903 | + if (controles.item(i).get(chave) && controles.item(i).get(chave) === valor) { | |
| 904 | + res.push(controles.item(i)); | |
| 905 | + } | |
| 906 | + } | |
| 907 | + return res; | |
| 908 | + }; | |
| 850 | 909 | i3geoOL.getCenter = function() { |
| 851 | 910 | var c = this.getView().getCenter(); |
| 852 | 911 | return { |
| ... | ... | @@ -1010,7 +1069,7 @@ i3GEO.Interface = |
| 1010 | 1069 | for (i = nlayers - 1; i >= 0; i--) { |
| 1011 | 1070 | camada = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
| 1012 | 1071 | l = i3geoOL.getLayersByName(camada.name)[0]; |
| 1013 | - if (l && l.isBaseLayer === false) { | |
| 1072 | + if (l && l.get("isBaseLayer") === false) { | |
| 1014 | 1073 | if (layer == "" || layer == camada.name) { |
| 1015 | 1074 | l.setOpacity(opacidade); |
| 1016 | 1075 | } |
| ... | ... | @@ -1829,7 +1888,7 @@ i3GEO.Interface = |
| 1829 | 1888 | y = metrica.lat; |
| 1830 | 1889 | } |
| 1831 | 1890 | } |
| 1832 | - i3geoOL.panTo(new OpenLayers.LonLat(x, y)); | |
| 1891 | + i3geoOL.panTo(x,y); | |
| 1833 | 1892 | } |
| 1834 | 1893 | }, |
| 1835 | 1894 | /** | ... | ... |
js/mapa.js
| ... | ... | @@ -1405,113 +1405,113 @@ i3GEO.mapa = |
| 1405 | 1405 | } |
| 1406 | 1406 | retorna = |
| 1407 | 1407 | function(retorno) { |
| 1408 | - var textoCompleto = "", textoSimples = "", textoTempCompleto = "", textoTempSimples = "", classeCor, temp, n, mostra, res, temas, ntemas, titulo, tips, j, ntips, r, ds, nds, s, configura = | |
| 1409 | - i3GEO.configura, tipotip = configura.tipotip; | |
| 1410 | - i3GEO.eventos.cliquePerm.status = true; | |
| 1411 | - mostra = false; | |
| 1412 | - retorno = retorno.data; | |
| 1413 | - if (retorno !== "") { | |
| 1414 | - res = ""; | |
| 1415 | - temas = retorno; | |
| 1416 | - if (!temas) { | |
| 1417 | - return; | |
| 1408 | + var textoCompleto = "", textoSimples = "", textoTempCompleto = "", textoTempSimples = "", classeCor, temp, n, mostra, res, temas, ntemas, titulo, tips, j, ntips, r, ds, nds, s, configura = | |
| 1409 | + i3GEO.configura, tipotip = configura.tipotip; | |
| 1410 | + i3GEO.eventos.cliquePerm.status = true; | |
| 1411 | + mostra = false; | |
| 1412 | + retorno = retorno.data; | |
| 1413 | + if (retorno !== "") { | |
| 1414 | + res = ""; | |
| 1415 | + temas = retorno; | |
| 1416 | + if (!temas) { | |
| 1417 | + return; | |
| 1418 | + } | |
| 1419 | + ntemas = temas.length; | |
| 1420 | + for (j = 0; j < ntemas; j += 1) { | |
| 1421 | + titulo = temas[j].nome; | |
| 1422 | + if (tipotip != "simples") { | |
| 1423 | + titulo = "<div class='toolTipBalaoTitulo'><b>" + titulo + "</b></div>"; | |
| 1424 | + } else { | |
| 1425 | + titulo = ""; | |
| 1418 | 1426 | } |
| 1419 | - ntemas = temas.length; | |
| 1420 | - for (j = 0; j < ntemas; j += 1) { | |
| 1421 | - titulo = temas[j].nome; | |
| 1422 | - if (tipotip != "simples") { | |
| 1423 | - titulo = "<span class='toolTipBalaoTitulo'><b>" + titulo + "</b></span><br>"; | |
| 1424 | - } else { | |
| 1425 | - titulo = ""; | |
| 1426 | - } | |
| 1427 | - tips = temas[j].resultado.todosItens; | |
| 1428 | - ntips = tips.length; | |
| 1429 | - ins = ""; | |
| 1430 | - textoTempCompleto = ""; | |
| 1431 | - textoTempSimples = ""; | |
| 1432 | - ds = temas[j].resultado.dados; | |
| 1433 | - if (ds !== " " && ds[0] && ds[0] != " ") { | |
| 1434 | - try { | |
| 1435 | - nds = ds.length; | |
| 1436 | - classeCor = "toolTipBalaoTexto"; | |
| 1437 | - for (s = 0; s < nds; s += 1) { | |
| 1438 | - textoTempCompleto += "<div class='" + classeCor + "'>"; | |
| 1439 | - textoTempSimples += "<div class='" + classeCor + "'>"; | |
| 1440 | - for (r = 0; r < ntips; r += 1) { | |
| 1441 | - try { | |
| 1442 | - temp = ""; | |
| 1443 | - var alias = ds[s][tips[r]].alias; | |
| 1444 | - var valor = ds[s][tips[r]].valor; | |
| 1445 | - var link = ds[s][tips[r]].link; | |
| 1446 | - var img = ds[s][tips[r]].img; | |
| 1447 | - if (valor !== "" && link === "") { | |
| 1448 | - temp += "<span>" + alias + " :" + valor + "</span><br>"; | |
| 1449 | - } | |
| 1450 | - if (valor !== "" && link !== "") { | |
| 1451 | - temp += | |
| 1452 | - "<span>" + alias | |
| 1453 | - + " : <a style='color:blue;cursor:pointer' target=_blanck href='" | |
| 1454 | - + link | |
| 1455 | - + "' >" | |
| 1456 | - + valor | |
| 1457 | - + "</a></span><br>"; | |
| 1458 | - } | |
| 1459 | - if (img !== "") { | |
| 1460 | - temp += img + "<br>"; | |
| 1461 | - } | |
| 1462 | - if (tipotip === "balao" && ds[s][tips[r]].tip.toLowerCase() === "sim") { | |
| 1463 | - textoTempSimples += temp; | |
| 1464 | - } | |
| 1465 | - textoTempCompleto += temp; | |
| 1466 | - mostra = true; | |
| 1467 | - } catch (e) { | |
| 1427 | + tips = temas[j].resultado.todosItens; | |
| 1428 | + ntips = tips.length; | |
| 1429 | + ins = ""; | |
| 1430 | + textoTempCompleto = ""; | |
| 1431 | + textoTempSimples = ""; | |
| 1432 | + ds = temas[j].resultado.dados; | |
| 1433 | + if (ds !== " " && ds[0] && ds[0] != " ") { | |
| 1434 | + try { | |
| 1435 | + nds = ds.length; | |
| 1436 | + classeCor = "toolTipBalaoTexto"; | |
| 1437 | + for (s = 0; s < nds; s += 1) { | |
| 1438 | + textoTempCompleto += "<div class='" + classeCor + "'>"; | |
| 1439 | + textoTempSimples += "<div class='" + classeCor + "'>"; | |
| 1440 | + for (r = 0; r < ntips; r += 1) { | |
| 1441 | + try { | |
| 1442 | + temp = ""; | |
| 1443 | + var alias = ds[s][tips[r]].alias; | |
| 1444 | + var valor = ds[s][tips[r]].valor; | |
| 1445 | + var link = ds[s][tips[r]].link; | |
| 1446 | + var img = ds[s][tips[r]].img; | |
| 1447 | + if (valor !== "" && link === "") { | |
| 1448 | + temp += "<span>" + alias + " :" + valor + "</span><br>"; | |
| 1468 | 1449 | } |
| 1450 | + if (valor !== "" && link !== "") { | |
| 1451 | + temp += | |
| 1452 | + "<span>" + alias | |
| 1453 | + + " : <a style='color:blue;cursor:pointer' target=_blanck href='" | |
| 1454 | + + link | |
| 1455 | + + "' >" | |
| 1456 | + + valor | |
| 1457 | + + "</a></span><br>"; | |
| 1458 | + } | |
| 1459 | + if (img !== "") { | |
| 1460 | + temp += img + "<br>"; | |
| 1461 | + } | |
| 1462 | + if (tipotip === "balao" && ds[s][tips[r]].tip.toLowerCase() === "sim") { | |
| 1463 | + textoTempSimples += temp; | |
| 1464 | + } | |
| 1465 | + textoTempCompleto += temp; | |
| 1466 | + mostra = true; | |
| 1467 | + } catch (e) { | |
| 1469 | 1468 | } |
| 1470 | - if (classeCor === "toolTipBalaoTexto") { | |
| 1471 | - classeCor = "toolTipBalaoTexto1"; | |
| 1472 | - } else { | |
| 1473 | - classeCor = "toolTipBalaoTexto"; | |
| 1474 | - } | |
| 1475 | - textoTempCompleto += "</div>"; | |
| 1476 | - textoTempSimples += "</div>"; | |
| 1477 | 1469 | } |
| 1478 | - | |
| 1479 | - } catch (e) { | |
| 1470 | + if (classeCor === "toolTipBalaoTexto") { | |
| 1471 | + classeCor = "toolTipBalaoTexto1"; | |
| 1472 | + } else { | |
| 1473 | + classeCor = "toolTipBalaoTexto"; | |
| 1474 | + } | |
| 1475 | + textoTempCompleto += "</div>"; | |
| 1476 | + textoTempSimples += "</div>"; | |
| 1480 | 1477 | } |
| 1481 | - } | |
| 1482 | - if (textoTempSimples !== "") { | |
| 1483 | - textoCompleto += titulo + textoTempCompleto; | |
| 1484 | - textoSimples += titulo + textoTempSimples; | |
| 1478 | + | |
| 1479 | + } catch (e) { | |
| 1485 | 1480 | } |
| 1486 | 1481 | } |
| 1487 | - if (mostra === true) { | |
| 1488 | - if (tipotip != "simples") { | |
| 1489 | - res = textoSimples; | |
| 1490 | - } else { | |
| 1491 | - res = textoCompleto; | |
| 1492 | - } | |
| 1493 | - if (tipotip === "balao") { | |
| 1494 | - i3GEO.Interface[i3GEO.Interface.ATUAL].balao(textoSimples, textoCompleto, x, y); | |
| 1482 | + if (textoTempSimples !== "") { | |
| 1483 | + textoCompleto += titulo + textoTempCompleto; | |
| 1484 | + textoSimples += titulo + textoTempSimples; | |
| 1485 | + } | |
| 1486 | + } | |
| 1487 | + if (mostra === true) { | |
| 1488 | + if (tipotip != "simples") { | |
| 1489 | + res = textoSimples; | |
| 1490 | + } else { | |
| 1491 | + res = textoCompleto; | |
| 1492 | + } | |
| 1493 | + if (tipotip === "balao") { | |
| 1494 | + i3GEO.Interface[i3GEO.Interface.ATUAL].balao(textoSimples, textoCompleto, x, y); | |
| 1495 | + } else { | |
| 1496 | + // tipotip pode ser um elemento DOM | |
| 1497 | + n = $i(tipotip); | |
| 1498 | + if (!n) { | |
| 1499 | + n = i3GEO.janela.tip(); | |
| 1500 | + n = $i(n); | |
| 1501 | + n.style.textAlign = "left"; | |
| 1502 | + n.innerHTML += res; | |
| 1495 | 1503 | } else { |
| 1496 | - // tipotip pode ser um elemento DOM | |
| 1497 | - n = $i(tipotip); | |
| 1498 | - if (!n) { | |
| 1499 | - n = i3GEO.janela.tip(); | |
| 1500 | - n = $i(n); | |
| 1501 | - n.style.textAlign = "left"; | |
| 1502 | - n.innerHTML += res; | |
| 1503 | - } else { | |
| 1504 | - n.innerHTML = res; | |
| 1505 | - } | |
| 1504 | + n.innerHTML = res; | |
| 1506 | 1505 | } |
| 1507 | 1506 | } |
| 1508 | 1507 | } |
| 1509 | - if ($i(i3GEO.Interface.IDMAPA)) { | |
| 1510 | - $i(i3GEO.Interface.IDMAPA).title = ""; | |
| 1511 | - temp = "identifica"; | |
| 1512 | - i3GEO.util.mudaCursor(configura.cursores, temp, i3GEO.Interface.IDMAPA, configura.locaplic); | |
| 1513 | - } | |
| 1514 | - }; | |
| 1508 | + } | |
| 1509 | + if ($i(i3GEO.Interface.IDMAPA)) { | |
| 1510 | + $i(i3GEO.Interface.IDMAPA).title = ""; | |
| 1511 | + temp = "identifica"; | |
| 1512 | + i3GEO.util.mudaCursor(configura.cursores, temp, i3GEO.Interface.IDMAPA, configura.locaplic); | |
| 1513 | + } | |
| 1514 | + }; | |
| 1515 | 1515 | // alert("identifica "+objposicaocursor.ddx+" "+objposicaocursor.ddy) |
| 1516 | 1516 | i3GEO.php.identifica3( |
| 1517 | 1517 | retorna, | ... | ... |
js/navega.js
| ... | ... | @@ -328,6 +328,8 @@ i3GEO.navega = |
| 328 | 328 | if (sid !== "") { |
| 329 | 329 | i3GEO.configura.sid = sid; |
| 330 | 330 | } |
| 331 | + i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor); | |
| 332 | + /* | |
| 331 | 333 | var f = |
| 332 | 334 | "i3GEO.navega.timerNavega = null;" + "i3GEO.php.zoomponto(i3GEO.atualiza," + x + "," + y + "," + tamanho + ",'" + simbolo |
| 333 | 335 | + "','" + cor + "');"; |
| ... | ... | @@ -335,6 +337,7 @@ i3GEO.navega = |
| 335 | 337 | clearTimeout(i3GEO.navega.timerNavega); |
| 336 | 338 | } |
| 337 | 339 | i3GEO.navega.timerNavega = setTimeout(f, i3GEO.navega.TEMPONAVEGAR); |
| 340 | + */ | |
| 338 | 341 | }, |
| 339 | 342 | /** |
| 340 | 343 | * Function: zoompontoIMG | ... | ... |
json.php
| ... | ... | @@ -91,7 +91,7 @@ copy($base,$nomeMapfileTmp); |
| 91 | 91 | $oMap = ms_newMapobj($nomeMapfileTmp); |
| 92 | 92 | $nmap = ms_newMapobj($locaplic."/temas/".$tema.".map"); |
| 93 | 93 | $l = $nmap->getlayerbyname($tema); |
| 94 | - | |
| 94 | +$l->set("template","none.htm"); | |
| 95 | 95 | if (!empty($postgis_mapa)){ |
| 96 | 96 | if ($l->connectiontype == MS_POSTGIS){ |
| 97 | 97 | $lcon = $l->connection; |
| ... | ... | @@ -333,14 +333,17 @@ function carregaCacheArquivo(){ |
| 333 | 333 | |
| 334 | 334 | function pegaDadosJ(){ |
| 335 | 335 | global $oMap, $tema, $versao; |
| 336 | + set_time_limit(0); | |
| 336 | 337 | $layer = $oMap->getlayerbyname($tema); |
| 338 | + $layer->set("status",MS_DEFAULT); | |
| 339 | + $layer->set("template","none.htm"); | |
| 337 | 340 | $items = pegaItens($layer,$oMap); |
| 338 | 341 | $layer->querybyrect($oMap->extent); |
| 339 | 342 | $layer->open(); |
| 340 | - $res_count = $layer->getNumresults(); | |
| 343 | + $res_count = $layer->getNumresults(); | |
| 341 | 344 | $linhas = array(); |
| 342 | - | |
| 343 | 345 | for ($i = 0; $i < $res_count; $i++){ |
| 346 | + //echo $i." - <br>"; | |
| 344 | 347 | if($versao == 6){ |
| 345 | 348 | $shape = $layer->getShape($layer->getResult($i)); |
| 346 | 349 | } | ... | ... |
temas/teste.map
| 1 | 1 | MAP |
| 2 | 2 | FONTSET "../symbols/fontes.txt" |
| 3 | - SYMBOLSET "../symbols/simbolosv6.sym" | |
| 3 | + SYMBOLSET "../symbols/simbolos.sym" | |
| 4 | 4 | LAYER |
| 5 | 5 | CONNECTION "" |
| 6 | - DATA "/var/www/temp/localizador_052015.shp" | |
| 6 | + CONNECTIONTYPE POSTGIS | |
| 7 | + DATA "geom from ( | |
| 8 | + SELECT | |
| 9 | + co_seq_id AS gid, | |
| 10 | + ST_MakePoint(tb_cep.long::numeric,tb_cep.lat::numeric) AS geom, | |
| 11 | + tb_cep.lat, | |
| 12 | + tb_cep.long, | |
| 13 | + ano_farm_pop_aqt AS ano, | |
| 14 | + mes_farm_pop_aqt AS mes, | |
| 15 | + nu_ddd_farmacia AS ddd, | |
| 16 | + nu_telefone_farmacia, | |
| 17 | + nu_cep_farmacia, | |
| 18 | + no_bairro_farmacia, | |
| 19 | + ds_endereco_farmacia, | |
| 20 | + no_farmacia, | |
| 21 | + dbgeral.tb_ibge.cidade_sem_acento, | |
| 22 | + dbgeral.tb_ibge.uf | |
| 23 | + FROM | |
| 24 | + dbacoes_saude.tb_farmacia_pop_aqt | |
| 25 | + INNER JOIN dbgeral.tb_cep ON dbacoes_saude.tb_farmacia_pop_aqt.nu_cep_farmacia = dbgeral.tb_cep.cep | |
| 26 | + INNER JOIN dbgeral.tb_ibge ON dbacoes_saude.tb_farmacia_pop_aqt.co_ibge = dbgeral.tb_ibge.ibge | |
| 27 | + WHERE | |
| 28 | + 'm'||tb_farmacia_pop_aqt.mes_farm_pop_aqt||'a'||tb_farmacia_pop_aqt.ano_farm_pop_aqt = (SELECT 'm'||tb_farmacia_pop_aqt.mes_farm_pop_aqt||'a'||tb_farmacia_pop_aqt.ano_farm_pop_aqt | |
| 29 | + FROM dbacoes_saude.tb_farmacia_pop_aqt | |
| 30 | + ORDER BY tb_farmacia_pop_aqt.ano_farm_pop_aqt DESC, tb_farmacia_pop_aqt.mes_farm_pop_aqt DESC LIMIT 1) | |
| 31 | + AND | |
| 32 | + farmacia_apta not LIKE '%N%' AND | |
| 33 | + nu_cep_farmacia not LIKE '%-%' | |
| 34 | + ) as foo using unique gid using srid=4674" | |
| 7 | 35 | METADATA |
| 8 | - "METAESTAT_ID_MEDIDA_VARIAVEL""" | |
| 9 | - "ltempoitemimagem""" | |
| 10 | - "tip""RELATORIO" | |
| 11 | - "ltempoitemdescricao""" | |
| 12 | - "CLASSE""SIM" | |
| 13 | - "ltempoiteminicio""" | |
| 14 | - "palletestep""" | |
| 15 | - "ltempoitemtip""" | |
| 16 | - "temporizador""" | |
| 17 | - "ltempoitemtitulo""" | |
| 18 | - "description_template""" | |
| 19 | - "itensdesc""OBS,PROCESSO,RIP,ORGAO,RELATORIO" | |
| 20 | - "iconetema""" | |
| 21 | - "ltempoitemlink""" | |
| 22 | - "itenslink""[OBS]" | |
| 23 | - "tiles""" | |
| 24 | - "METAESTAT_CODIGO_TIPO_REGIAO""" | |
| 25 | - "palletefile""" | |
| 26 | - "ltempoformatodata""" | |
| 27 | - "ltempoitemicone""" | |
| 28 | - "permitecomentario""SIM" | |
| 29 | - "PLUGINI3GEO""" | |
| 30 | - "metaestat""" | |
| 31 | - "escondido""NAO" | |
| 32 | - "itembuscarapida""OBS" | |
| 33 | - "itens""OBS,PROCESSO,RIP,ORGAO,RELATORIO" | |
| 34 | - "transitioneffect""SIM" | |
| 35 | - "TEMA""localizador" | |
| 36 | - "convcaracter""" | |
| 37 | - "cortepixels""0" | |
| 38 | - "ltempoconvencode""" | |
| 39 | - "editorsql""" | |
| 40 | - "identifica""SIM" | |
| 41 | - "aplicaextensao""SIM" | |
| 42 | - "ltempoitemfim""" | |
| 43 | - END # METADATA | |
| 36 | + "CLASSE" "SIM" | |
| 37 | + "TEMA" "loc" | |
| 38 | + "IDENTIFICA" "SIM" | |
| 39 | + END | |
| 44 | 40 | NAME "teste" |
| 45 | - PROJECTION | |
| 46 | - "init=epsg:29194" | |
| 47 | - END # PROJECTION | |
| 48 | 41 | STATUS DEFAULT |
| 49 | - TEMPLATE "none.htm" | |
| 50 | - TILEITEM "location" | |
| 51 | 42 | TYPE POINT |
| 52 | 43 | UNITS METERS |
| 53 | 44 | CLASS |
| 54 | - NAME "" | |
| 45 | + NAME " " | |
| 55 | 46 | STYLE |
| 56 | - ANGLE 0 | |
| 57 | - COLOR 166 16 16 | |
| 58 | - OFFSET 0 0 | |
| 59 | - SIZE 20 | |
| 47 | + COLOR 255 0 0 | |
| 60 | 48 | SYMBOL "ponto" |
| 61 | - END # STYLE | |
| 62 | - END # CLASS | |
| 63 | - END # LAYER | |
| 64 | - | |
| 65 | -END # MAP | |
| 66 | 49 | \ No newline at end of file |
| 50 | + SIZE 10 | |
| 51 | + END | |
| 52 | + END | |
| 53 | + END | |
| 54 | +END | ... | ... |