Commit 710974a13eea971f7ab5114a7358fc4481d61f4b
1 parent
54dc9204
Exists in
master
and in
7 other branches
Modificação na interface com a inclusão de ícones de navegação ao invés de botões
Showing
2 changed files
with
33 additions
and
1 deletions
Show diff stats
mobile/mobile.php
... | ... | @@ -21,6 +21,7 @@ input |
21 | 21 | </style> |
22 | 22 | <script> |
23 | 23 | //limpa a tela caso tenha sido enviada alguma mensagem pelo ms_criamapa.php |
24 | +if(document.body) | |
24 | 25 | document.body.innerHTML=""; |
25 | 26 | </script> |
26 | 27 | <body> |
... | ... | @@ -119,6 +120,7 @@ if ($tipo=="localizar") |
119 | 120 | $mapa = ms_newMapObj($tmpfname); |
120 | 121 | $w = $mapa->width; |
121 | 122 | $h = $mapa->height; |
123 | +/* | |
122 | 124 | if (isset($utilizacgi) && strtolower($utilizacgi) == "sim") |
123 | 125 | {$nomeimagem = $locmapserv."?map=".$tmpfname."&mode=map";} |
124 | 126 | else |
... | ... | @@ -128,14 +130,36 @@ else |
128 | 130 | $imgo->saveImage($nome); |
129 | 131 | $nomeimagem = ($imgo->imageurl).basename($nome); |
130 | 132 | } |
133 | +*/ | |
134 | +error_reporting(E_ALL); | |
135 | +$imgo = $mapa->draw(); | |
136 | +$nome = ($imgo->imagepath).nomeRandomico().".png"; | |
137 | +$imgo->saveImage($nome); | |
138 | +$nomeimagem = ($imgo->imageurl).basename($nome); | |
139 | +//funde com a imagem da barra de navegacao | |
140 | +$ims = imagecreatefrompng("navegacao.png"); | |
141 | +$img = imagecreatefrompng($nome); | |
142 | +$wdst = imagesx($img); | |
143 | +$hdst = imagesy($img); | |
144 | +$wsrc = imagesx($ims); | |
145 | +$hsrc = imagesy($ims); | |
146 | +$xdst = abs(($wdst - $wsrc) / 2); | |
147 | +$ydst = abs(($hdst - $hsrc) / 2); | |
148 | +$branco = imagecolorresolve($ims,255,255,255); | |
149 | +//imagecolortransparent($ims,$branco); | |
150 | +//imageSaveAlpha($ims, true); | |
151 | +imagecopymerge($img,$ims,0,0,0,0,$wsrc,$hsrc,80); | |
152 | +ImagePNG($img, $nome); | |
131 | 153 | ?> |
132 | 154 | <div id='botoes' style="position:relative;top:1px;left:1px" > |
155 | + <!-- | |
133 | 156 | <input type='button' value='+' onclick='zoommais()' /> |
134 | 157 | <input type='button' value='-' onclick='zoommenos()' /> |
135 | 158 | <input type='button' value='O' onclick='oeste()' /> |
136 | 159 | <input type='button' value='N' onclick='norte()' /> |
137 | 160 | <input type='button' value='S' onclick='sul()' /> |
138 | 161 | <input type='button' value='L' onclick='leste()' /> |
162 | + --> | |
139 | 163 | <select id='op' name='op' onchange='op(this.value)'> |
140 | 164 | <option value=''>Opções</option> |
141 | 165 | <option value='reiniciar'>reiniciar</option> |
... | ... | @@ -151,7 +175,15 @@ else |
151 | 175 | <input type='hidden' name='tmpfname' value='<?php echo $tmpfname;?>' /> |
152 | 176 | <input id='tipo' type=hidden name='tipo' value='' /> |
153 | 177 | </form> |
154 | -<img id='mapa' style="position:relative;top:1px;left:1px" src='<?php echo $nomeimagem; ?>' /> | |
178 | +<map name="sample"> | |
179 | +<area shape="rect" coords="0,0,44,23" onclick='zoommais()'> | |
180 | +<area shape="rect" coords="0,26,44,42" onclick='zoommenos()'> | |
181 | +<area shape="rect" coords="14,46,28,58" onclick='norte()'> | |
182 | +<area shape="rect" coords="28,58,40,73" onclick='leste()'> | |
183 | +<area shape="rect" coords="16,74,30,86" onclick='sul()'> | |
184 | +<area shape="rect" coords="3,58,17,71" onclick='oeste()'> | |
185 | +</map> | |
186 | +<img id='mapa' style="position:relative;top:1px;left:1px" src='<?php echo $nomeimagem; ?>' usemap="#sample" /> | |
155 | 187 | </body> |
156 | 188 | <script> |
157 | 189 | var app = navigator.appName.substring(0,1); | ... | ... |
3.72 KB