Commit 06e8175919c3ec791fa5080f9be5d025815f19cc
1 parent
af308668
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
41 additions
and
21 deletions
Show diff stats
classesjs/classe_analise.js
| ... | ... | @@ -382,8 +382,10 @@ i3GEO.analise = { |
| 382 | 382 | i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp"); |
| 383 | 383 | } |
| 384 | 384 | } |
| 385 | - if(i3GEO.Interface.ATUAL === "padrao" || i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps") | |
| 386 | - {i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");} | |
| 385 | + if(i3GEO.Interface.ATUAL === "padrao" || i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps"){ | |
| 386 | + i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp"); | |
| 387 | + i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3); | |
| 388 | + } | |
| 387 | 389 | } |
| 388 | 390 | }, |
| 389 | 391 | /* |
| ... | ... | @@ -600,8 +602,10 @@ i3GEO.analise = { |
| 600 | 602 | |
| 601 | 603 | m = i3GEO.calculo.area(pontosdistobj,g_areapixel); |
| 602 | 604 | i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2)); |
| 603 | - if(i3GEO.Interface.ATUAL === "padrao" || i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps") | |
| 604 | - {i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");} | |
| 605 | + if(i3GEO.Interface.ATUAL === "padrao" || i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps"){ | |
| 606 | + i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp"); | |
| 607 | + i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3); | |
| 608 | + } | |
| 605 | 609 | if(i3GEO.Interface.ATUAL === "googleearth") |
| 606 | 610 | {i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","");} |
| 607 | 611 | } | ... | ... |
classesjs/classe_desenho.js
| ... | ... | @@ -69,7 +69,7 @@ i3GEO.desenho = { |
| 69 | 69 | linecolor: 'black', |
| 70 | 70 | linewidth: '1', |
| 71 | 71 | circcolor: 'white', |
| 72 | - textcolor: 'white' | |
| 72 | + textcolor: 'gray' | |
| 73 | 73 | }, |
| 74 | 74 | "palido":{ |
| 75 | 75 | fillcolor: 'gray', |
| ... | ... | @@ -265,22 +265,7 @@ i3GEO.desenho = { |
| 265 | 265 | dx = Math.pow(((pontosdistobj.xtela[n])*1) - ((pontosdistobj.xtela[n-1])*1),2); |
| 266 | 266 | dy = Math.pow(((pontosdistobj.ytela[n])*1) - ((pontosdistobj.ytela[n-1])*1),2); |
| 267 | 267 | w = Math.sqrt(dx + dy); |
| 268 | - if (navn){ | |
| 269 | - try{ | |
| 270 | - i3GEO.desenho.richdraw.renderer.create('circ', '', i3GEO.desenho.richdraw.circColor, i3GEO.desenho.richdraw.lineWidth, pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,w); | |
| 271 | - } | |
| 272 | - catch(men){ | |
| 273 | - if(typeof(console) !== 'undefined'){console.error(men);} | |
| 274 | - } | |
| 275 | - } | |
| 276 | - else{ | |
| 277 | - try{ | |
| 278 | - i3GEO.desenho.richdraw.renderer.create('circ', '', i3GEO.desenho.richdraw.circColor, i3GEO.desenho.richdraw.lineWidth, pontosdistobj.ximg[n-1]-w,pontosdistobj.yimg[n-1]-w,w*2,w*2); | |
| 279 | - } | |
| 280 | - catch(men){ | |
| 281 | - if(typeof(console) !== 'undefined'){console.error(men);} | |
| 282 | - } | |
| 283 | - } | |
| 268 | + i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w); | |
| 284 | 269 | } |
| 285 | 270 | if(tipo==="insereTexto"){ |
| 286 | 271 | try{ |
| ... | ... | @@ -293,6 +278,37 @@ i3GEO.desenho = { |
| 293 | 278 | } |
| 294 | 279 | }, |
| 295 | 280 | /* |
| 281 | + Function: insereCirculo | |
| 282 | + | |
| 283 | + Insere um circulo no container de elementos gráficos | |
| 284 | + | |
| 285 | + Parametros: | |
| 286 | + | |
| 287 | + x {numerico} - posição do ponto em coordenadas de imagem | |
| 288 | + | |
| 289 | + y {numerico} - posição do ponto em coordenadas de imagem | |
| 290 | + | |
| 291 | + w {numerico} - raio do círculo em pixels | |
| 292 | + */ | |
| 293 | + insereCirculo: function(x,y,w){ | |
| 294 | + if (navn){ | |
| 295 | + try{ | |
| 296 | + i3GEO.desenho.richdraw.renderer.create('circ', '', i3GEO.desenho.richdraw.circColor, i3GEO.desenho.richdraw.lineWidth, x,y,w,w); | |
| 297 | + } | |
| 298 | + catch(men){ | |
| 299 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
| 300 | + } | |
| 301 | + } | |
| 302 | + else{ | |
| 303 | + try{ | |
| 304 | + i3GEO.desenho.richdraw.renderer.create('circ', '', i3GEO.desenho.richdraw.circColor, i3GEO.desenho.richdraw.lineWidth, x-w,y-w,w*2,w*2); | |
| 305 | + } | |
| 306 | + catch(men){ | |
| 307 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
| 308 | + } | |
| 309 | + } | |
| 310 | + }, | |
| 311 | + /* | |
| 296 | 312 | Function: definePadrao |
| 297 | 313 | |
| 298 | 314 | Aplica um determinado padrao de estilos para os novos elementos que serão adicionados | ... | ... |