Commit 330a1da28f915b098922e549a62f006e951d6d3b
1 parent
03198311
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
162 additions
and
174 deletions
Show diff stats
interface/osmdebug.htm
1 | + | |
1 | 2 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
2 | 3 | <html> |
3 | 4 | <head> |
4 | 5 | <meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> |
5 | 6 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
6 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
7 | -<title>i3GEO - OpenLayers+OSM</title> | |
8 | -<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
9 | -<script src="../pacotes/openlayers/OpenLayers2131.js.php"></script> | |
8 | +<title>i3GEO - OpenLayers</title> | |
9 | +<script src="../pacotes/ol3/ol-debug.js"></script> | |
10 | +<script src="../js/i3geonaocompacto.js"></script> | |
10 | 11 | <link rel="stylesheet" type="text/css" href="../css/black.css"> |
12 | +<link rel="stylesheet" type="text/css" href="../pacotes/ol3/ol.css"> | |
11 | 13 | <style> |
12 | 14 | .ol-zoom { |
13 | 15 | padding-left: 4px; |
... | ... | @@ -26,17 +28,21 @@ |
26 | 28 | .ol-attribution.ol-uncollapsible { |
27 | 29 | height: 2.1em; |
28 | 30 | right: 24px; |
31 | + background: none; | |
32 | + margin-bottom: 15px; | |
29 | 33 | } |
34 | + | |
30 | 35 | </style> |
31 | 36 | </head> |
32 | 37 | <body id="i3geo" style='margin-left: 7px; background: white;'> |
38 | + | |
33 | 39 | <!-- inclui o nome do usuario logado --> |
34 | 40 | <div id="i3GEONomeLogin" style="position: absolute; left: 10px; top: 12px; font-size: 11px; z-index: 50000"></div> |
35 | 41 | <table id='mst' summary="" style='display: none;' width=100% cellspacing='0'> |
36 | 42 | <tr> |
37 | 43 | <td id="contemMenu" style="background: black; height: 30px; text-align: right; border-width: 0pt 0pt 1px; border-color: rgb(240, 240, 240)"> |
38 | 44 | <!--menu suspenso--> |
39 | - <div id="menus" style="height: 0px;"></div> | |
45 | + <div id="menus" style="height: 30px;"></div> | |
40 | 46 | </td> |
41 | 47 | </tr> |
42 | 48 | <tr> |
... | ... | @@ -66,6 +72,7 @@ |
66 | 72 | <td class=fundoRodape style="width: 20%"> |
67 | 73 | <!-- botão de compartilhamento em redes sociais--> |
68 | 74 | <!--<div id=i3GEOcompartilhar style="width: 170px; margin: auto; text-align: left; padding-top: 1px"></div> --> |
75 | + <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | |
69 | 76 | <div id=tempoRedesenho style="z-index: 100; position: absolute; top: 0px; color: green; background-color: black; width: 50px; display: none"></div> |
70 | 77 | </td> |
71 | 78 | <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> |
... | ... | @@ -79,10 +86,10 @@ |
79 | 86 | </table> |
80 | 87 | <table id="i3GEOlogoMarca" style='margin: 0px auto; box-shadow: 0 1px 13px gray; border-radius: 5px;'> |
81 | 88 | <tr> |
82 | - <td> | |
89 | + <td style="height: 30px"> | |
83 | 90 | <div id=versaoi3geo></div> |
84 | - <h2 style="font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">i3Geo - Software livre para criação de mapas interativos e geoprocessamento</h2> | |
85 | - <h3 style="font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">Baseado no Mapserver, é licenciado sob GPL e integra o Portal do Software Público Brasileiro</h3> | |
91 | + <h2 style="font-weight: normal; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">i3Geo - Software livre para criação de mapas interativos e geoprocessamento</h2> | |
92 | + <h3 style="font-weight: normal; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">Baseado no Mapserver, é licenciado sob GPL e integra o Portal do Software Público Brasileiro</h3> | |
86 | 93 | </td> |
87 | 94 | </tr> |
88 | 95 | <tr> |
... | ... | @@ -99,16 +106,20 @@ |
99 | 106 | </tr> |
100 | 107 | </table> |
101 | 108 | |
102 | - <div id="i3GEOguiaMovel" style="position: absolute; display: block; border: 0px solid white; text-align: left; z-index: 2000; background-color: none"> | |
103 | - <img id="i3GEOguiaMovelPuxador" onclick='i3GEO.guias.guiaMovel.abreFecha()' style='z-index: 2; border: solid 0px white; left: 0px; position: absolute; top: 0px' width='0px' src='../imagens/openbars.png'> | |
104 | - <div id="i3GEOguiaMovelMolde" style="box-shadow: -2px 0 2px gray; position: absolute; display: none; border: 0px solid white; text-align: left; z-index: 1000; background-color: gray"> | |
105 | - <div id="i3GEOguiaMovelIcones" style='overflow: none; left: 0px; display: none; position: absolute; top: 0px; text-align: center; height: 0px; width: 0px; border: solid 0px white; background-color: white'></div> | |
106 | - <div id="i3GEOguiaMovelConteudo" style='overflow: auto; display: none; position: absolute; border-color: gray; border-width: 0px 0 0px 0px; left: 0px; height: 0px; background-color: white'> | |
109 | + <div id="i3GEOguiaMovel" style="visibility: hidden; position: absolute; display: block; border: 0px solid white; text-align: left; z-index: 2000; background-color: none"> | |
110 | + <div style="cursor: pointer; position: absolute; top: 50%; margin-top: -65px; width: 30px; z-index: 5000; left: 18px;"> | |
111 | + <div id="iconeGuia_temas"></div> | |
112 | + <div id="iconeGuia_adiciona" style="margin-top: 3px;"></div> | |
113 | + <div id="iconeGuia_legenda" style="margin-top: 3px;"></div> | |
114 | + <div id="iconeGuia_dobraPagina" style="margin-top: 3px;"></div> | |
115 | + </div> | |
116 | + <div id="i3GEOguiaMovelMolde" style="top: 0px; box-shadow: 0 2px 10px 0 #888888; position: absolute; display: none; border: 0px solid white; text-align: left; z-index: 1000; background-color: gray"> | |
117 | + <div id="i3GEOguiaMovelConteudo" style='top: 10px; overflow: auto; display: none; position: absolute; border-color: gray; border-width: 0px 0 0px 0px; left: 0px; height: 0px; background-color: white'> | |
107 | 118 | <div id='guia1obj' style='display: none;'> |
108 | 119 | <!-- Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico --> |
109 | 120 | <div style='left: 5px; top: 10px; width: 150px;' id=buscaRapida></div> |
110 | 121 | <!-- Esta div acrescenta a lista de propriedades do mapa --> |
111 | - <div id=listaPropriedades style='top: 15px;'></div> | |
122 | + <!--<div id=listaPropriedades style='top:15px;' ></div>--> | |
112 | 123 | <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' específicas da interface Openlayers. Veja também a opção i3GEO.Interface.openlayers.GADGETS.LayerSwitcher --> |
113 | 124 | <div id=listaLayersBase style='top: 15px;'></div> |
114 | 125 | <!-- Esta div acrescenta a lista de de camadas disponíveis no mapa atual --> |
... | ... | @@ -121,33 +132,37 @@ |
121 | 132 | <div id='guia4obj' style='display: none; text-align: left'> |
122 | 133 | <div id='legenda' style='text-align: left'></div> |
123 | 134 | </div> |
124 | - <div id='guia5obj' style='display: none; text-align: left'> | |
125 | - <div id='banners' style='overflow: auto; text-align: left'>Aguarde...</div> | |
126 | - </div> | |
135 | + <!-- | |
136 | + <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | |
137 | + --> | |
127 | 138 | </div> |
128 | 139 | </div> |
129 | 140 | </div> |
130 | - | |
131 | - | |
132 | 141 | <script> |
133 | - i3GEO.configura.locaplic = i3GEO.util.protocolo() + "://" | |
134 | - + window.location.host + "/i3geo"; | |
142 | + i3GEO.configura.locaplic = i3GEO.util.protocolo() + "://" + window.location.host + "/i3geo"; | |
135 | 143 | i3GEO.configura.autotamanho = false; |
136 | 144 | i3GEO.Interface.ATUAL = "openlayers"; |
137 | 145 | i3GEO.Interface.IDCORPO = "contemImg"; |
146 | + i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin = true; | |
147 | + | |
138 | 148 | i3GEO.Interface.openlayers.TILES = true; |
139 | - i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; | |
149 | + i3GEO.Interface.openlayers.googleLike = true; | |
150 | + | |
151 | + i3GEO.configura.guardaExtensao = true; | |
152 | + i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = | |
153 | + 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; | |
140 | 154 | |
141 | 155 | i3GEO.cria(); |
142 | 156 | i3GEO.configura.mapaRefDisplay = "none"; |
157 | + i3GEO.barraDeBotoes.ATIVA = true; | |
143 | 158 | i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; |
144 | 159 | //ajusta o deslocamento da barra de botoes |
145 | 160 | i3GEO.barraDeBotoes.OFFSET = 11; |
146 | 161 | //ajusta a posicao da barra de botoes no IE |
147 | - if(navm){ | |
162 | + if (navm) { | |
148 | 163 | i3GEO.barraDeBotoes.OFFSET = 5; |
149 | 164 | } |
150 | - if(chro){ | |
165 | + if (chro) { | |
151 | 166 | i3GEO.barraDeBotoes.OFFSET = 15; |
152 | 167 | } |
153 | 168 | |
... | ... | @@ -159,6 +174,7 @@ |
159 | 174 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; |
160 | 175 | i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; |
161 | 176 | i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; |
177 | + i3GEO.arvoreDeCamadas.MOSTRATITULO = true; | |
162 | 178 | i3GEO.mapa.AUTORESIZE = true; |
163 | 179 | i3GEO.guias.TIPO = "movel"; |
164 | 180 | i3GEO.guias.guiaMovel.config.topGuiaMovel = 36; |
... | ... | @@ -167,33 +183,14 @@ |
167 | 183 | if ($i("i3GEOlogoMarca")) { |
168 | 184 | $i("i3GEOlogoMarca").style.display = "none"; |
169 | 185 | } |
170 | - i3GEO.mapa.insereDobraPagina("googlemaps", | |
171 | - "../imagens/dobragooglemaps.png"); | |
186 | + //i3GEO.mapa.insereDobraPagina("googlemaps", "../imagens/dobragooglemaps.png"); | |
172 | 187 | }; |
188 | + //indica se a opcao de navegacao nas pastas do servidor sera ativada | |
173 | 189 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir = true; |
174 | 190 | i3GEO.janela.TRANSICAOSUAVE = true; |
175 | - OpenLayers.ImgPath = "../pacotes/openlayers/img/"; | |
191 | + //desliga a camada com o mapa mundi | |
192 | + i3GEO.configura.mashuppar = "&desligar=mundo"; | |
176 | 193 | (function() { |
177 | - function getTileURL(bounds) { | |
178 | - console.info(bounds) | |
179 | - var res = this.map.getResolution(); | |
180 | - //var m = i3GEO.util.projGeo2OSM(i3geoOL.maxExtent); | |
181 | - //bounds = i3GEO.util.projGeo2OSM(bounds) | |
182 | - //this.map.zoomIn() | |
183 | - var m = (this.maxExtent); | |
184 | - var x = Math.round((bounds.left - m.left) / ((res) * 256)); | |
185 | - var y = Math.round((m.top - bounds.top) / ((res) * 256)); | |
186 | - var z = this.map.getZoom(); | |
187 | - var limit = Math.pow(2, z); | |
188 | - | |
189 | - //if (y < 0 || y >= limit) { | |
190 | - // return OpenLayers.Util.getImagesLocation() + "404.png"; | |
191 | - //} else { | |
192 | - x = ((x % limit) + limit) % limit; | |
193 | - return this.url + "x=" + x + "&y=" + y + "&z=" + (z); //+ "&ss=" + x + "-" + y + "-" + z | |
194 | - //} | |
195 | - } | |
196 | - | |
197 | 194 | var attribOSMData = 'Map Data: © <a href="http://www.openstreetmap.org/">OpenStreetMap</a> contributors'; |
198 | 195 | var attribMapQuestOSM = attribOSMData + ', Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'; |
199 | 196 | var attribMapQuestAerial = 'Map Data: © Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency, Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'; |
... | ... | @@ -201,119 +198,118 @@ |
201 | 198 | var attribDEMData = '<a href="http://srtm.csi.cgiar.org/">SRTM</a>; ASTER GDEM is a product of <a href="http://www.meti.go.jp/english/press/data/20090626_03.html">METI</a> and <a href="https://lpdaac.usgs.gov/products/aster_policies">NASA</a>'; |
202 | 199 | var attribStamen = 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA'; |
203 | 200 | var mapSurfer = 'Map data © OpenStreetMap contributors, Imagery GIScience Research Group @ Heidelberg University'; |
204 | - | |
205 | - var aquarela = new OpenLayers.Layer.OSM("Aquarela", | |
206 | - "http://tile.stamen.com/watercolor/${z}/${x}/${y}.jpg", { | |
207 | - isBaseLayer : true, | |
208 | - visibility : false, | |
209 | - attribution: attribStamen, | |
210 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
211 | - }); | |
212 | - | |
213 | - var toner = new OpenLayers.Layer.OSM("Toner", | |
214 | - "http://tile.stamen.com/toner/${z}/${x}/${y}.jpg", { | |
215 | - isBaseLayer : true, | |
216 | - visibility : false, | |
217 | - attribution: attribStamen, | |
218 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
219 | - }); | |
220 | - | |
221 | - var tonerlite = new OpenLayers.Layer.OSM("Toner lite", | |
222 | - "http://tile.stamen.com/toner-lite/${z}/${x}/${y}.jpg", { | |
223 | - isBaseLayer : true, | |
224 | - visibility : false, | |
225 | - attribution: attribStamen, | |
226 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
227 | - }); | |
228 | - | |
229 | - var osm = new OpenLayers.Layer.OSM("OSM", | |
230 | - "http://tile.openstreetmap.org/${z}/${x}/${y}.png", { | |
231 | - isBaseLayer : true, | |
232 | - visibility : true, | |
233 | - attribution: attribOSMData, | |
234 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
235 | - }); | |
236 | - | |
237 | - var arrayMapQuestAerial = ["http://oatile1.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.jpg", | |
238 | - "http://oatile2.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.jpg", | |
239 | - "http://oatile3.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.jpg", | |
240 | - "http://oatile4.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.jpg" | |
241 | - ]; | |
242 | 201 | |
243 | - var layMapQuestAerial = new OpenLayers.Layer.OSM("MapQuest Open Aerial", arrayMapQuestAerial,{ | |
244 | - displayOutsideMaxExtent: true, | |
245 | - attribution: attribMapQuestAerial, | |
202 | + var osm = new ol.layer.Tile({ | |
203 | + title : "OSM", | |
204 | + visible : true, | |
246 | 205 | isBaseLayer : true, |
247 | - visibility : false, | |
248 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
249 | - }); | |
206 | + name : "osm", | |
207 | + source: new ol.source.OSM({ | |
208 | + attributions : [new ol.Attribution({html: attribOSMData})], | |
209 | + crossOrigin : "anonymous", | |
210 | + url : "http://tile.openstreetmap.org/${z}/${x}/${y}.png" | |
211 | + }) | |
212 | + }); | |
213 | + i3GEO.Interface.openlayers.LAYERSADICIONAIS = [osm]; | |
250 | 214 | |
251 | - var layMSNOsmRoad = new OpenLayers.Layer.OSM("OSM Roads", ["http://korona.geog.uni-heidelberg.de/tiles/roads/x=${x}&y=${y}&z=${z}"], { | |
252 | - displayOutsideMaxExtent: true, | |
253 | - type : 'png', | |
254 | - //getURL : getTileURL, | |
215 | + /* | |
216 | + | |
217 | + var eng = new ol.layer.Tile({ | |
218 | + title : "ESRI National Geographic", | |
219 | + visible : true, | |
255 | 220 | isBaseLayer : true, |
256 | - visibility : false, | |
257 | - attribution : mapSurfer, | |
258 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
221 | + name : "eng", | |
222 | + source : new ol.source.TileArcGISRest({ | |
223 | + url : "http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer", | |
224 | + attributions: [ | |
225 | + new ol.Attribution({ | |
226 | + html: 'Tiles © <a href="http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer">ArcGIS</a>' | |
227 | + }) | |
228 | + ] | |
229 | + }) | |
259 | 230 | }); |
260 | - | |
261 | - var layMSNOsmRoadsGray = | |
262 | - new OpenLayers.Layer.TMS("OSM Roads Grayscale", "http://korona.geog.uni-heidelberg.de/tiles/roadsg/", { | |
263 | - type : 'png', | |
264 | - getURL : getTileURL, | |
265 | - displayOutsideMaxExtent : true, | |
266 | - isBaseLayer : true, | |
267 | - visibility : false, | |
268 | - attribution : mapSurfer | |
269 | - }); | |
270 | - | |
271 | - var layMSNOsmBoundariesOverlay = | |
272 | - new OpenLayers.Layer.TMS("OSM Admin Boundaries (experimental)", "http://korona.geog.uni-heidelberg.de/tiles/adminb/", { | |
273 | - type : 'png', | |
274 | - getURL : getTileURL, | |
275 | - displayOutsideMaxExtent : true, | |
276 | - isBaseLayer : true, | |
277 | - visibility : false, | |
278 | - attribution : mapSurfer | |
279 | - }); | |
280 | - | |
281 | - var layMSNOsmHybrid = new OpenLayers.Layer.OSM("OSM Semitransparent", "http://korona.geog.uni-heidelberg.de/tiles/hybrid/x=${x}&y=${y}&z=${z}", { | |
282 | - displayOutsideMaxExtent: true, | |
283 | - visibility : false, | |
231 | + var oce = new ol.layer.Tile({ | |
232 | + title : "ESRI Ocean Basemap", | |
233 | + visible : false, | |
284 | 234 | isBaseLayer : true, |
285 | - attribution : mapSurfer, | |
286 | - tileOptions: {crossOriginKeyword: "anonymous"} | |
235 | + name : "oce", | |
236 | + source : new ol.source.TileArcGISRest({ | |
237 | + url : "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer", | |
238 | + attributions: [ | |
239 | + new ol.Attribution({ | |
240 | + html: 'Tiles © <a href="http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer">ArcGIS</a>' | |
241 | + }) | |
242 | + ] | |
243 | + }) | |
244 | + }); | |
245 | + var ims = new ol.layer.Tile({ | |
246 | + title : "ESRI Imagery World 2D", | |
247 | + visible : false, | |
248 | + isBaseLayer : true, | |
249 | + name : "ims", | |
250 | + source : new ol.source.TileArcGISRest({ | |
251 | + url : "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer", | |
252 | + attributions: [ | |
253 | + new ol.Attribution({ | |
254 | + html: 'Tiles © <a href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer">ArcGIS</a>' | |
255 | + }) | |
256 | + ] | |
257 | + }) | |
258 | + }); | |
259 | + var wsm = new ol.layer.Tile({ | |
260 | + title : "ESRI World Street Map", | |
261 | + visible : false, | |
262 | + isBaseLayer : true, | |
263 | + name : "wsm", | |
264 | + source : new ol.source.TileArcGISRest({ | |
265 | + url : "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer", | |
266 | + attributions: [ | |
267 | + new ol.Attribution({ | |
268 | + html: 'Tiles © <a href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer">ArcGIS</a>' | |
269 | + }) | |
270 | + ] | |
271 | + }) | |
272 | + }); | |
273 | + var bra = new ol.layer.Tile({ | |
274 | + title : "Base carto MMA", | |
275 | + visible : false, | |
276 | + isBaseLayer : true, | |
277 | + name : "bra", | |
278 | + source : new ol.source.TileWMS({ | |
279 | + url : "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&", | |
280 | + params : { | |
281 | + 'layers' : "baseraster", | |
282 | + 'srs' : "EPSG:4326", | |
283 | + 'format' : "image/png" | |
284 | + } | |
285 | + }) | |
286 | + }); | |
287 | + var tms = new ol.layer.Tile({ | |
288 | + title : "OSGEO", | |
289 | + visible : false, | |
290 | + isBaseLayer : true, | |
291 | + name : "tms", | |
292 | + source : new ol.source.TileWMS({ | |
293 | + url : "http://tilecache.osgeo.org/wms-c/Basic.py/", | |
294 | + params : { | |
295 | + 'layers' : "basic", | |
296 | + 'type' : "png", | |
297 | + 'srs' : "EPSG:4326", | |
298 | + 'format' : "image/png", | |
299 | + 'VERSION' : '1.1.1' | |
300 | + }, | |
301 | + attributions: [ | |
302 | + new ol.Attribution({ | |
303 | + html: '© <a href="http://www.tilecache.org/">2006-2010, TileCache Contributors</a>' | |
304 | + }) | |
305 | + ] | |
306 | + }) | |
287 | 307 | }); |
288 | - | |
289 | - var layMSNAsterHillshade = | |
290 | - new OpenLayers.Layer.TMS( | |
291 | - "ASTER GDEM & SRTM Hillshade (experimental)", | |
292 | - "http://korona.geog.uni-heidelberg.de/tiles/asterh/", | |
293 | - { | |
294 | - type : 'png', | |
295 | - getURL : getTileURL, | |
296 | - displayOutsideMaxExtent : true, | |
297 | - isBaseLayer : true, | |
298 | - visibility : false, | |
299 | - attribution : mapSurfer | |
300 | - }); | |
301 | - | |
302 | - var layMSNAsterContours = | |
303 | - new OpenLayers.Layer.TMS("ASTER GDEM Contour Lines (zoom 13-17)", "http://korona.geog.uni-heidelberg.de/tiles/asterc/", { | |
304 | - type : 'png', | |
305 | - getURL : getTileURL, | |
306 | - displayOutsideMaxExtent : true, | |
307 | - isBaseLayer : true, | |
308 | - visibility : false, | |
309 | - attribution : mapSurfer | |
310 | - }); | |
311 | - | |
312 | 308 | i3GEO.Interface.openlayers.LAYERSADICIONAIS = [ |
313 | - osm, aquarela, toner, tonerlite, layMapQuestAerial, layMSNOsmRoad,layMSNOsmRoadsGray,layMSNOsmBoundariesOverlay,layMSNOsmHybrid,layMSNAsterHillshade,layMSNAsterContours | |
309 | + eng, oce, ims, wsm, bra, tms | |
314 | 310 | ]; |
311 | + */ | |
315 | 312 | })(); |
316 | - i3GEO.Interface.openlayers.googleLike = true; | |
317 | 313 | i3GEO.inicia(); |
318 | 314 | </script> |
319 | 315 | </body> | ... | ... |
js/util.js
... | ... | @@ -2925,7 +2925,7 @@ i3GEO.util = |
2925 | 2925 | * Converte string 'xmin ymin xmax ymax' ou 'xmin ymin' de geo para a projecao OSM |
2926 | 2926 | */ |
2927 | 2927 | extGeo2OSM : function(ext, retornaArray) { |
2928 | - var metrica, point, proj900913, projWGS84, temp, sep; | |
2928 | + var metrica, point, temp, sep; | |
2929 | 2929 | sep = " "; |
2930 | 2930 | if (typeof ext == "object") { |
2931 | 2931 | return i3GEO.util.projGeo2OSM(ext); |
... | ... | @@ -2937,15 +2937,13 @@ i3GEO.util = |
2937 | 2937 | temp = ext.split(sep); |
2938 | 2938 | } |
2939 | 2939 | if (temp[0] * 1 <= 180 && temp[0] * 1 >= -180) { |
2940 | - projWGS84 = new OpenLayers.Projection("EPSG:4326"); | |
2941 | - proj900913 = new OpenLayers.Projection("EPSG:900913"); | |
2942 | - point = new OpenLayers.LonLat(temp[0], temp[1]); | |
2943 | - metrica = point.transform(projWGS84, proj900913); | |
2944 | - ext = metrica.lon + sep + metrica.lat; | |
2940 | + point = new ol.geom.Point([temp[0], temp[1]]); | |
2941 | + metrica = point.transform("EPSG:4326","EPSG:900913"); | |
2942 | + ext = metrica.getCoordinates()[0] + sep + metrica.getCoordinates()[1]; | |
2945 | 2943 | if (temp.length > 2) { |
2946 | - point = new OpenLayers.LonLat(temp[2], temp[3]); | |
2947 | - metrica = point.transform(projWGS84, proj900913); | |
2948 | - ext += sep + metrica.lon + sep + metrica.lat; | |
2944 | + point = new ol.geom.Point([temp[2], temp[3]]); | |
2945 | + metrica = point.transform("EPSG:4326","EPSG:900913"); | |
2946 | + ext += sep + metrica.getCoordinates()[0] + sep + metrica.getCoordinates()[1]; | |
2949 | 2947 | } |
2950 | 2948 | } |
2951 | 2949 | } |
... | ... | @@ -2961,7 +2959,7 @@ i3GEO.util = |
2961 | 2959 | * Converte string 'xmin ymin xmax ymax' ou 'xmin ymin' de geo para a projecao OSM |
2962 | 2960 | */ |
2963 | 2961 | extOSM2Geo : function(ext, retornaArray) { |
2964 | - var metrica, point, proj900913, projWGS84, temp, sep; | |
2962 | + var metrica, point, temp, sep; | |
2965 | 2963 | sep = " "; |
2966 | 2964 | if (typeof ext == "object") { |
2967 | 2965 | return i3GEO.util.projOSM2Geo(ext); |
... | ... | @@ -2973,15 +2971,13 @@ i3GEO.util = |
2973 | 2971 | temp = ext.split(sep); |
2974 | 2972 | } |
2975 | 2973 | if (temp[0] * 1 >= 180 || temp[0] * 1 <= -180) { |
2976 | - projWGS84 = new OpenLayers.Projection("EPSG:4326"); | |
2977 | - proj900913 = new OpenLayers.Projection("EPSG:900913"); | |
2978 | - point = new OpenLayers.LonLat(temp[0], temp[1]); | |
2979 | - metrica = point.transform(proj900913, projWGS84); | |
2980 | - ext = metrica.lon + sep + metrica.lat; | |
2974 | + point = new ol.geom.Point([temp[0], temp[1]]); | |
2975 | + metrica = point.transform("EPSG:900913","EPSG:4326"); | |
2976 | + ext = metrica.getCoordinates()[0] + sep + metrica.getCoordinates()[1]; | |
2981 | 2977 | if (temp.length > 2) { |
2982 | - point = new OpenLayers.LonLat(temp[2], temp[3]); | |
2983 | - metrica = point.transform(proj900913, projWGS84); | |
2984 | - ext += sep + metrica.lon + sep + metrica.lat; | |
2978 | + point = new ol.geom.Point([temp[2], temp[3]]); | |
2979 | + metrica = point.transform("EPSG:900913","EPSG:4326"); | |
2980 | + ext += sep + metrica.getCoordinates()[0] + sep + metrica.getCoordinates()[1]; | |
2985 | 2981 | } |
2986 | 2982 | } |
2987 | 2983 | } |
... | ... | @@ -2998,9 +2994,7 @@ i3GEO.util = |
2998 | 2994 | */ |
2999 | 2995 | projOSM2Geo : function(obj) { |
3000 | 2996 | if (i3GEO.Interface.openlayers.googleLike === true) { |
3001 | - projWGS84 = new OpenLayers.Projection("EPSG:4326"); | |
3002 | - proj900913 = new OpenLayers.Projection("EPSG:900913"); | |
3003 | - obj = obj.transform(proj900913, projWGS84); | |
2997 | + obj = obj.transform("EPSG:900913","EPSG:4326"); | |
3004 | 2998 | } |
3005 | 2999 | return obj; |
3006 | 3000 | }, |
... | ... | @@ -3011,9 +3005,7 @@ i3GEO.util = |
3011 | 3005 | */ |
3012 | 3006 | projGeo2OSM : function(obj) { |
3013 | 3007 | if (i3GEO.Interface.openlayers.googleLike === true) { |
3014 | - projWGS84 = new OpenLayers.Projection("EPSG:4326"); | |
3015 | - proj900913 = new OpenLayers.Projection("EPSG:900913"); | |
3016 | - obj = obj.transform(projWGS84, proj900913); | |
3008 | + obj = obj.transform("EPSG:4326","EPSG:900913"); | |
3017 | 3009 | } |
3018 | 3010 | return obj; |
3019 | 3011 | }, |
... | ... | @@ -3400,7 +3392,7 @@ i3GEO.util = |
3400 | 3392 | }, |
3401 | 3393 | /** |
3402 | 3394 | * Function: uid |
3403 | - * | |
3395 | + * | |
3404 | 3396 | * Retorna um ID unico baseado no tempo |
3405 | 3397 | */ |
3406 | 3398 | uid : function(){ | ... | ... |