Commit 4334eb6e3d01a6311adc08e9024d7e824eb0b97f
1 parent
29b2f985
Exists in
master
and in
7 other branches
Corrige problemas com Internet Explorer
Showing
2 changed files
with
18 additions
and
30 deletions
Show diff stats
ferramentas/googlemaps/index.htm
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <title></title> |
7 | 7 | </head> |
8 | 8 | <body onunload="GUnload()"> |
9 | - <div id="map" style="width: 340px; height: 340px"></div> | |
9 | + <div id="mapa" style="width: 340px; height: 340px"></div> | |
10 | 10 | |
11 | 11 | <script type="text/javascript" > |
12 | 12 | //chave na producao= ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxSieGwtcPDeiUtRiq7Xa63cyLppcxTVYXnVlPwveOe-sXuXfpBeNpL6pA |
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | pt1 = "-54"; |
33 | 33 | pt2 = "-12"; |
34 | 34 | } |
35 | - map = new GMap2(document.getElementById("map")); | |
35 | + map = new GMap2(document.getElementById("mapa")); | |
36 | 36 | map.setMapType(G_SATELLITE_MAP); |
37 | 37 | map.addMapType(G_SATELLITE_3D_MAP); |
38 | 38 | map.addControl(new GLargeMapControl()); | ... | ... |
ferramentas/googlemaps/index.php
1 | 1 | <?php |
2 | 2 | include_once("../../ms_configura.php"); |
3 | -/* | |
4 | -<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114026893455619160549/embedkmlgadget.xml&up_kml_url=http%3A%2F%2Fmapas.mma.gov.br%2Fi3geo%2Fpacotes%2Fkmlmapserver%2Fkmlservice.php%3Fmap%3Dbioma%26typename%3Dbioma%26request%3Dkml&up_view_mode=earth&up_earth_2d_fallback=0&up_earth_fly_from_space=1&up_earth_show_buildings=0&synd=open&w=320&h=400&title=Embedded+KML+Viewer&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script> | |
5 | -*/ | |
6 | 3 | ?> |
7 | 4 | <html> |
8 | 5 | <head> |
9 | 6 | <script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> |
10 | -<script language="JavaScript" type="text/javascript" src="http://maps.google.com/maps?file=api&v=2.x&key=<?php echo $googleApiKey; ?>"> | |
11 | -</script> | |
12 | -<title></title> | |
13 | - </head> | |
14 | - <body onunload="GUnload()"> | |
15 | - <div id="map" style="width: 440px; height: 340px"></div> | |
16 | - | |
17 | - <script type="text/javascript" > | |
7 | +<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $googleApiKey; ?>"></script> | |
8 | +<script type="text/javascript"> | |
9 | + function inicializa(){ | |
18 | 10 | counterClick = 0 |
19 | - var m = document.getElementById("map") | |
11 | + var m = document.getElementById("mapa") | |
20 | 12 | m.style.width = window.parent.i3GEO.parametros.w / 2 |
21 | 13 | m.style.height = window.parent.i3GEO.parametros.h / 2 |
22 | - //chave na producao= ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxSieGwtcPDeiUtRiq7Xa63cyLppcxTVYXnVlPwveOe-sXuXfpBeNpL6pA | |
23 | - //chave no desenvolvimento = ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxQ_qvn5wqSkbcx9uoqrWGnUcZ7lqhRVzkJwzeDN3nQJheG7FjoxyruBIQ | |
24 | 14 | i3geoOverlay = false; |
25 | 15 | if(window.parent.document.getElementById("boxg")) |
26 | 16 | window.parent.document.getElementById("boxg").style.zIndex = 0 |
... | ... | @@ -32,28 +22,23 @@ include_once("../../ms_configura.php"); |
32 | 22 | var ver = window.parent.i3GEO.parametros.versaomscompleta.split("."); |
33 | 23 | if(parseInt(window.parent.i3GEO.parametros.versaoms) >= 5 && parseInt(ver[1]) > 1) |
34 | 24 | {tile = true;} |
35 | - | |
36 | - if(window.parent.i3GEO.parametros) | |
37 | - { | |
38 | 25 | docmapa = window.parent.document |
39 | 26 | pol = window.parent.i3GEO.parametros.mapexten |
27 | + | |
40 | 28 | ret = pol.split(" ") |
41 | 29 | pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1 |
42 | 30 | pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1 |
43 | 31 | pt = pt1+","+pt2 |
44 | - } | |
45 | - else | |
46 | - { | |
47 | - pt1 = "-54"; | |
48 | - pt2 = "-12"; | |
49 | - } | |
50 | - map = new GMap2(document.getElementById("map")); | |
32 | + | |
33 | + map = new GMap2(m); | |
34 | + | |
51 | 35 | map.setMapType(G_SATELLITE_MAP); |
52 | 36 | map.addMapType(G_SATELLITE_3D_MAP); |
53 | 37 | map.addControl(new GLargeMapControl()); |
54 | 38 | map.addControl(new GMapTypeControl()); |
55 | 39 | map.addControl(new GScaleControl()); |
56 | 40 | map.setCenter(new GLatLng(pt2,pt1), 8); |
41 | + | |
57 | 42 | GEvent.addListener(map, "moveend", function() { |
58 | 43 | ondegoogle(map); |
59 | 44 | }); |
... | ... | @@ -119,7 +104,9 @@ include_once("../../ms_configura.php"); |
119 | 104 | } |
120 | 105 | if(window.parent.i3GEO.parametros.mapfile) |
121 | 106 | map.addControl(new botaoI3geo()); |
122 | - | |
107 | + ondegoogle(map); | |
108 | + } | |
109 | + | |
123 | 110 | function moveMapa(bd) |
124 | 111 | { |
125 | 112 | nex = bd.minX+" "+bd.minY+" "+bd.maxX+" "+bd.maxY |
... | ... | @@ -349,8 +336,9 @@ include_once("../../ms_configura.php"); |
349 | 336 | |
350 | 337 | }); |
351 | 338 | } |
352 | - ondegoogle(map); | |
353 | 339 | </script> |
340 | + </head> | |
341 | + <body onload="inicializa()"> | |
342 | + <div id="mapa" style="width: 440px; height: 340px"></div> | |
354 | 343 | </body> |
355 | -</html> | |
356 | - | |
344 | +</html> | |
357 | 345 | \ No newline at end of file | ... | ... |