Commit b30d650fc6580abd7bfe2d589d5b5b254c03d5b2
1 parent
e9481719
Exists in
master
and in
7 other branches
Correção na ferramenta de impressão no caso de interfaces googlemaps
Showing
5 changed files
with
32 additions
and
8 deletions
Show diff stats
ferramentas/imprimir/a4lpaisagempdf.php
@@ -43,7 +43,12 @@ substituiCon($temp,$postgis_mapa); | @@ -43,7 +43,12 @@ substituiCon($temp,$postgis_mapa); | ||
43 | $map = ms_newMapObj($temp); | 43 | $map = ms_newMapObj($temp); |
44 | 44 | ||
45 | if($interface == "googlemaps") | 45 | if($interface == "googlemaps") |
46 | -{$map->setProjection("init=epsg:4618,a=6378137,b=6378137");} | 46 | +{ |
47 | + $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | ||
48 | + $map->set("units",MS_METERS); | ||
49 | + $map->preparequery(); | ||
50 | + $map->set("scaledenom",$map->scaledenom * 100000); | ||
51 | +} | ||
47 | 52 | ||
48 | $w = $map->width; | 53 | $w = $map->width; |
49 | $h = $map->height; | 54 | $h = $map->height; |
@@ -160,4 +165,4 @@ if ($wLegenda > $wLegendaMax * 1.5) | @@ -160,4 +165,4 @@ if ($wLegenda > $wLegendaMax * 1.5) | ||
160 | $pdf->Image($pathlegenda, 4, 21,$nW); | 165 | $pdf->Image($pathlegenda, 4, 21,$nW); |
161 | $pdf->Close(); | 166 | $pdf->Close(); |
162 | $pdf->Output("mapa.pdf", true); | 167 | $pdf->Output("mapa.pdf", true); |
163 | -?> | ||
164 | \ No newline at end of file | 168 | \ No newline at end of file |
169 | +?> |
ferramentas/imprimir/aggpng.php
@@ -71,7 +71,12 @@ $of->set("driver","AGG/PNG"); | @@ -71,7 +71,12 @@ $of->set("driver","AGG/PNG"); | ||
71 | $of->set("imagemode","RGB"); | 71 | $of->set("imagemode","RGB"); |
72 | $map = ms_newMapObj($temp); | 72 | $map = ms_newMapObj($temp); |
73 | if($interface == "googlemaps") | 73 | if($interface == "googlemaps") |
74 | -{$map->setProjection("init=epsg:4618,a=6378137,b=6378137");} | 74 | +{ |
75 | + $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | ||
76 | + $map->set("units",MS_METERS); | ||
77 | + $map->preparequery(); | ||
78 | + $map->set("scaledenom",$map->scaledenom * 100000); | ||
79 | +} | ||
75 | //$legenda =$map->legend; | 80 | //$legenda =$map->legend; |
76 | //$legenda->set("status",MS_EMBED); | 81 | //$legenda->set("status",MS_EMBED); |
77 | //altera o nome das classes vazias | 82 | //altera o nome das classes vazias |
@@ -146,4 +151,4 @@ echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' | @@ -146,4 +151,4 @@ echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' | ||
146 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; | 151 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; |
147 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; | 152 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; |
148 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; | 153 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; |
149 | -?> | ||
150 | \ No newline at end of file | 154 | \ No newline at end of file |
155 | +?> |
ferramentas/imprimir/geotif.php
@@ -70,7 +70,12 @@ $of->set("driver","GDAL/GTiff"); | @@ -70,7 +70,12 @@ $of->set("driver","GDAL/GTiff"); | ||
70 | $of->set("imagemode","RGB"); | 70 | $of->set("imagemode","RGB"); |
71 | $map = ms_newMapObj($temp); | 71 | $map = ms_newMapObj($temp); |
72 | if($interface == "googlemaps") | 72 | if($interface == "googlemaps") |
73 | -{$map->setProjection("init=epsg:4618,a=6378137,b=6378137");} | 73 | +{ |
74 | + $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | ||
75 | + $map->set("units",MS_METERS); | ||
76 | + $map->preparequery(); | ||
77 | + $map->set("scaledenom",$map->scaledenom * 100000); | ||
78 | +} | ||
74 | //$legenda =$map->legend; | 79 | //$legenda =$map->legend; |
75 | //$legenda->set("status",MS_EMBED); | 80 | //$legenda->set("status",MS_EMBED); |
76 | //altera o nome das classes vazias | 81 | //altera o nome das classes vazias |
@@ -146,4 +151,4 @@ echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' | @@ -146,4 +151,4 @@ echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' | ||
146 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; | 151 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; |
147 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; | 152 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; |
148 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; | 153 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; |
149 | -?> | ||
150 | \ No newline at end of file | 154 | \ No newline at end of file |
155 | +?> |
ferramentas/imprimir/index.js
@@ -169,7 +169,11 @@ i3GEOF.imprimir = { | @@ -169,7 +169,11 @@ i3GEOF.imprimir = { | ||
169 | tipoAbertura {string} - (opcional) se for "interna" abre em uma janela interna do mapa | 169 | tipoAbertura {string} - (opcional) se for "interna" abre em uma janela interna do mapa |
170 | */ | 170 | */ |
171 | abreI: function(obj,tipoAbertura){ | 171 | abreI: function(obj,tipoAbertura){ |
172 | - var url = i3GEO.configura.locaplic+"/ferramentas/imprimir/"+obj.value+"?g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL+"&mapexten="+i3GEO.parametros.mapexten; | 172 | + var interf = i3GEO.Interface.ATUAL; |
173 | + if(i3GEO.Interface.openlayers.googleLike === true){ | ||
174 | + interf = "googlemaps"; | ||
175 | + } | ||
176 | + var url = i3GEO.configura.locaplic+"/ferramentas/imprimir/"+obj.value+"?g_sid="+i3GEO.configura.sid+"&interface="+interf+"&mapexten="+i3GEO.parametros.mapexten; | ||
173 | var id = "imprimir"+Math.random(); | 177 | var id = "imprimir"+Math.random(); |
174 | if(tipoAbertura){ | 178 | if(tipoAbertura){ |
175 | i3GEO.janela.cria("350px","350px",url,"","","Arquivos",id); | 179 | i3GEO.janela.cria("350px","350px",url,"","","Arquivos",id); |
ferramentas/imprimir/svg.php
@@ -68,7 +68,12 @@ $map->save($temp); | @@ -68,7 +68,12 @@ $map->save($temp); | ||
68 | substituiCon($temp,$postgis_mapa); | 68 | substituiCon($temp,$postgis_mapa); |
69 | $map = ms_newMapObj($temp); | 69 | $map = ms_newMapObj($temp); |
70 | if($interface == "googlemaps") | 70 | if($interface == "googlemaps") |
71 | -{$map->setProjection("init=epsg:4618,a=6378137,b=6378137");} | 71 | +{ |
72 | + $map->setProjection("init=epsg:4618,a=6378137,b=6378137"); | ||
73 | + $map->set("units",MS_METERS); | ||
74 | + $map->preparequery(); | ||
75 | + $map->set("scaledenom",$map->scaledenom * 100000); | ||
76 | +} | ||
72 | $v = versao(); | 77 | $v = versao(); |
73 | 78 | ||
74 | $leb = $eb->label; | 79 | $leb = $eb->label; |