|
|||
Google Map auf Homepage will nicht (IE-Problem)
Hallo,
hoffe, das passt hier rein...... Ich habe mir ein kleines php-Skript in Zusammenarbeit mit der google map api gebastelt, um meine Tipper in einer "Deutschland-Karte" aufzuzeigen. Das funktioniert mit dem Firefox auch wunderbar, aber der IE lädt die Karte anfangs (siehe Screenshot), aber es kommt dann gleich die Fehlermeldung "Vorgang abgebrochen", bestätigt man diese, gelangt man sofort auf "Die Seite kann nicht angezeigt werden." Wie bringe ich die google map auch unter dem IE zum Laufen? Der relevante Code für die Map sieht so aus: Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAAaA4uJDvx2Fxgq-2-wQuLSBQA-iRxehV1irWZi9yi8ZPS3CKPuhQJkK7BUjYKZ1lCNRh3sUDDmbI5Dg" type="text/javascript"></script> </head> <body> ..... <div style="text-align: center; width: 100%;"> <div id="map" style="margin-left: auto; margin-right: auto; width: 600px; height: 400px; color: #000000; border: 1px solid #000000; text-align: left;"></div> <script type="text/javascript"> //<![CDATA[ //Map API Documentation http://www.google.com/apis/maps/documentation/ // Create our "tiny" marker icon var icon = new GIcon(); icon.image = "http://tippliga.m25s11.vlinux.de/img/tipper.png"; icon.shadow = "http://tippliga.m25s11.vlinux.de/img/spacer.gif"; icon.iconSize = new GSize(22, 22); icon.shadowSize = new GSize(22, 22); icon.iconAnchor = new GPoint(11, 11); icon.infoWindowAnchor = new GPoint(11, 5); var map = new GMap(document.getElementById("map")); map.setMapType(_SATELLITE_TYPE); map.addControl(new GLargeMapControl()); <?php if ( (!isset($_REQUEST['ansicht'])) || ( (isset($_REQUEST['ansicht'])) && ($_REQUEST['ansicht'] == "deutschland") ) ) { echo " map.centerAndZoom(new GPoint(11, 50), 12);"; } if (isset($_REQUEST['ansicht']) && $_REQUEST['ansicht'] == "bayern") { echo " map.centerAndZoom(new GPoint(10.4833, 48.05), 8);"; } ?> // Creates a marker whose info window displays the given number function createMarker(point, number) { var marker = new GMarker(point,icon); // Show this markers index in the info window when it is clicked var html = number; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }; <?php @mysql_connect($sqlhost, $sqluser, $sqlpass) OR die("Keine Verbindung zur Datenbank. Fehlermeldung:".mysql_error()); mysql_select_db($database) OR die ("Konnte Datenbank nicht benutzen, Fehlermeldung: ".mysql_error()); $result = mysql_query("SELECT NICK,PLZ,ORT,LIEBLINGSVEREIN,LAENGE,BREITE FROM $tab_tipperkarte WHERE LAENGE != '' OR BREITE != '' "); $anzahl = mysql_num_rows($result); if (!$result) { echo "Keine Daten vorhanden!!!"; } while($row = mysql_fetch_array($result)) { $plz = " ". ( $row['PLZ'] > 0 ? " ". $row['PLZ'] ." " : "" ) ." "; $ort = " ". ( $row['ORT'] != "" ? " ". $row['ORT'] ." " : "" ) ." "; $lieblingsm = " ". ( $row['LIEBLINGSVEREIN'] != "" ? " ". $row['LIEBLINGSVEREIN'] ." " : "[i]keine Angabe<\/i>" ) ." "; echo "var point = new GPoint(" . $row['LAENGE'] . "," . $row['BREITE'] . ");\n"; echo "var marker = createMarker(point, '<b style=\"font-size: 1.3em;\">" . $row['NICK'] . "<\/b> " . $plz . " " . $ort . " <u>Lieblingsverein:<\/u> " . $lieblingsm . "');\n"; echo "map.addOverlay(marker);\n"; echo "\n"; } mysql_close(); ?> //]]> </script> (Insgesamt haben bisher <span style="color: #08aa00;"><?php echo $anzahl; ?></span> Tipper Ihre Koordinaten im Profil eingetragen)</p> </div> </p> </p> <div style="text-align: center; width: 100%;"> <a href="tipperkarte.php?ansicht=deutschland"> [img]img/tipperkarte_D.gif[/img] </a> <a href="tipperkarte.php?ansicht=bayern"> [img]img/tipperkarte_BY.gif[/img] </a> </div> .... P.S.: Die Google Map an sich ist auf jedenfall für den IE >5.01 freigegeben, es sollte also klappen.... |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Google Map mit 2 Standorten mit Beschreibung | denizYoshi | Javascript & Ajax | 7 | 10.02.2017 17:56 |
PNG in IE Problem mit der Mauserkennung (klickbar oder nicht) | Angélique | CSS | 13 | 16.03.2010 18:20 |
Problem: httpRequest und Javascript | onkel-tom | Serveradministration und serverseitige Scripte | 10 | 23.03.2009 19:35 |
Google earth (maps): Abmahnwelle | EvT | Offtopic | 1 | 04.03.2008 21:07 |
Problem: IE versteckt Text & Feedback | Herbi | CSS | 2 | 11.08.2006 14:39 |