Commit b53cd23b806afa521745bf38af44bd570207250b
1 parent
429d657e
Exists in
master
and in
7 other branches
Inclusão de opção para quebrar frases na inclusão de toponímia no mapa
Showing
5 changed files
with
37 additions
and
6 deletions
Show diff stats
classesphp/classe_temas.php
... | ... | @@ -594,9 +594,11 @@ $angulo - Ângulo do texto. |
594 | 594 | |
595 | 595 | $tamanho - Tamanho do texto. |
596 | 596 | |
597 | -$fonte - Fonte. | |
597 | +$fonte - Fonte | |
598 | + | |
599 | +$wrap - caractere que indica quebra de linha | |
598 | 600 | */ |
599 | - function insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte) | |
601 | + function insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$wrap) | |
600 | 602 | { |
601 | 603 | //verifica se j'a existe um layer criado anteriormente com o mesmo nome e apaga se existir |
602 | 604 | if ($tipo == "limpaponto") |
... | ... | @@ -658,6 +660,15 @@ $fonte - Fonte. |
658 | 660 | $c->set("status",MS_DELETE); |
659 | 661 | $novac = ms_newclassobj($pinlayer); |
660 | 662 | $label = $novac->label; |
663 | + if($wrap != "") | |
664 | + { | |
665 | + $label->set("maxlength",1); | |
666 | + $s = $novac->getTextString; | |
667 | + $s = "CLASS LABEL WRAP '$wrap' END END"; | |
668 | + $novac->updateFromString($s); | |
669 | + } | |
670 | + $label = $novac->label; | |
671 | + | |
661 | 672 | if ($fonte != "bitmap") |
662 | 673 | { |
663 | 674 | $label->set("type",MS_TRUETYPE); | ... | ... |
classesphp/classe_toponimia.php
... | ... | @@ -146,11 +146,13 @@ $fonte Fonte. |
146 | 146 | |
147 | 147 | $tipo Tipo teste| |
148 | 148 | |
149 | +$wrap | |
150 | + | |
149 | 151 | Retorno: |
150 | 152 | |
151 | 153 | {string} - código do layer criado |
152 | 154 | */ |
153 | - function criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo) | |
155 | + function criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo,$wrap) | |
154 | 156 | { |
155 | 157 | if(!$this->layer){return "erro";} |
156 | 158 | if (!isset($tipo)){$tipo = "";} |
... | ... | @@ -181,6 +183,14 @@ Retorno: |
181 | 183 | $nomer = $this->layer->name; |
182 | 184 | } |
183 | 185 | $label = $novac->label; |
186 | + if($wrap != "") | |
187 | + { | |
188 | + $label->set("maxlength",1); | |
189 | + $s = $novac->getTextString; | |
190 | + $s = "CLASS LABEL WRAP '$wrap' END END"; | |
191 | + $novac->updateFromString($s); | |
192 | + } | |
193 | + $label = $novac->label; | |
184 | 194 | if ($fonte != "bitmap") |
185 | 195 | { |
186 | 196 | $label->set("type",MS_TRUETYPE); | ... | ... |
classesphp/mapa_controle.php
... | ... | @@ -1125,7 +1125,7 @@ Insere elemento gráfico em um tema. |
1125 | 1125 | copiaSeguranca($map_file); |
1126 | 1126 | $m = new Temas($map_file,""); |
1127 | 1127 | if(!isset($marca)){$marca="";} |
1128 | - $m->insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte); | |
1128 | + $m->insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$wrap); | |
1129 | 1129 | $m->salva(); |
1130 | 1130 | redesenhaMapa(); |
1131 | 1131 | break; |
... | ... | @@ -2683,7 +2683,7 @@ Cria um novo tema com a toponímia do tema atual. |
2683 | 2683 | copiaSeguranca($map_file); |
2684 | 2684 | $m = new Toponimia($map_file,$tema); |
2685 | 2685 | if(!isset($tipo)){$tipo="";} |
2686 | - $retorno = $m->criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo); | |
2686 | + $retorno = $m->criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo,$wrap); | |
2687 | 2687 | if ($tipo != "teste") |
2688 | 2688 | {$m->salva();} |
2689 | 2689 | break; | ... | ... |
ferramentas/inseretxt/index.js.php
... | ... | @@ -240,6 +240,10 @@ i3GEOF.inseretxt = { |
240 | 240 | ' </select>' + |
241 | 241 | ' </td>' + |
242 | 242 | ' </tr>' + |
243 | + ' <tr><td> </td><td></td></tr>' + | |
244 | + ' <tr><td>Caractere usado para indicar uma quebra de texto:</td><td>' + | |
245 | + $inputText("","","i3GEOinseretxtwrap_i","",5,"") + | |
246 | + ' </td></tr>' + | |
243 | 247 | ' </table>' + |
244 | 248 | ' </div>' + |
245 | 249 | '</div> '; |
... | ... | @@ -337,7 +341,8 @@ i3GEOF.inseretxt = { |
337 | 341 | "&fundo="+$i("i3GEOinseretxtfundoc_i").value+ |
338 | 342 | "&sombra="+$i("i3GEOinseretxtsombra_i").value+ |
339 | 343 | "&outlinecolor="+$i("i3GEOinseretxtmascara_i").value+ |
340 | - "&shadowcolor="+$i("i3GEOinseretxtfrentes_i").value; | |
344 | + "&shadowcolor="+$i("i3GEOinseretxtfrentes_i").value+ | |
345 | + "&wrap="+$i("i3GEOinseretxtwrap_i").value; | |
341 | 346 | return par; |
342 | 347 | }, |
343 | 348 | /* | ... | ... |
ferramentas/toponimia/index.js.php
... | ... | @@ -215,6 +215,10 @@ i3GEOF.toponimia = { |
215 | 215 | ' </select>' + |
216 | 216 | ' </td>' + |
217 | 217 | ' </tr>' + |
218 | + ' <tr><td> </td><td></td></tr>' + | |
219 | + ' <tr><td>Caractere usado para indicar uma quebra de texto:</td><td>' + | |
220 | + $inputText("","","i3GEOtoponimiawrap_i","",5,"") + | |
221 | + ' </td></tr>' + | |
218 | 222 | ' </table>' + |
219 | 223 | ' </div>' + |
220 | 224 | ' <div class=guiaobj id="i3GEOtoponimiaguia3obj" style="left:1px;90%;display:none;">' + |
... | ... | @@ -291,6 +295,7 @@ i3GEOF.toponimia = { |
291 | 295 | "&outlinecolor="+$i("i3GEOtoponimiamascara_i").value+ |
292 | 296 | "&shadowcolor="+$i("i3GEOtoponimiafrentes_i").value+ |
293 | 297 | "&item="+$i("i3GEOtoponimiaListaItens").value+ |
298 | + "&wrap="+$i("i3GEOtoponimiawrap_i").value+ | |
294 | 299 | "&tema="+i3GEO.temaAtivo; |
295 | 300 | return par; |
296 | 301 | }, | ... | ... |