-
-
+
-
-
","i3GEOJanelaCoordenadas",false,"hd","","");$(janela[0].close).click(function(){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;for(i=0;i
"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas em memória";$i(onde).innerHTML=ins;i3GEO.coordenadas.ativaEventos("coordgeotabela")},ativaEventos:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;if(!prefixo){prefixo="localizarxy"}for(i=0;imid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}},zoomPonto:function(){var localizarxygeoProjxxx=i3GEO.calculo.dms2dd($i('localizarxygeoProjxg').value*1,$i('localizarxygeoProjxm').value*1,$i('localizarxygeoProjxs').value.replace(",",".")*1);var localizarxygeoProjyyy=i3GEO.calculo.dms2dd($i('localizarxygeoProjyg').value*1,$i('localizarxygeoProjym').value*1,$i('localizarxygeoProjys').value.replace(",",".")*1);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,localizarxygeoProjxxx,localizarxygeoProjyyy)},zoomPontoGeo:function(){i3GEO.coordenadas.zoomPonto()}};
\ No newline at end of file
+if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"geohash":{idhtml:"localizarxy",tipo:"codigo",tipoCodigo:"geohash",titulo:"GeoHash",ativo:true},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraCoordenadasGeohash":{idhtml:"localizarxy"}},MODOTEXTO:"",atualizaLocalizarGeo:function(id,x,y){if(!id||id==""){id="coordgeotabela"}if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}var temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}else{i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('localizarxygeoProj')"])}},geo2zonaUtm:function(l){l=(l*1)+180;l=l/6;return parseInt(l,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");x[2]=$.number(x[2],2,$trad("dec"),$trad("mil"));y[2]=$.number(y[2],2,$trad("dec"),$trad("mil"));if($i(prefixo+"xg")){$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2]}i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"
"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins=""+caixa+" X: "+''+" Y: "+''+" Zn: "+''+"
";return ins},criaMascaraCodigo:function(prefixo,titulo,caixa,tipoCodigo){var funcao="",ins="";if(tipoCodigo==="geohash"){funcao="i3GEO.coordenadas.geohash.zoomCodigo(\'"+prefixo+"Codigo\')"}ins=""+caixa+" "+'
'+" "+'

'+"
";return ins},atualizaCodigo:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('"+onde+"','"+configProj+"')"])};var ondeValor=$i(onde+configProj+"Codigo"),temp=i3GEO.coordenadas.config[configProj],codigo="";onde=$i(onde);if(onde&&onde.style.display==="none"){remove();return}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipoCodigo==="geohash"){if($i("localizarxygeohash")&&$i("localizarxygeohash").style.display==="none"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('localizarxy','geohash')"])}codigo=i3GEO.coordenadas.geohash.encodeGeoHash(y,x)}i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" : "+codigo+"
";if(ondeValor){ondeValor.value=codigo}},atualizaProj4:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaProj4('"+onde+"','"+configProj+"')"])};var zona,temp,p,destino="",iu=i3GEO.util;temp=i3GEO.coordenadas.config[configProj];if($i(onde+configProj)&&$i(onde+configProj).style.display==="none"){remove();return}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);if($i(onde+configProj+"ZN")){$i(onde+configProj+"ZN").value=zona}if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}p.x=$.number(p.x,4,$trad("dec"),$trad("mil"));p.y=$.number(p.y,4,$trad("dec"),$trad("mil"));iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"
"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i"+$trad("x49")+"","i3GEOJanelaCoordenadas",false,"hd","","");$(janela[0].close).click(function(){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;for(i=0;i
"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas em memória";$i(onde).innerHTML=ins;i3GEO.coordenadas.ativaEventos("coordgeotabela")},ativaEventos:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;if(!prefixo){prefixo="localizarxy"}for(i=0;imid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}},zoomPonto:function(){var localizarxygeoProjxxx=i3GEO.calculo.dms2dd($i('localizarxygeoProjxg').value*1,$i('localizarxygeoProjxm').value*1,$i('localizarxygeoProjxs').value.replace(",",".")*1);var localizarxygeoProjyyy=i3GEO.calculo.dms2dd($i('localizarxygeoProjyg').value*1,$i('localizarxygeoProjym').value*1,$i('localizarxygeoProjys').value.replace(",",".")*1);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,localizarxygeoProjxxx,localizarxygeoProjyyy)},zoomPontoGeo:function(){i3GEO.coordenadas.zoomPonto()}};
\ No newline at end of file
diff --git a/js/coordenadas.js b/js/coordenadas.js
index 236ee9d..924c22d 100755
--- a/js/coordenadas.js
+++ b/js/coordenadas.js
@@ -526,6 +526,8 @@ i3GEO.coordenadas =
} else {
p = i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem, destino, x, y);
}
+ p.x = $.number(p.x,4,$trad("dec"),$trad("mil"));
+ p.y = $.number(p.y,4,$trad("dec"),$trad("mil"));
iu.defineValor(onde + configProj + "X", "value", p.x);
iu.defineValor(onde + configProj + "Y", "value", p.y);
i3GEO.coordenadas.MODOTEXTO += temp.titulo + " - X: " + p.x + " Y: " + p.y + "
";
diff --git a/js/i3geo_tudo_compacto8.js b/js/i3geo_tudo_compacto8.js
index 740e0be..b0e7b5c 100644
--- a/js/i3geo_tudo_compacto8.js
+++ b/js/i3geo_tudo_compacto8.js
@@ -284,7 +284,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDSMENUS:[],bu
if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={_mascCompose:"",_interacoes:"",_idsSelecionados:[],_copia:[],_backup:new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false}),_featuresBackup:[],_simbologia:{opacidade:0.4,texto:"",fillColor:"250,180,15",strokeWidth:5,strokeColor:"250,150,0",pointRadius:6,graphicName:"square",fontSize:"12px",fontColor:"0,0,0",externalGraphic:"",graphicHeight:25,graphicWidth:25},_freehand:false,_snap:false,_snapInteraction:"",_tolerance:10,toggleSnap:function(){if(i3GEO.editor._snap==true){i3geoOL.addInteraction(i3GEO.editor.getSnap())}else{i3geoOL.removeInteraction(i3GEO.editor._snapInteraction)}},getSnap:function(){if(i3GEO.editor._snapInteraction==""){i3GEO.editor._snapInteraction=new ol.interaction.Snap({source:i3GEO.desenho.layergrafico.getSource(),pixelTolerance:i3GEO.editor._tolerance})}return i3GEO.editor._snapInteraction},copy:function(){var f=i3GEO.editor.sel.getFeatures(),n=f.length,i=0,clone;i3GEO.editor._copia=[];for(i=0;i0){x=window.confirm($trad("excsel")+"?");if(x){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().changed()}}else{i3GEO.janela.tempoMsg($trad("selum"))}},getFeatures:function(){var s,i,nsel,f,sel=[];nsel=i3GEO.editor._idsSelecionados.length;s=i3GEO.desenho.layergrafico.getSource();for(i=0;i1){temp=i3GEO.editor.jsts.run(polis,"union");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}},intersect:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>0){temp=i3GEO.editor.jsts.run(polis,"intersection");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}},symdif:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>0){temp=i3GEO.editor.jsts.run(polis,"symDifference");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}},dif:function(){if(i3GEO.editor._idsSelecionados.length<2){i3GEO.janela.tempoMsg($trad("selum"));return}var polis=i3GEO.editor.sel.getFeatures(),temp;if(polis.length>0){temp=i3GEO.editor.jsts.run(polis,"difference");if(temp){i3GEO.editor.sel.deleteFeatures();i3GEO.desenho.layergrafico.getSource().addFeatures([temp]);i3GEO.editor._idsSelecionados.push(temp.getId())}}}},draw:{rectangle:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Circle",geometryFunction:ol.interaction.Draw.createBox()});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPolygonStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},text:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Point"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){var texto=window.prompt("Texto","");evt.feature.setStyle(i3GEO.editor.getTextStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw)},point:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Point"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPointStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},lineString:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"LineString"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getLineStringStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.ativa();i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},polygon:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Polygon",freehand:i3GEO.editor._freehand});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPolygonStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.ativa();i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()},circle:function(drawendcallback){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor.removeInteracoes();var draw=new ol.interaction.Draw({type:"Circle"});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);draw.on("drawend",function(evt){evt.feature.setStyle(i3GEO.editor.getPolygonStyle());evt.feature.setId(i3GEO.util.uid());i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature);i3GEO.editor.removeInteracoes();setTimeout(function(){i3GEO.eventos.cliquePerm.ativa()},1000);i3GEO.editor.tableRefresh()});if(drawendcallback){draw.on("drawend",drawendcallback)}i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()}},removeInteracoes:function(){i3geoOL.removeInteraction(i3GEO.editor._interacoes);i3GEO.editor._interacoes=""},deleteFeatureById:function(id){var s=i3GEO.desenho.layergrafico.getSource(),f=s.getFeatureById(id);if(f){i3GEO.editor._featuresBackup.push(f.clone());s.removeFeature(f);i3GEO.editor.tableRefresh()}},edit:function(){i3GEO.editor._featuresBackup=[];var draw,nsel,f,c;nsel=i3GEO.editor._idsSelecionados.length;if(nsel==1){i3GEO.janela.tempoMsg($trad("shiftdel"));i3GEO.editor.removeInteracoes();i3GEO.eventos.cliquePerm.desativa();f=i3GEO.desenho.layergrafico.getSource().getFeatureById(i3GEO.editor._idsSelecionados[nsel-1]);i3GEO.editor._featuresBackup.push(f.clone());c=new ol.Collection();c.push(f);draw=new ol.interaction.Modify({features:c,deleteCondition:function(event){return ol.events.condition.shiftKeyOnly(event)&&ol.events.condition.singleClick(event)}});i3GEO.editor._interacoes=draw;i3GEO.Interface.openlayers.parametrosMap.interactions[0].setActive(false);i3geoOL.addInteraction(draw);i3GEO.editor.toggleSnap()}else{i3GEO.janela.tempoMsg($trad("seluma"))}},orderToFront:function(){var nsel=i3GEO.editor._idsSelecionados.length;if(nsel>0){var s,i,nsel,id,clone;s=i3GEO.desenho.layergrafico.getSource();nsel=i3GEO.editor._idsSelecionados.length;for(i=0;i0){i3GEO.editor.table(i3GEO.editor.table.seletor)}},table:function(seletor){i3GEO.editor.table.seletor=seletor;var keys,propriedades=[],id,temp,f,geos=i3GEO.desenho.layergrafico.getSource().getFeatures(),n=geos.length,ins="",botoes=[];while(n>0){n-=1;f=geos[n];id=f.getId();if(!id||id==""||id==undefined){id=i3GEO.util.uid();f.setId(id)}if(id){botoes=[];propriedades=[];botoes.push({"onclick":"i3GEO.editor.sel.un('"+id+"')","title":"Unsel","icone":"check_box_outline_blank"});botoes.push({"onclick":"i3GEO.editor.sel.all('"+id+"')","title":"Sel","icone":"check_box"});botoes.push({"onclick":"i3GEO.editor.deleteFeatureById('"+id+"')","title":"Del","icone":"delete"});botoes.push({"onclick":"i3GEO.editor.exportFeatureById('"+id+"')","title":"Export","icone":"save"});ins+=Mustache.render("{{#data}}"+i3GEO.template.botoes.listaDeIcones+"{{/data}}",{data:botoes})+" "+id+" ";keys=f.getKeys();$.each(keys,function(index,name){if(name!="geometry"&&keys.indexOf(name)<0){propriedades.push(name+" = "+f.get(name))}});ins+=propriedades.join(" ")+""}}if(geos.length===0){ins=$trad("meneditor2")}ins=''+''+ins+"
";$(seletor).html(ins)},properties:function(seletor){i3GEO.editor.properties.seletor=seletor;var template=""+""+""+"
";var hash=[{"label":"Tolerância Snap","value":i3GEO.editor._tolerance,"typesymbol":"pixelTolerance","class":"","id":"i3GEOeditorpixelTolerance"},{"label":"Cor do contorno","value":i3GEO.editor._simbologia.strokeColor,"typesymbol":"strokeColor","class":"i3geoFormIconeAquarela","id":"i3GEOeditorstrokeColor"},{"label":"Cor do preenchimento","value":i3GEO.editor._simbologia.fillColor,"typesymbol":"fillColor","class":"i3geoFormIconeAquarela","id":"i3GEOeditorfillColor"},{"label":"Cor da fonte","value":i3GEO.editor._simbologia.fontColor,"typesymbol":"fontColor","class":"i3geoFormIconeAquarela","id":"i3GEOeditorfontColor"},{"label":"Tamanho da fonte","value":i3GEO.editor._simbologia.fontSize,"typesymbol":"fontSize","class":"","id":"i3GEOeditorfontSize"},{"label":"Opacidade (de 0 a 1)","value":i3GEO.editor._simbologia.opacidade,"typesymbol":"opacidade","class":"","id":"i3GEOeditoropacidade"},{"label":"Largura da linha/contorno","value":i3GEO.editor._simbologia.strokeWidth,"typesymbol":"strokeWidth","class":"","id":"i3GEOeditorstrokeWidth"},{"label":"Url de uma imagem","value":i3GEO.editor._simbologia.externalGraphic,"typesymbol":"externalGraphic","class":"","id":"i3GEOeditorexternalGraphic"},{"label":"Largura da imagem","value":i3GEO.editor._simbologia.graphicWidth,"typesymbol":"graphicWidth","class":"","id":"i3GEOeditorgraphicWidth"},{"label":"Altura da imagem","value":i3GEO.editor._simbologia.graphicHeight,"typesymbol":"graphicHeight","class":"","id":"i3GEOeditorgraphicHeight"}];ins=''+'
';ins+="
";ins+="
";ins+=Mustache.render("{{#data}}"+template+"{{/data}}",{data:hash});ins+="
";$(seletor).html(ins);$(seletor).find(".i3geoFormIconeAquarela").click(function(){if(this.firstChild){i3GEO.util.abreCor("",$(this).find("input")[0].id)}else{i3GEO.util.abreCor("",this.id)}})},setPropertie:function(id){var obj=$i(id),s,i,nsel,f;if(obj.name=="pixelTolerance"){i3GEO.editor._snap.set("pixelTolerance",obj.value*1);return}i3GEO.editor._simbologia[obj.name]=obj.value;nsel=i3GEO.editor._idsSelecionados.length;s=i3GEO.desenho.layergrafico.getSource();for(i=0;i'+caixa+' X: '+''+''+''+' Y: '+''+''+'',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='
'+" ";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");x[2]=$.number(x[2],2,$trad("dec"),$trad("mil"));y[2]=$.number(y[2],2,$trad("dec"),$trad("mil"));if($i(prefixo+"xg")){$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2]}i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"