Commit 364f89477b255f034b1cfd3888f56fc8ff089773

Authored by Edmar Moretti
1 parent 59aa327c

Inclusão de opção para adição de TMS

admin/admin.db
No preview for this file type
classesjs/classe_arvoredecamadas.js
@@ -380,7 +380,9 @@ i3GEO.arvoreDeCamadas = { @@ -380,7 +380,9 @@ i3GEO.arvoreDeCamadas = {
380 380
381 "permitecomentario":"", 381 "permitecomentario":"",
382 382
383 - "exttema":"" 383 + "exttema":"",
  384 +
  385 + "nomeoriginal":""
384 } 386 }
385 ] 387 ]
386 388
classesjs/classe_interface.js
@@ -592,7 +592,7 @@ i3GEO.Interface = { @@ -592,7 +592,7 @@ i3GEO.Interface = {
592 bb.INCLUIBOTAO.zoomtot = true; 592 bb.INCLUIBOTAO.zoomtot = true;
593 i3geoOL = new OpenLayers.Map('openlayers', { 593 i3geoOL = new OpenLayers.Map('openlayers', {
594 controls: [], 594 controls: [],
595 - fractionalZoom: true, 595 + fractionalZoom: false,
596 minResolution: "auto", 596 minResolution: "auto",
597 minExtent: new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]), 597 minExtent: new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),
598 maxResolution: "auto", 598 maxResolution: "auto",
@@ -953,9 +953,11 @@ i3GEO.Interface = { @@ -953,9 +953,11 @@ i3GEO.Interface = {
953 // 953 //
954 if(camada.connectiontype === 7 && camada.wmsurl !== "" && camada.usasld.toLowerCase() != "sim"){ 954 if(camada.connectiontype === 7 && camada.wmsurl !== "" && camada.usasld.toLowerCase() != "sim"){
955 urllayer = camada.wmsurl+"&r="+Math.random(); 955 urllayer = camada.wmsurl+"&r="+Math.random();
  956 + /**
  957 + * TODO não funciona
  958 + */
956 if(camada.wmstile == 1){ 959 if(camada.wmstile == 1){
957 - //opcoes.tileSize = new OpenLayers.Size(512,512);  
958 - layer = new OpenLayers.Layer.TileCache(camada.name, urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes); 960 + layer = new OpenLayers.Layer.TMS(camada.name, camada.wmsurl,{layername:camada.nomeoriginal,type:'png'});
959 } 961 }
960 else{ 962 else{
961 layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes); 963 layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);
classesjs/i3geo.js
@@ -68,5 +68,5 @@ $i = function(id) @@ -68,5 +68,5 @@ $i = function(id)
68 } 68 }
69 document.write("<link rel='stylesheet' type='text/css' href='" + scriptLocation + "../css/i3geo47.css.php'></link>"); 69 document.write("<link rel='stylesheet' type='text/css' href='" + scriptLocation + "../css/i3geo47.css.php'></link>");
70 document.write("<link rel='stylesheet' type='text/css' href='" + scriptLocation + "../pacotes/yui290/build/button/assets/skins/sam/button.css'></link>"); 70 document.write("<link rel='stylesheet' type='text/css' href='" + scriptLocation + "../pacotes/yui290/build/button/assets/skins/sam/button.css'></link>");
71 - document.write("<script src='" + scriptLocation + "i3geo_tudo_compacto47.js.php'></script>"); 71 + document.write("<script type='text/javascript' src='" + scriptLocation + "i3geo_tudo_compacto47.js.php'></script>");
72 })(); 72 })();
73 \ No newline at end of file 73 \ No newline at end of file
classesjs/i3geonaocompacto.js
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 "../pacotes/balloon-tooltips/htdocs/js/balloon.config.js", 38 "../pacotes/balloon-tooltips/htdocs/js/balloon.config.js",
39 "../pacotes/balloon-tooltips/htdocs/js/balloon.js", 39 "../pacotes/balloon-tooltips/htdocs/js/balloon.js",
40 "../pacotes/eudock/js/euDock.2.0.js", 40 "../pacotes/eudock/js/euDock.2.0.js",
41 - "../pacotes/eudock/js/euDock.Image.js", 41 + "../pacotes/eudock/js/euDock.Image.js",
42 "classe_i3geo.js", 42 "classe_i3geo.js",
43 "classe_util.js", 43 "classe_util.js",
44 "dicionario.js", 44 "dicionario.js",
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 ); 69 );
70 for (i = 0; i < jsfiles.length; i++) 70 for (i = 0; i < jsfiles.length; i++)
71 { 71 {
72 - var currentScriptTag = "<script src='" + scriptLocation + jsfiles[i] + "'></script>"; 72 + var currentScriptTag = "<script type='text/javascript' src='" + scriptLocation + jsfiles[i] + "'></script>";
73 allScriptTags += currentScriptTag; 73 allScriptTags += currentScriptTag;
74 } 74 }
75 //css 75 //css
classesphp/classe_mapa.php
@@ -294,12 +294,16 @@ string - javascript com os parametros @@ -294,12 +294,16 @@ string - javascript com os parametros
294 $wmsformat = $oLayer->getmetadata("wms_format"); 294 $wmsformat = $oLayer->getmetadata("wms_format");
295 $wmssrs = $oLayer->getmetadata("wms_srs"); 295 $wmssrs = $oLayer->getmetadata("wms_srs");
296 $wmstile = $oLayer->getmetadata("wms_tile"); 296 $wmstile = $oLayer->getmetadata("wms_tile");
  297 + if($wmstile == 1){
  298 + $wmsurl = ($oLayer->connection);
  299 + }
