Commit 4c34f89ef68d779ee804c37079e334e9cbedf024

Authored by Edmar Moretti
1 parent 815f97e1
Exists in master

Inclusão de parâmetros para controle da esacal gráfica e legenda em ogc.php

Showing 2 changed files with 120 additions and 113 deletions   Show diff stats
ogc.php
... ... @@ -938,123 +938,14 @@ else{
938 938 //
939 939 //a imagem do mapa recebera a legenda
940 940 //
941   - $legenda = $_GET["legenda"];
942   - if((isset($legenda)) && (strtolower($legenda) == "sim")){
943   - $leg = $oMap->legend;
944   - $leg->set("status",MS_EMBED);
945   - if(!empty($_GET["legenda_imagecolor"])){
946   - $_GET["legenda_imagecolor"] = str_replace(","," ",$_GET["legenda_imagecolor"]);
947   - $ncor = explode(" ",$_GET["legenda_imagecolor"]);
948   - $cor = $leg->imagecolor;
949   - $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
950   - $req->setParameter("TRANSPARENT",0);
951   - }
952   - if(!empty($_GET["legenda_keysizex"])){
953   - $leg->set("keysizex",$_GET["legenda_keysizex"]);
954   - }
955   - if(!empty($_GET["legenda_keysizey"])){
956   - $leg->set("keysizey",$_GET["legenda_keysizey"]);
957   - }
958   - if(!empty($_GET["legenda_keyspacingx"])){
959   - $leg->set("keyspacingx",$_GET["legenda_keyspacingx"]);
960   - }
961   - //ul|uc|ur|ll|lc|lr
962   - if(!empty($_GET["legenda_position"])){
963   - if($_GET["legenda_position"] == "ul") $leg->set("position",MS_UL);
964   - if($_GET["legenda_position"] == "uc") $leg->set("position",MS_UC);
965   - if($_GET["legenda_position"] == "ur") $leg->set("position",MS_UR);
966   - if($_GET["legenda_position"] == "ll") $leg->set("position",MS_LL);
967   - if($_GET["legenda_position"] == "lc") $leg->set("position",MS_LC);
968   - if($_GET["legenda_position"] == "lr") $leg->set("position",MS_LR);
969   - }
970   - if(!empty($_GET["legenda_keyspacingy"])){
971   - $leg->set("keyspacingy",$_GET["legenda_keyspacingy"]);
972   - }
973   - if(!empty($_GET["legenda_outlinecolor"])){
974   - $_GET["legenda_outlinecolor"] = str_replace(","," ",$_GET["legenda_outlinecolor"]);
975   - $ncor = explode(" ",$_GET["legenda_outlinecolor"]);
976   - $cor = $leg->outlinecolor;
977   - $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
978   - }
979   - //fonte e size so com truetype
980   - if (!empty($_GET["legenda_font"])){
981   - $label = $leg->label;
982   - $label->updatefromstring("LABEL TYPE TRUETYPE END");
983   - $label->set("font",$_GET["legenda_font"]);
984   - }
985   - if (!empty($_GET["legenda_size"])){
986   - $label = $leg->label;
987   - $label->updatefromstring("LABEL TYPE TRUETYPE END");
988   - if(empty($_GET["legenda_font"])){
989   - $label->set("font","arial");
990   - }
991   - $label->set("size",$_GET["legenda_size"]);
992   - }
  941 + if((isset($_GET["legenda"])) && (strtolower($_GET["legenda"]) == "sim")){
  942 + processaLegenda();
993 943 }
994 944 //
995 945 //a imagem do mapa recebera a barra de escala
996 946 //
997 947 if((isset($_GET["escala"])) && (strtolower($_GET["escala"]) == "sim")){
998   - $eb = $oMap->scalebar;
999   - $eb->set("status",MS_EMBED);
1000   - if(!empty($_GET["escala_width"])){
1001   - $eb->set("width",$_GET["escala_width"]);
1002   - }
1003   - if(!empty($_GET["escala_height"])){
1004   - $eb->set("height",$_GET["escala_height"]);
1005   - }
1006   - //0 ou 1
1007   - if(!empty($_GET["escala_style"])){
1008   - $eb->set("style",$_GET["escala_style"]);
1009   - }
1010   - if(!empty($_GET["escala_intervals"])){
1011   - $eb->set("intervals",$_GET["escala_intervals"]);
1012   - }
1013   - //MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD, MS_PIXELS, MS_NAUTICALMILES
1014   - if(!empty($_GET["escala_units"])){
1015   - $eb->set("units",$_GET["escala_units"]);
1016   - }
1017   - if(!empty($_GET["escala_color"])){
1018   - $_GET["escala_color"] = str_replace(","," ",$_GET["escala_color"]);
1019   - $ncor = explode(" ",$_GET["escala_color"]);
1020   - $cor = $eb->color;
1021   - $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
1022   - }
1023   - if(!empty($_GET["escala_backgroundcolor"])){
1024   - $_GET["escala_backgroundcolor"] = str_replace(","," ",$_GET["escala_backgroundcolor"]);
1025   - $ncor = explode(" ",$_GET["escala_backgroundcolor"]);
1026   - $cor = $eb->backgroundcolor;
1027   - $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
1028   - }
1029   - if(!empty($_GET["escala_outlinecolor"])){
1030   - $_GET["escala_outlinecolor"] = str_replace(","," ",$_GET["escala_outlinecolor"]);
1031   - $ncor = explode(" ",$_GET["escala_outlinecolor"]);
1032   - $cor = $eb->outlinecolor;
1033   - $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
1034   - }
1035   - //ul|uc|ur|ll|lc|lr
1036   - if(!empty($_GET["escala_position"])){
1037   - if($_GET["escala_position"] == "ul") $eb->set("position",MS_UL);
1038   - if($_GET["escala_position"] == "uc") $eb->set("position",MS_UC);
1039   - if($_GET["escala_position"] == "ur") $eb->set("position",MS_UR);
1040   - if($_GET["escala_position"] == "ll") $eb->set("position",MS_LL);
1041   - if($_GET["escala_position"] == "lc") $eb->set("position",MS_LC);
1042   - if($_GET["escala_position"] == "lr") $eb->set("position",MS_LR);
1043   - }
1044   - //fonte e size so com truetype
1045   - if (!empty($_GET["escala_font"])){
1046   - $label = $eb->label;
1047   - $label->updatefromstring("LABEL TYPE TRUETYPE END");
1048   - $label->set("font",$_GET["escala_font"]);
1049   - }
1050   - if (!empty($_GET["escala_size"])){
1051   - $label = $eb->label;
1052   - $label->updatefromstring("LABEL TYPE TRUETYPE END");
1053   - if(empty($_GET["escala_size"])){
1054   - $label->set("font","arial");
1055   - }
1056   - $label->set("size",$_GET["escala_size"]);
1057   - }
  948 + processaEscala();
1058 949 }
1059 950 $oMap->setSymbolSet($locaplic."/symbols/".basename($oMap->symbolsetfilename));
1060 951 $oMap->setFontSet($locaplic."/symbols/".basename($oMap->fontsetfilename));
... ... @@ -1909,6 +1800,122 @@ function processaPluginI3geo(){
1909 1800 }
1910 1801 }
1911 1802 }
  1803 +function processaEscala(){
  1804 + global $oMap, $locaplic, $req;
  1805 + $eb = $oMap->scalebar;
  1806 + $eb->set("status",MS_EMBED);
  1807 + if(!empty($_GET["escala_width"])){
  1808 + $eb->set("width",$_GET["escala_width"]);
  1809 + }
  1810 + if(!empty($_GET["escala_height"])){
  1811 + $eb->set("height",$_GET["escala_height"]);
  1812 + }
  1813 + //0 ou 1
  1814 + if(!empty($_GET["escala_style"])){
  1815 + $eb->set("style",$_GET["escala_style"]);
  1816 + }
  1817 + if(!empty($_GET["escala_intervals"])){
  1818 + $eb->set("intervals",$_GET["escala_intervals"]);
  1819 + }
  1820 + //MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD, MS_PIXELS, MS_NAUTICALMILES
  1821 + if(!empty($_GET["escala_units"])){
  1822 + $eb->set("units",$_GET["escala_units"]);
  1823 + }
  1824 + if(!empty($_GET["escala_color"])){
  1825 + $_GET["escala_color"] = str_replace(","," ",$_GET["escala_color"]);
  1826 + $ncor = explode(" ",$_GET["escala_color"]);
  1827 + $cor = $eb->color;
  1828 + $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
  1829 + }
  1830 + if(!empty($_GET["escala_backgroundcolor"])){
  1831 + $_GET["escala_backgroundcolor"] = str_replace(","," ",$_GET["escala_backgroundcolor"]);
  1832 + $ncor = explode(" ",$_GET["escala_backgroundcolor"]);
  1833 + $cor = $eb->backgroundcolor;
  1834 + $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
  1835 + }
  1836 + if(!empty($_GET["escala_outlinecolor"])){
  1837 + $_GET["escala_outlinecolor"] = str_replace(","," ",$_GET["escala_outlinecolor"]);
  1838 + $ncor = explode(" ",$_GET["escala_outlinecolor"]);
  1839 + $cor = $eb->outlinecolor;
  1840 + $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
  1841 + }
  1842 + //ul|uc|ur|ll|lc|lr
  1843 + if(!empty($_GET["escala_position"])){
  1844 + if($_GET["escala_position"] == "ul") $eb->set("position",MS_UL);
  1845 + if($_GET["escala_position"] == "uc") $eb->set("position",MS_UC);
  1846 + if($_GET["escala_position"] == "ur") $eb->set("position",MS_UR);
  1847 + if($_GET["escala_position"] == "ll") $eb->set("position",MS_LL);
  1848 + if($_GET["escala_position"] == "lc") $eb->set("position",MS_LC);
  1849 + if($_GET["escala_position"] == "lr") $eb->set("position",MS_LR);
  1850 + }
  1851 + //fonte e size so com truetype
  1852 + if (!empty($_GET["escala_font"])){
  1853 + $label = $eb->label;
  1854 + $label->updatefromstring("LABEL TYPE TRUETYPE END");
  1855 + $label->set("font",$_GET["escala_font"]);
  1856 + }
  1857 + if (!empty($_GET["escala_size"])){
  1858 + $label = $eb->label;
  1859 + $label->updatefromstring("LABEL TYPE TRUETYPE END");
  1860 + if(empty($_GET["escala_size"])){
  1861 + $label->set("font","arial");
  1862 + }
  1863 + $label->set("size",$_GET["escala_size"]);
  1864 + }
  1865 +}
  1866 +function processaLegenda(){
  1867 + global $oMap, $locaplic, $req;
  1868 + $leg = $oMap->legend;
  1869 + $leg->set("status",MS_EMBED);
  1870 + if(!empty($_GET["legenda_imagecolor"])){
  1871 + $_GET["legenda_imagecolor"] = str_replace(","," ",$_GET["legenda_imagecolor"]);
  1872 + $ncor = explode(" ",$_GET["legenda_imagecolor"]);
  1873 + $cor = $leg->imagecolor;
  1874 + $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
  1875 + $req->setParameter("TRANSPARENT",0);
  1876 + }
  1877 + if(!empty($_GET["legenda_keysizex"])){
  1878 + $leg->set("keysizex",$_GET["legenda_keysizex"]);
  1879 + }
  1880 + if(!empty($_GET["legenda_keysizey"])){
  1881 + $leg->set("keysizey",$_GET["legenda_keysizey"]);
  1882 + }
  1883 + if(!empty($_GET["legenda_keyspacingx"])){
  1884 + $leg->set("keyspacingx",$_GET["legenda_keyspacingx"]);
  1885 + }
  1886 + //ul|uc|ur|ll|lc|lr
  1887 + if(!empty($_GET["legenda_position"])){
  1888 + if($_GET["legenda_position"] == "ul") $leg->set("position",MS_UL);
  1889 + if($_GET["legenda_position"] == "uc") $leg->set("position",MS_UC);
  1890 + if($_GET["legenda_position"] == "ur") $leg->set("position",MS_UR);
  1891 + if($_GET["legenda_position"] == "ll") $leg->set("position",MS_LL);
  1892 + if($_GET["legenda_position"] == "lc") $leg->set("position",MS_LC);
  1893 + if($_GET["legenda_position"] == "lr") $leg->set("position",MS_LR);
  1894 + }
  1895 + if(!empty($_GET["legenda_keyspacingy"])){
  1896 + $leg->set("keyspacingy",$_GET["legenda_keyspacingy"]);
  1897 + }
  1898 + if(!empty($_GET["legenda_outlinecolor"])){
  1899 + $_GET["legenda_outlinecolor"] = str_replace(","," ",$_GET["legenda_outlinecolor"]);
  1900 + $ncor = explode(" ",$_GET["legenda_outlinecolor"]);
  1901 + $cor = $leg->outlinecolor;
  1902 + $cor->setRGB($ncor[0],$ncor[1],$ncor[2]);
  1903 + }
  1904 + //fonte e size so com truetype
  1905 + if (!empty($_GET["legenda_font"])){
  1906 + $label = $leg->label;
  1907 + $label->updatefromstring("LABEL TYPE TRUETYPE END");
  1908 + $label->set("font",$_GET["legenda_font"]);
  1909 + }
  1910 + if (!empty($_GET["legenda_size"])){
  1911 + $label = $leg->label;
  1912 + $label->updatefromstring("LABEL TYPE TRUETYPE END");
  1913 + if(empty($_GET["legenda_font"])){
  1914 + $label->set("font","arial");
  1915 + }
  1916 + $label->set("size",$_GET["legenda_size"]);
  1917 + }
  1918 +}
