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 | 43 | $map = ms_newMapObj($temp); |
44 | 44 | |
45 | 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 | 53 | $w = $map->width; |
49 | 54 | $h = $map->height; |
... | ... | @@ -160,4 +165,4 @@ if ($wLegenda > $wLegendaMax * 1.5) |
160 | 165 | $pdf->Image($pathlegenda, 4, 21,$nW); |
161 | 166 | $pdf->Close(); |
162 | 167 | $pdf->Output("mapa.pdf", true); |
163 | -?> | |
164 | 168 | \ No newline at end of file |
169 | +?> | ... | ... |
ferramentas/imprimir/aggpng.php
... | ... | @@ -71,7 +71,12 @@ $of->set("driver","AGG/PNG"); |
71 | 71 | $of->set("imagemode","RGB"); |
72 | 72 | $map = ms_newMapObj($temp); |
73 | 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 | 80 | //$legenda =$map->legend; |
76 | 81 | //$legenda->set("status",MS_EMBED); |
77 | 82 | //altera o nome das classes vazias |
... | ... | @@ -146,4 +151,4 @@ echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' |
146 | 151 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; |
147 | 152 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; |
148 | 153 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; |
149 | -?> | |
150 | 154 | \ No newline at end of file |
155 | +?> | ... | ... |
ferramentas/imprimir/geotif.php
... | ... | @@ -70,7 +70,12 @@ $of->set("driver","GDAL/GTiff"); |
70 | 70 | $of->set("imagemode","RGB"); |
71 | 71 | $map = ms_newMapObj($temp); |
72 | 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 | 79 | //$legenda =$map->legend; |
75 | 80 | //$legenda->set("status",MS_EMBED); |
76 | 81 | //altera o nome das classes vazias |
... | ... | @@ -146,4 +151,4 @@ echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' |
146 | 151 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; |
147 | 152 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; |
148 | 153 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; |
149 | -?> | |
150 | 154 | \ No newline at end of file |
155 | +?> | ... | ... |
ferramentas/imprimir/index.js
... | ... | @@ -169,7 +169,11 @@ i3GEOF.imprimir = { |
169 | 169 | tipoAbertura {string} - (opcional) se for "interna" abre em uma janela interna do mapa |
170 | 170 | */ |
171 | 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 | 177 | var id = "imprimir"+Math.random(); |
174 | 178 | if(tipoAbertura){ |
175 | 179 | i3GEO.janela.cria("350px","350px",url,"","","Arquivos",id); | ... | ... |
ferramentas/imprimir/svg.php
... | ... | @@ -68,7 +68,12 @@ $map->save($temp); |
68 | 68 | substituiCon($temp,$postgis_mapa); |
69 | 69 | $map = ms_newMapObj($temp); |
70 | 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 | 77 | $v = versao(); |
73 | 78 | |
74 | 79 | $leb = $eb->label; | ... | ... |