297 } 300 }
298 $tiles = ""; 301 $tiles = "";
299 if($oLayer->labelitem != "") 302 if($oLayer->labelitem != "")
300 {$tiles = "nao";} 303 {$tiles = "nao";}
301 $temas[] = array( 304 $temas[] = array(
302 "name"=>($oLayer->name), 305 "name"=>($oLayer->name),
  306 + "nomeoriginal"=>($oLayer->getmetadata("nomeoriginal")),
303 "status"=>($oLayer->status), 307 "status"=>($oLayer->status),
304 "tema"=>(mb_convert_encoding(($oLayer->getmetadata("tema")),"UTF-8","ISO-8859-1")), 308 "tema"=>(mb_convert_encoding(($oLayer->getmetadata("tema")),"UTF-8","ISO-8859-1")),
305 "transparency"=>($oLayer->opacity), 309 "transparency"=>($oLayer->opacity),
interface/openlayersdebug.htm
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 background-image:url(../mashups/openlayers.png); 9 background-image:url(../mashups/openlayers.png);
10 background-repeat:no-repeat; 10 background-repeat:no-repeat;
11 float:right; 11 float:right;
12 - right: 0px; 12 + right: 0px;
13 height:29px; 13 height:29px;
14 margin:2px; 14 margin:2px;
15 width:29px; 15 width:29px;
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 Nesse div s&atilde;o inclu&iacute;dos os &iacute;cones que permitem ao usu&aacute;rio modificar o visual de cores dos &iacute;cones 50 Nesse div s&atilde;o inclu&iacute;dos os &iacute;cones que permitem ao usu&aacute;rio modificar o visual de cores dos &iacute;cones
51 <div id=visual ></div> 51 <div id=visual ></div>
52 --> 52 -->
53 - <!-- bot&atilde;o de compartilhamento em redes sociais 53 + <!-- bot&atilde;o de compartilhamento em redes sociais
54 <div id=i3GEOcompartilhar style="text-align:left;border-top:1px solid rgb(250,250,250);padding-top:1px" ></div>--> 54 <div id=i3GEOcompartilhar style="text-align:left;border-top:1px solid rgb(250,250,250);padding-top:1px" ></div>-->
55 <!-- aqui ser&aacute; inclu&iacute;do o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> 55 <!-- aqui ser&aacute; inclu&iacute;do o contador de tempo quando o temporizador de redesenho do mapa estiver ativo -->
56 <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> 56 <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div>
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <!-- aqui ser&aacute; inclu&iacute;do o gadget que mostra a coordenada geogr&aacute;fica da posi&ccedil;&atilde;o do mouse --> 63 <!-- aqui ser&aacute; inclu&iacute;do o gadget que mostra a coordenada geogr&aacute;fica da posi&ccedil;&atilde;o do mouse -->
64 <div id=localizarxy style="text-align:left;font-size:10px;display:inline-table"></div> 64 <div id=localizarxy style="text-align:left;font-size:10px;display:inline-table"></div>
65 </td> 65 </td>
66 - <!-- aqui ser&atilde;o inclu&iacute;das as bandeiras que permitem a troca de idioma --> 66 + <!-- aqui ser&atilde;o inclu&iacute;das as bandeiras que permitem a troca de idioma -->
67 <td class=tdbranca > 67 <td class=tdbranca >
68 <div id=seletorIdiomas ></div> 68 <div id=seletorIdiomas ></div>
69 </td> 69 </td>
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 <div id='guia1obj' style='display:none;' > 99 <div id='guia1obj' style='display:none;' >
100 <!-- Esta div acrescenta a op&ccedil;&atilde;o de busca r&aacute;pida, caso vc queira coloc&aacute;-la em um lugar espec&iacute;fico --> 100 <!-- Esta div acrescenta a op&ccedil;&atilde;o de busca r&aacute;pida, caso vc queira coloc&aacute;-la em um lugar espec&iacute;fico -->
101 <div style='left:5px;top:10px;' id=buscaRapida ></div> 101 <div style='left:5px;top:10px;' id=buscaRapida ></div>
102 - <!-- Esta div acrescenta a lista de propriedades do mapa --> 102 + <!-- Esta div acrescenta a lista de propriedades do mapa -->
103 <div id=listaPropriedades style='top:15px;' ></div> 103 <div id=listaPropriedades style='top:15px;' ></div>
104 <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' espec&iacute;ficas da interface Openlayers. Veja tamb&eacute;m a op&ccedil;&atilde;o i3GEO.Interface.openlayers.GADGETS.LayerSwitcher --> 104 <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' espec&iacute;ficas da interface Openlayers. Veja tamb&eacute;m a op&ccedil;&atilde;o i3GEO.Interface.openlayers.GADGETS.LayerSwitcher -->
105 <div id=listaLayersBase style='top:15px;'></div> 105 <div id=listaLayersBase style='top:15px;'></div>
@@ -137,10 +137,10 @@ Para definir quais bot&amp;otilde;es das barras de ferramentas ser&amp;atilde;o inclu&amp;ia @@ -137,10 +137,10 @@ Para definir quais bot&amp;otilde;es das barras de ferramentas ser&amp;atilde;o inclu&amp;ia
137 */ 137 */
138 /* 138 /*
139 Indica a localiza&ccedil;&atilde;o correta do i3geo. 139 Indica a localiza&ccedil;&atilde;o correta do i3geo.
140 - 140 +
141 &Eacute; utilizada para identificar o local correto onde est&atilde;o os programas em php que s&atilde;o utilizados. 141 &Eacute; utilizada para identificar o local correto onde est&atilde;o os programas em php que s&atilde;o utilizados.
142 -  
143 - Se n&atilde;o for definida, o i3Geo tentar&aacute; encontrar o local automaticamente com base na tag javascript 142 +
  143 + Se n&atilde;o for definida, o i3Geo tentar&aacute; encontrar o local automaticamente com base na tag javascript
144 */ 144 */
145 //i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; 145 //i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";
146 /* 146 /*
@@ -160,7 +160,7 @@ i3GEO.Interface.openlayers.GADGETS = { @@ -160,7 +160,7 @@ i3GEO.Interface.openlayers.GADGETS = {
160 PanZoom:false, 160 PanZoom:false,
161 LayerSwitcher:true, 161 LayerSwitcher:true,
162 ScaleLine:true, 162 ScaleLine:true,
163 - OverviewMap:false 163 + OverviewMap:false
164 }; 164 };
165 i3GEO.Interface.openlayers.TILES = true; 165 i3GEO.Interface.openlayers.TILES = true;
166 // 166 //
@@ -238,32 +238,33 @@ OpenLayers.ImgPath = &quot;../pacotes/openlayers/img/&quot;; @@ -238,32 +238,33 @@ OpenLayers.ImgPath = &quot;../pacotes/openlayers/img/&quot;;
238 //adiciona camadas que podem ser ativadas como fundo do mapa 238 //adiciona camadas que podem ser ativadas como fundo do mapa
239 // 239 //
240 (function(){ 240 (function(){
241 - var oce = new OpenLayers.Layer.ArcGIS93Rest( 241 + var oce = new OpenLayers.Layer.ArcGIS93Rest(
242 "ESRI Ocean Basemap", 242 "ESRI Ocean Basemap",
243 "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export", 243 "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",
244 {format:"jpeg"}, 244 {format:"jpeg"},
245 {isBaseLayer:true,visibility:false} 245 {isBaseLayer:true,visibility:false}
246 ); 246 );
247 - var ims = new OpenLayers.Layer.ArcGIS93Rest( 247 + var ims = new OpenLayers.Layer.ArcGIS93Rest(
248 "ESRI Imagery World 2D", 248 "ESRI Imagery World 2D",
249 "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export", 249 "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",
250 {format:"jpeg"}, 250 {format:"jpeg"},
251 {isBaseLayer:true,visibility:false} 251 {isBaseLayer:true,visibility:false}
252 ); 252 );
253 - var wsm = new OpenLayers.Layer.ArcGIS93Rest( 253 + var wsm = new OpenLayers.Layer.ArcGIS93Rest(
254 "ESRI World Street Map", 254 "ESRI World Street Map",
255 "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export", 255 "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",
256 {format:"jpeg"}, 256 {format:"jpeg"},
257 {isBaseLayer:true,visibility:false} 257 {isBaseLayer:true,visibility:false}
258 ); 258 );
259 - var bra = new OpenLayers.Layer.WMS( 259 + var bra = new OpenLayers.Layer.WMS(
260 "Base carto MMA", 260 "Base carto MMA",
261 "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map", 261 "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map",
262 {layers:"baseraster",srs:"EPSG:4618",format:"image/png",isBaseLayer:false}, 262 {layers:"baseraster",srs:"EPSG:4618",format:"image/png",isBaseLayer:false},
263 {isBaseLayer:true,visibility:false} 263 {isBaseLayer:true,visibility:false}
264 ); 264 );
  265 +
265 /* 266 /*
266 - var osm = new OpenLayers.Layer.WMS( 267 + var osm = new OpenLayers.Layer.WMS(
267 "Open Street Map", 268 "Open Street Map",
268 "http://full.wms.geofabrik.de/std/demo_key", 269 "http://full.wms.geofabrik.de/std/demo_key",
269 {layers:""}, 270 {layers:""},