Commit 3ca877e9c2a2ea790b003552b0fefdee1f1f7be0
1 parent
5df74c28
Exists in
master
and in
7 other branches
--no commit message
Showing
5 changed files
with
49 additions
and
28 deletions
Show diff stats
classesphp/proxy.php
@@ -21,8 +21,14 @@ if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ | @@ -21,8 +21,14 @@ if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ | ||
21 | $resultado = curl_exec($ch); | 21 | $resultado = curl_exec($ch); |
22 | if($_GET["tipoRetornoProxy"] == "string"){ | 22 | if($_GET["tipoRetornoProxy"] == "string"){ |
23 | echo '"'.$resultado.'"'; | 23 | echo '"'.$resultado.'"'; |
24 | + exit; | ||
24 | } | 25 | } |
25 | -else{ | ||
26 | - echo $resultado; | 26 | + |
27 | +if($_GET["tipoRetornoProxy"] == "json"){ | ||
28 | + $r = array($resultado); | ||
29 | + //echo json_encode(str_replace(array("\n","\r","\t"),"",$r)); | ||
30 | + echo json_encode($r); | ||
31 | + exit; | ||
27 | } | 32 | } |
33 | +echo $resultado; | ||
28 | ?> | 34 | ?> |
29 | \ No newline at end of file | 35 | \ No newline at end of file |
ferramentas/editorol/editorol.js
@@ -748,15 +748,15 @@ i3GEO.editorOL = | @@ -748,15 +748,15 @@ i3GEO.editorOL = | ||
748 | } | 748 | } |
749 | }, | 749 | }, |
750 | captura : function(x,y,tema) { | 750 | captura : function(x,y,tema) { |
751 | - var d = 0.1, | 751 | + var d = 0.1, |
752 | layer = i3geoOL.getLayersByName(tema)[0], | 752 | layer = i3geoOL.getLayersByName(tema)[0], |
753 | xy = [x,y], | 753 | xy = [x,y], |
754 | u = layer.getSource().getUrls()[0], | 754 | u = layer.getSource().getUrls()[0], |
755 | poligono, retorno; | 755 | poligono, retorno; |
756 | - | 756 | + |
757 | u += "&REQUEST=getfeature&service=wfs&version=1.0.0"; | 757 | u += "&REQUEST=getfeature&service=wfs&version=1.0.0"; |
758 | u += "&OUTPUTFORMAT=gml2&typename=undefined"; | 758 | u += "&OUTPUTFORMAT=gml2&typename=undefined"; |
759 | - | 759 | + |
760 | // remove parametros nao desejados | 760 | // remove parametros nao desejados |
761 | if (i3GEO.Interface.openlayers.googleLike === true) { | 761 | if (i3GEO.Interface.openlayers.googleLike === true) { |
762 | u += "&SRS=EPSG:3857"; | 762 | u += "&SRS=EPSG:3857"; |
@@ -790,11 +790,26 @@ i3GEO.editorOL = | @@ -790,11 +790,26 @@ i3GEO.editorOL = | ||
790 | "&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>" + poligono | 790 | "&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>" + poligono |
791 | + "</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>"; | 791 | + "</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>"; |
792 | retorno = function(r){ | 792 | retorno = function(r){ |
793 | + //FIXME nao funciona | ||
793 | //parser gml | 794 | //parser gml |
795 | + var f,c,format; | ||
796 | + /* | ||
797 | + format = new ol.format.GML2({ | ||
798 | + featurePrefix: "ms", | ||
799 | + geometryName : "msGeometry", | ||
800 | + featureNS : "http://mapserver.gis.umn.edu/mapserver" | ||
801 | + }); | ||
802 | + */ | ||
803 | + //console.info(r[0]) | ||
804 | + format = new ol.format.GML2(); | ||
805 | + f = format.readFeatures(r[0]); | ||
806 | + //console.info(f); | ||
807 | + c = i3GEO.desenho.layergrafico.getSource(); | ||
808 | + c.addFeature(f); | ||
794 | }; | 809 | }; |
795 | u = i3GEO.configura.locaplic + "/classesphp/proxy.php?" | 810 | u = i3GEO.configura.locaplic + "/classesphp/proxy.php?" |
796 | + u | 811 | + u |
797 | - + "&tipoRetornoProxy=string"; | 812 | + + "&tipoRetornoProxy=json"; |
798 | cpJSON.call(u, "foo", retorno, ""); | 813 | cpJSON.call(u, "foo", retorno, ""); |
799 | }, | 814 | }, |
800 | salvaGeometrias : function() { | 815 | salvaGeometrias : function() { |
@@ -1085,7 +1100,7 @@ i3GEO.editorOL = | @@ -1085,7 +1100,7 @@ i3GEO.editorOL = | ||
1085 | fill: new ol.style.Fill({ | 1100 | fill: new ol.style.Fill({ |
1086 | color: 'rgba(' + i3GEO.editorOL.simbologia.fillColor + ',' + i3GEO.editorOL.simbologia.opacidade + ')' | 1101 | color: 'rgba(' + i3GEO.editorOL.simbologia.fillColor + ',' + i3GEO.editorOL.simbologia.opacidade + ')' |
1087 | }) | 1102 | }) |
1088 | - }) | 1103 | + }) |
1089 | ); | 1104 | ); |
1090 | evt.feature.setId(i3GEO.util.uid()); | 1105 | evt.feature.setId(i3GEO.util.uid()); |
1091 | i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature); | 1106 | i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature); |
@@ -1170,7 +1185,7 @@ i3GEO.editorOL = | @@ -1170,7 +1185,7 @@ i3GEO.editorOL = | ||
1170 | fill: new ol.style.Fill({ | 1185 | fill: new ol.style.Fill({ |
1171 | color: 'rgba(' + i3GEO.editorOL.simbologia.fillColor + ',' + i3GEO.editorOL.simbologia.opacidade + ')' | 1186 | color: 'rgba(' + i3GEO.editorOL.simbologia.fillColor + ',' + i3GEO.editorOL.simbologia.opacidade + ')' |
1172 | }) | 1187 | }) |
1173 | - }) | 1188 | + }) |
1174 | ); | 1189 | ); |
1175 | evt.feature.setId(i3GEO.util.uid()); | 1190 | evt.feature.setId(i3GEO.util.uid()); |
1176 | i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature); | 1191 | i3GEO.desenho.layergrafico.getSource().addFeature(evt.feature); |
@@ -1407,7 +1422,7 @@ i3GEO.editorOL = | @@ -1407,7 +1422,7 @@ i3GEO.editorOL = | ||
1407 | temp.onclick = function(){ | 1422 | temp.onclick = function(){ |
1408 | i3GEO.editorOL.listaGeometrias(); | 1423 | i3GEO.editorOL.listaGeometrias(); |
1409 | }; | 1424 | }; |
1410 | - i3GEOpanelEditor.appendChild(temp); | 1425 | + i3GEOpanelEditor.appendChild(temp); |
1411 | } | 1426 | } |
1412 | //TODO abrir em uma janela flutuante interna | 1427 | //TODO abrir em uma janela flutuante interna |
1413 | if (botoes.ajuda === true) { | 1428 | if (botoes.ajuda === true) { |
@@ -1538,7 +1553,7 @@ i3GEO.editorOL = | @@ -1538,7 +1553,7 @@ i3GEO.editorOL = | ||
1538 | 1553 | ||
1539 | /* | 1554 | /* |
1540 | if (botoes.salva === true) { | 1555 | if (botoes.salva === true) { |
1541 | - | 1556 | + |
1542 | button = new OpenLayers.Control.Button({ | 1557 | button = new OpenLayers.Control.Button({ |
1543 | displayClass : "editorOLsalva", | 1558 | displayClass : "editorOLsalva", |
1544 | trigger : function() { | 1559 | trigger : function() { |
@@ -1549,11 +1564,11 @@ i3GEO.editorOL = | @@ -1549,11 +1564,11 @@ i3GEO.editorOL = | ||
1549 | }); | 1564 | }); |
1550 | controles.push(button); | 1565 | controles.push(button); |
1551 | adiciona = true; | 1566 | adiciona = true; |
1552 | - | 1567 | + |
1553 | } | 1568 | } |
1554 | if (botoes.identifica === true) { | 1569 | if (botoes.identifica === true) { |
1555 | //TODO incluir codigo ol3 | 1570 | //TODO incluir codigo ol3 |
1556 | - | 1571 | + |
1557 | botaoIdentifica = | 1572 | botaoIdentifica = |
1558 | new OpenLayers.Control.WMSGetFeatureInfo( | 1573 | new OpenLayers.Control.WMSGetFeatureInfo( |
1559 | { | 1574 | { |
@@ -1630,7 +1645,7 @@ i3GEO.editorOL = | @@ -1630,7 +1645,7 @@ i3GEO.editorOL = | ||
1630 | // button.events.register("getfeatureinfo", this, showInfo); | 1645 | // button.events.register("getfeatureinfo", this, showInfo); |
1631 | controles.push(botaoIdentifica); | 1646 | controles.push(botaoIdentifica); |
1632 | adiciona = true; | 1647 | adiciona = true; |
1633 | - | 1648 | + |
1634 | } | 1649 | } |
1635 | 1650 | ||
1636 | */ | 1651 | */ |
@@ -1850,7 +1865,7 @@ i3GEO.editorOL = | @@ -1850,7 +1865,7 @@ i3GEO.editorOL = | ||
1850 | + ' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>' | 1865 | + ' <td><input style=cursor:pointer onclick="i3GEO.editorOL.snap()" type="checkbox" id="target_edge" /></td><td><input onchange="i3GEO.editorOL.snap()" id="target_edgeTolerance" type="text" size="3" value=15 /></td>' |
1851 | + ' </tr>' | 1866 | + ' </tr>' |
1852 | + '</table>' | 1867 | + '</table>' |
1853 | - | 1868 | + |
1854 | + '<br />' | 1869 | + '<br />' |
1855 | + '<p class=paragrafo ><b>Divide intersecção ao digitalizar</b></p>' | 1870 | + '<p class=paragrafo ><b>Divide intersecção ao digitalizar</b></p>' |
1856 | + '<table class=lista7 >' | 1871 | + '<table class=lista7 >' |
@@ -2127,8 +2142,8 @@ i3GEO.editorOL = | @@ -2127,8 +2142,8 @@ i3GEO.editorOL = | ||
2127 | uniaojts : function(geoms) { | 2142 | uniaojts : function(geoms) { |
2128 | var n = geoms.length, | 2143 | var n = geoms.length, |
2129 | fwkt = new ol.format.WKT(), | 2144 | fwkt = new ol.format.WKT(), |
2130 | - rwkt = new jsts.io.WKTReader(), | ||
2131 | - wwkt = new jsts.io.WKTWriter(), | 2145 | + rwkt = new jsts.io.WKTReader(), |
2146 | + wwkt = new jsts.io.WKTWriter(), | ||
2132 | g, i, uniao; | 2147 | g, i, uniao; |
2133 | if (n > 1) { | 2148 | if (n > 1) { |
2134 | uniao = fwkt.writeFeatures([geoms[0]]); | 2149 | uniao = fwkt.writeFeatures([geoms[0]]); |
ferramentas/melhorcaminho/index.js
@@ -369,7 +369,7 @@ i3GEOF.melhorcaminho = { | @@ -369,7 +369,7 @@ i3GEOF.melhorcaminho = { | ||
369 | executa: function(){ | 369 | executa: function(){ |
370 | if(i3GEOF.melhorcaminho.aguarde.visibility === "visible") | 370 | if(i3GEOF.melhorcaminho.aguarde.visibility === "visible") |
371 | {return;} | 371 | {return;} |
372 | - var raster = "",ptax,ptbx,ptby,ptby,pta,ptb,lut=[],lutObjs,n,i; | 372 | + var raster = "",ptax,ptbx,ptby,pta,ptb,lut=[],lutObjs,n,i; |
373 | //pega tema com raster | 373 | //pega tema com raster |
374 | if($i("i3GEOmelhorcaminhoRaster")){ | 374 | if($i("i3GEOmelhorcaminhoRaster")){ |
375 | raster = $i("i3GEOmelhorcaminhoRaster").value; | 375 | raster = $i("i3GEOmelhorcaminhoRaster").value; |
ferramentas/melhorcaminho/index.php
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
2 | -<html xmlns="http://www.w3.org/1999/xhtml"> | 2 | +<html> |
3 | <head> | 3 | <head> |
4 | <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | 4 | <meta http-equiv="content-type" content="text/html; charset=utf-8"/> |
5 | <title>Twitter</title> | 5 | <title>Twitter</title> |
6 | - <!-- Dependencies --> | 6 | + <!-- Dependencies --> |
7 | <script src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js"></script> | 7 | <script src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js"></script> |
8 | <!-- Source File --> | 8 | <!-- Source File --> |
9 | <script src="http://yui.yahooapis.com/2.9.0/build/cookie/cookie-min.js"></script> | 9 | <script src="http://yui.yahooapis.com/2.9.0/build/cookie/cookie-min.js"></script> |
10 | <script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> | 10 | <script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> |
11 | - | 11 | + |
12 | </head> | 12 | </head> |
13 | <body style='font-family: helvetica;' > | 13 | <body style='font-family: helvetica;' > |
14 | <div style="z-index:10;width:250px;position:absolute;top:10px;left:100px;text-align:left;"> | 14 | <div style="z-index:10;width:250px;position:absolute;top:10px;left:100px;text-align:left;"> |
15 | - <input id="palavra" type="text" value='<?php echo $_GET["q"];?>' style="width:150px;"/><input type="button" value="Localizar" onclick="atualiza();"/></form> | 15 | + <form><input id="palavra" type="text" value='<?php echo $_GET["q"];?>' style="width:150px;"/><input type="button" value="Localizar" onclick="atualiza();"/></form> |
16 | </div> | 16 | </div> |
17 | <div id="map" style="width:500px;height:500px"></div> | 17 | <div id="map" style="width:500px;height:500px"></div> |
18 | <script src="index.js" type="text/javascript"></script> | 18 | <script src="index.js" type="text/javascript"></script> |
ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/models/Result.js
1 | -/* | 1 | +/* |
2 | * Copyright 2012 OSBI Ltd | 2 | * Copyright 2012 OSBI Ltd |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | - | 16 | + |
17 | /** | 17 | /** |
18 | * Holds the resultset for a query, and notifies plugins when resultset updated | 18 | * Holds the resultset for a query, and notifies plugins when resultset updated |
19 | */ | 19 | */ |
@@ -21,12 +21,12 @@ var Result = Backbone.Model.extend({ | @@ -21,12 +21,12 @@ var Result = Backbone.Model.extend({ | ||
21 | 21 | ||
22 | result: null, | 22 | result: null, |
23 | firstRun: false, | 23 | firstRun: false, |
24 | - | 24 | + |
25 | initialize: function(args, options) { | 25 | initialize: function(args, options) { |
26 | // Keep reference to query | 26 | // Keep reference to query |
27 | this.query = options.query; | 27 | this.query = options.query; |
28 | }, | 28 | }, |
29 | - | 29 | + |
30 | parse: function(response) { | 30 | parse: function(response) { |
31 | // Show the UI if hidden | 31 | // Show the UI if hidden |
32 | $(this.workspace).unblock(); | 32 | $(this.workspace).unblock(); |
@@ -43,11 +43,11 @@ var Result = Backbone.Model.extend({ | @@ -43,11 +43,11 @@ var Result = Backbone.Model.extend({ | ||
43 | hasRun: function() { | 43 | hasRun: function() { |
44 | return this.firstRun; | 44 | return this.firstRun; |
45 | }, | 45 | }, |
46 | - | ||
47 | - lastresult: function () { | 46 | + |
47 | + lastresult: function() { | ||
48 | return this.result; | 48 | return this.result; |
49 | }, | 49 | }, |
50 | - | 50 | + |
51 | url: function() { | 51 | url: function() { |
52 | return encodeURI(this.query.url() + "/result/" + this.query.get('formatter')); | 52 | return encodeURI(this.query.url() + "/result/" + this.query.get('formatter')); |
53 | } | 53 | } |