1912 1919 //utilizada para obter os dados default quando se utiliza o plugin parametrossql
1913 1920 function execProg($prog){
1914 1921 //$retorno variavel deve ser retornada pelo programa $prog
... ...
ogc/dicionario.js
... ... @@ -67,7 +67,7 @@ g_traducao_ogc =
67 67 es : ""
68 68 }],
69 69 "jumbotron" : [{
70   - pt : "Navegue pela &aacute;rvore ao lado para localizar o tema desejado. Clicando-se em um tema, &eacute; mostrado o endere&ccedil;o do servi&ccedil;o OGC. Os servi&ccedil;os s&atilde;o Web Wervices que possibilitam o acesso aos dados dispon&iacute;veis nessa instala&ccedil;&atilde;o do i3Geo. A lista de temas baseia-se nas configura&ccedil;&otilde;es espec&iacute;ficas de cada servidor onde o i3Geoest&aacute; instalado. Voc&ecirc; pode usar um Web Service para acessar os dados configurados nesse servidor por meio de outros softwares de geoprocessamento, como o <a href='http://www.gvsig.gva.es/index.php?id=gvsig&L=0'>gvSIG.</a> Para maiores informa&ccedil;&otilde;es sobre o uso de web services, veja <a href='http://www.opengeospatial.org/standards' target=blank>http://www.opengeospatial.org/standards</a>",
  70 + pt : "Navegue pela &aacute;rvore ao lado para localizar o tema desejado. Clicando-se em um tema, &eacute; mostrado o endere&ccedil;o do servi&ccedil;o OGC. Os servi&ccedil;os s&atilde;o Web Wervices que possibilitam o acesso aos dados dispon&iacute;veis nessa instala&ccedil;&atilde;o do i3Geo. A lista de temas baseia-se nas configura&ccedil;&otilde;es espec&iacute;ficas de cada servidor onde o i3Geoest&aacute; instalado. Voc&ecirc; pode usar um Web Service para acessar os dados configurados nesse servidor por meio de outros softwares de geoprocessamento, como o <a href='http://www.gvsig.gva.es/index.php?id=gvsig&L=0'>gvSIG.</a> Para maiores informa&ccedil;&otilde;es sobre o uso de web services, veja <a href='http://www.opengeospatial.org/standards' target=blank>http://www.opengeospatial.org/standards</a>. <div class='alert alert-info' role='alert'>O i3Geo possu&iacute; alguns par&acirc;metros especiais, que n&atilde;o fazem parte dos padr&otilde;es de servi&ccedil;os OGC. Para ver esses par&acirc;metros acesse <a href='../ogc.php' target='_blank' class='alert-link' >ogc.php</a></div>",
71 71 en : "",
72 72 es : ""
73 73 }],
... ...