Commit d12b2b19314a3ba8e4fb322e7d06bbd94157572d
1 parent
05050d34
Exists in
master
and in
7 other branches
--no commit message
Showing
4 changed files
with
80 additions
and
7 deletions
Show diff stats
classesjs/classe_arvoredecamadas.js
@@ -2175,9 +2175,6 @@ i3GEO.arvoreDeCamadas = | @@ -2175,9 +2175,6 @@ i3GEO.arvoreDeCamadas = | ||
2175 | * é mostrado na árvore | 2175 | * é mostrado na árvore |
2176 | */ | 2176 | */ |
2177 | verificaAbrangenciaTemas : function() { | 2177 | verificaAbrangenciaTemas : function() { |
2178 | - if (typeof (console) !== 'undefined') | ||
2179 | - console.info("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"); | ||
2180 | - | ||
2181 | if (i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS === false) { | 2178 | if (i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS === false) { |
2182 | return; | 2179 | return; |
2183 | } | 2180 | } |
classesjs/classe_interface.js
@@ -2479,11 +2479,12 @@ i3GEO.Interface = | @@ -2479,11 +2479,12 @@ i3GEO.Interface = | ||
2479 | i3GEO.Interface.googlemaps.recalcPar(); | 2479 | i3GEO.Interface.googlemaps.recalcPar(); |
2480 | }, | 2480 | }, |
2481 | criaImageMap : function(nomeLayer, cache) { | 2481 | criaImageMap : function(nomeLayer, cache) { |
2482 | - var i3GEOTileO = "", s; | 2482 | + var i3GEOTileO = ""; |
2483 | if (cache == "undefined" || cache == undefined) { | 2483 | if (cache == "undefined" || cache == undefined) { |
2484 | cache = ""; | 2484 | cache = ""; |
2485 | } | 2485 | } |
2486 | - s = | 2486 | + /* |
2487 | + var s = | ||
2487 | "i3GEOTileO = new google.maps.ImageMapType({ " + "getTileUrl: function(coord, zoom) {" + " var url = '" | 2488 | "i3GEOTileO = new google.maps.ImageMapType({ " + "getTileUrl: function(coord, zoom) {" + " var url = '" |
2488 | + i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache | 2489 | + i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache |
2489 | + "&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer=" + nomeLayer | 2490 | + "&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer=" + nomeLayer |
@@ -2491,8 +2492,71 @@ i3GEO.Interface = | @@ -2491,8 +2492,71 @@ i3GEO.Interface = | ||
2491 | + " return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; " + "}, " + "tileSize: new google.maps.Size(256, 256)," | 2492 | + " return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; " + "}, " + "tileSize: new google.maps.Size(256, 256)," |
2492 | + "isPng: true," + "name: '" + nomeLayer + "'" + "});"; | 2493 | + "isPng: true," + "name: '" + nomeLayer + "'" + "});"; |
2493 | eval(s); | 2494 | eval(s); |
2495 | + */ | ||
2496 | + | ||
2497 | + i3GEOTileO = new google.maps.ImageMapType({ | ||
2498 | + getTileUrl: function(coord, zoom) { | ||
2499 | + var url = i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache | ||
2500 | + + "&Z=" + zoom + "&X=" + coord.x + "&Y=" + coord.y + "&layer=" + nomeLayer | ||
2501 | + + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random(); | ||
2502 | + return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; | ||
2503 | + }, | ||
2504 | + tileSize: new google.maps.Size(256, 256), | ||
2505 | + isPng: true, | ||
2506 | + name: nomeLayer | ||
2507 | + }); | ||
2508 | + | ||
2509 | + /* | ||
2510 | + i3GEOTileO = new google.maps.ImageMapType({ | ||
2511 | + getTileUrl: function(coord, zoom) { | ||
2512 | + var url = i3GEO.configura.locaplic + "/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + "&cache=" + cache | ||
2513 | + + "&BBOX=" + i3GEO.Interface.googlemaps.bbox2mercator(i3GEO.Interface.googlemaps.bbox()) | ||
2514 | + + "&HEIGHT=" + i3GEO.parametros.h | ||
2515 | + + "&WIDTH=" + i3GEO.parametros.w | ||
2516 | + + "&layer=" + nomeLayer | ||
2517 | + + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r=' + Math.random(); | ||
2518 | + return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; | ||
2519 | + }, | ||
2520 | + tileSize: new google.maps.Size(i3GEO.parametros.w, i3GEO.parametros.h), | ||
2521 | + isPng: true, | ||
2522 | + name: nomeLayer, | ||
2523 | + projection : i3GeoMap.getProjection(), | ||
2524 | + b : i3GeoMap.getBounds() | ||
2525 | + }); | ||
2526 | + | ||
2527 | + | ||
2528 | + google.maps.event.addListener(i3GEOTileO, 'tilesloaded', function() { | ||
2529 | + var l = i3GEO.Interface.googlemaps.retornaObjetoLayer(nomeLayer); | ||
2530 | + var currentBounds = i3GeoMap.getBounds(); | ||
2531 | + if (currentBounds.equals(l.b)) { | ||
2532 | + return; | ||
2533 | + } | ||
2534 | + l.b = currentBounds; | ||
2535 | + }); | ||
2536 | + */ | ||
2494 | return i3GEOTileO; | 2537 | return i3GEOTileO; |
2495 | }, | 2538 | }, |
2539 | + bbox2mercator : function(bbox){ | ||
2540 | + var c = bbox.split(" "), | ||
2541 | + p1,p2; | ||
2542 | + p1 = i3GEO.Interface.googlemaps.geo2mercator(c[0],c[1]); | ||
2543 | + p2 = i3GEO.Interface.googlemaps.geo2mercator(c[2],c[3]); | ||
2544 | + return p1.x+" "+p1.y+" "+p2.x+" "+p2.y; | ||
2545 | + }, | ||
2546 | + geo2mercator : function(x,y){ | ||
2547 | + var source = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", | ||
2548 | + dest = "+title= Google Mercator EPSG:900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs", | ||
2549 | + p = new Proj4js.Point(parseInt(x,10), parseInt(y,10)); | ||
2550 | + | ||
2551 | + Proj4js.defs["WGS84"] = source; | ||
2552 | + Proj4js.defs["EPSG:900913"] = dest; | ||
2553 | + | ||
2554 | + source = new Proj4js.Proj('WGS84'); | ||
2555 | + dest = new Proj4js.Proj('EPSG:900913'); | ||
2556 | + | ||
2557 | + Proj4js.transform(source, dest, p); | ||
2558 | + return p; | ||
2559 | + }, | ||
2496 | insereLayer : function(nomeLayer, indice, cache) { | 2560 | insereLayer : function(nomeLayer, indice, cache) { |
2497 | if (i3GEO.pluginI3geo.existeObjeto(nomeLayer) === false) { | 2561 | if (i3GEO.pluginI3geo.existeObjeto(nomeLayer) === false) { |
2498 | var i = i3GEO.Interface.googlemaps.criaImageMap(nomeLayer, cache); | 2562 | var i = i3GEO.Interface.googlemaps.criaImageMap(nomeLayer, cache); |
classesphp/mapa_googlemaps.php
@@ -279,7 +279,6 @@ if($cache == true){ | @@ -279,7 +279,6 @@ if($cache == true){ | ||
279 | $mapa->setsize($_GET["WIDTH"],$_GET["HEIGHT"]); | 279 | $mapa->setsize($_GET["WIDTH"],$_GET["HEIGHT"]); |
280 | $mapext = explode(" ",$_GET["mapext"]); | 280 | $mapext = explode(" ",$_GET["mapext"]); |
281 | $mapa->setExtent($mapext[0],$mapext[1],$mapext[2],$mapext[3]); | 281 | $mapa->setExtent($mapext[0],$mapext[1],$mapext[2],$mapext[3]); |
282 | - | ||
283 | $o = $mapa->outputformat; | 282 | $o = $mapa->outputformat; |
284 | $o->set("imagemode",MS_IMAGEMODE_RGBA); | 283 | $o->set("imagemode",MS_IMAGEMODE_RGBA); |
285 | 284 |
interface/black_osm.htm
@@ -7,6 +7,19 @@ | @@ -7,6 +7,19 @@ | ||
7 | <script src="../classesjs/i3geo.js"></script> | 7 | <script src="../classesjs/i3geo.js"></script> |
8 | <script src="../pacotes/openlayers/OpenLayers2131.js.php"></script> | 8 | <script src="../pacotes/openlayers/OpenLayers2131.js.php"></script> |
9 | <link rel="stylesheet" type="text/css" href="../css/black.css"> | 9 | <link rel="stylesheet" type="text/css" href="../css/black.css"> |
10 | +<style> | ||
11 | + .olControlEditingToolbar1 div { | ||
12 | + background-image: url(../mashups/openlayers.png); | ||
13 | + background-repeat: no-repeat; | ||
14 | + float: right; | ||
15 | + right: 50px; | ||
16 | + height: 29px; | ||
17 | + margin: 2px; | ||
18 | + width: 29px; | ||
19 | + cursor: pointer; | ||
20 | + top: 10px; | ||
21 | + } | ||
22 | +</style> | ||
10 | </head> | 23 | </head> |
11 | <body id="i3geo" style='margin-left: 7px; background: white;'> | 24 | <body id="i3geo" style='margin-left: 7px; background: white;'> |
12 | <!-- inclui o nome do usuario logado --> | 25 | <!-- inclui o nome do usuario logado --> |
@@ -15,7 +28,7 @@ | @@ -15,7 +28,7 @@ | ||
15 | <tr> | 28 | <tr> |
16 | <td id="contemMenu" style="background: black; height: 30px; text-align: right; border-width: 0pt 0pt 1px; border-color: rgb(240, 240, 240)"> | 29 | <td id="contemMenu" style="background: black; height: 30px; text-align: right; border-width: 0pt 0pt 1px; border-color: rgb(240, 240, 240)"> |
17 | <!--menu suspenso--> | 30 | <!--menu suspenso--> |
18 | - <div id="menus" style="height: 0px;"></div> | 31 | + <div id="menus" style="height: 30px;"></div> |
19 | </td> | 32 | </td> |
20 | </tr> | 33 | </tr> |
21 | <tr> | 34 | <tr> |