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,7 +6,7 @@ | ||
6 | <title></title> | 6 | <title></title> |
7 | </head> | 7 | </head> |
8 | <body onunload="GUnload()"> | 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 | <script type="text/javascript" > | 11 | <script type="text/javascript" > |
12 | //chave na producao= ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxSieGwtcPDeiUtRiq7Xa63cyLppcxTVYXnVlPwveOe-sXuXfpBeNpL6pA | 12 | //chave na producao= ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxSieGwtcPDeiUtRiq7Xa63cyLppcxTVYXnVlPwveOe-sXuXfpBeNpL6pA |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | pt1 = "-54"; | 32 | pt1 = "-54"; |
33 | pt2 = "-12"; | 33 | pt2 = "-12"; |
34 | } | 34 | } |
35 | - map = new GMap2(document.getElementById("map")); | 35 | + map = new GMap2(document.getElementById("mapa")); |
36 | map.setMapType(G_SATELLITE_MAP); | 36 | map.setMapType(G_SATELLITE_MAP); |
37 | map.addMapType(G_SATELLITE_3D_MAP); | 37 | map.addMapType(G_SATELLITE_3D_MAP); |
38 | map.addControl(new GLargeMapControl()); | 38 | map.addControl(new GLargeMapControl()); |
ferramentas/googlemaps/index.php
1 | <?php | 1 | <?php |
2 | include_once("../../ms_configura.php"); | 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 | <html> | 4 | <html> |
8 | <head> | 5 | <head> |
9 | <script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | 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 | counterClick = 0 | 10 | counterClick = 0 |
19 | - var m = document.getElementById("map") | 11 | + var m = document.getElementById("mapa") |
20 | m.style.width = window.parent.i3GEO.parametros.w / 2 | 12 | m.style.width = window.parent.i3GEO.parametros.w / 2 |
21 | m.style.height = window.parent.i3GEO.parametros.h / 2 | 13 | m.style.height = window.parent.i3GEO.parametros.h / 2 |
22 | - //chave na producao= ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxSieGwtcPDeiUtRiq7Xa63cyLppcxTVYXnVlPwveOe-sXuXfpBeNpL6pA | ||
23 | - //chave no desenvolvimento = ABQIAAAAg9kA9xQlYqK9iBDKaeTpgxQ_qvn5wqSkbcx9uoqrWGnUcZ7lqhRVzkJwzeDN3nQJheG7FjoxyruBIQ | ||
24 | i3geoOverlay = false; | 14 | i3geoOverlay = false; |
25 | if(window.parent.document.getElementById("boxg")) | 15 | if(window.parent.document.getElementById("boxg")) |
26 | window.parent.document.getElementById("boxg").style.zIndex = 0 | 16 | window.parent.document.getElementById("boxg").style.zIndex = 0 |
@@ -32,28 +22,23 @@ include_once("../../ms_configura.php"); | @@ -32,28 +22,23 @@ include_once("../../ms_configura.php"); | ||
32 | var ver = window.parent.i3GEO.parametros.versaomscompleta.split("."); | 22 | var ver = window.parent.i3GEO.parametros.versaomscompleta.split("."); |
33 | if(parseInt(window.parent.i3GEO.parametros.versaoms) >= 5 && parseInt(ver[1]) > 1) | 23 | if(parseInt(window.parent.i3GEO.parametros.versaoms) >= 5 && parseInt(ver[1]) > 1) |
34 | {tile = true;} | 24 | {tile = true;} |
35 | - | ||
36 | - if(window.parent.i3GEO.parametros) | ||
37 | - { | ||
38 | docmapa = window.parent.document | 25 | docmapa = window.parent.document |
39 | pol = window.parent.i3GEO.parametros.mapexten | 26 | pol = window.parent.i3GEO.parametros.mapexten |
27 | + | ||
40 | ret = pol.split(" ") | 28 | ret = pol.split(" ") |
41 | pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1 | 29 | pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1 |
42 | pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1 | 30 | pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1 |
43 | pt = pt1+","+pt2 | 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 | map.setMapType(G_SATELLITE_MAP); | 35 | map.setMapType(G_SATELLITE_MAP); |
52 | map.addMapType(G_SATELLITE_3D_MAP); | 36 | map.addMapType(G_SATELLITE_3D_MAP); |
53 | map.addControl(new GLargeMapControl()); | 37 | map.addControl(new GLargeMapControl()); |
54 | map.addControl(new GMapTypeControl()); | 38 | map.addControl(new GMapTypeControl()); |
55 | map.addControl(new GScaleControl()); | 39 | map.addControl(new GScaleControl()); |
56 | map.setCenter(new GLatLng(pt2,pt1), 8); | 40 | map.setCenter(new GLatLng(pt2,pt1), 8); |
41 | + | ||
57 | GEvent.addListener(map, "moveend", function() { | 42 | GEvent.addListener(map, "moveend", function() { |
58 | ondegoogle(map); | 43 | ondegoogle(map); |
59 | }); | 44 | }); |
@@ -119,7 +104,9 @@ include_once("../../ms_configura.php"); | @@ -119,7 +104,9 @@ include_once("../../ms_configura.php"); | ||
119 | } | 104 | } |
120 | if(window.parent.i3GEO.parametros.mapfile) | 105 | if(window.parent.i3GEO.parametros.mapfile) |
121 | map.addControl(new botaoI3geo()); | 106 | map.addControl(new botaoI3geo()); |
122 | - | 107 | + ondegoogle(map); |
108 | + } | ||
109 | + | ||
123 | function moveMapa(bd) | 110 | function moveMapa(bd) |
124 | { | 111 | { |
125 | nex = bd.minX+" "+bd.minY+" "+bd.maxX+" "+bd.maxY | 112 | nex = bd.minX+" "+bd.minY+" "+bd.maxX+" "+bd.maxY |
@@ -349,8 +336,9 @@ include_once("../../ms_configura.php"); | @@ -349,8 +336,9 @@ include_once("../../ms_configura.php"); | ||
349 | 336 | ||
350 | }); | 337 | }); |
351 | } | 338 | } |
352 | - ondegoogle(map); | ||
353 | </script> | 339 | </script> |
340 | + </head> | ||
341 | + <body onload="inicializa()"> | ||
342 | + <div id="mapa" style="width: 440px; height: 340px"></div> | ||
354 | </body> | 343 | </body> |
355 | -</html> | ||
356 | - | 344 | +</html> |
357 | \ No newline at end of file | 345 | \ No newline at end of file |