sorry for my bad english i have a probleme withe a script (Using PHP/MySQL with Google Maps)
the markers works correctly on firefox but in the explorer 7 or 6 are not visible http://www.memopage.com/voyages/google_carte/ville/rome_carte.html the script show the map <script src="http://maps.google.com/maps? file=api&v=2&key=maclefs_WkobKsCPHGH6VMxSoCVXSfF8tSxwyT5d-82PtJNnJjA" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ var iconBlue = new GIcon(); iconBlue.image = 'http://www.site/image/picto_carte_balade3.png'; iconBlue.iconSize = new GSize(30,32); iconBlue.shadowSize = new GSize(22, 20); iconBlue.iconAnchor = new GPoint(6, 20); iconBlue.infoWindowAnchor = new GPoint(5, 1); var iconRed = new GIcon(); iconRed.image = 'http://www.site/image/picto_carte_culture3.png'; iconRed.iconSize = new GSize(30,32); iconRed.shadowSize = new GSize(22, 20); iconRed.iconAnchor = new GPoint(6, 20); iconRed.infoWindowAnchor = new GPoint(5, 1); var iconYellow = new GIcon(); iconYellow.image = 'http://www.site/image/picto_carte_resto3.png'; iconYellow.iconSize = new GSize(30,32); iconYellow.shadowSize = new GSize(25, 20); iconYellow.iconAnchor = new GPoint(6, 20); iconYellow.infoWindowAnchor = new GPoint(5, 1); var iconGreen = new GIcon(); iconGreen.image = 'http://www.site/image/ picto_carte_airport3.png'; iconGreen.iconSize = new GSize(30,32); iconGreen.shadowSize = new GSize(25, 20); iconGreen.iconAnchor = new GPoint(6, 20); iconGreen.infoWindowAnchor = new GPoint(5, 1); var customIcons = []; customIcons["ballade"] = iconBlue; customIcons["culture"] = iconRed; customIcons["resto"] = iconYellow; customIcons["aeroport"] = iconGreen; function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(41.894451, 12.478795), 10); map.addControl(new GScaleControl()); GDownloadUrl("phpsqlajax_genxml2.php", function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var id_pdf = markers[i].getAttribute("id_pdf"); var type = markers[i].getAttribute("type"); var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var marker = createMarker(point, name, address, type, id_pdf); map.addOverlay(marker); } }); } } function createMarker(point, name, address, type, id_pdf) { var marker = new GMarker(point, customIcons[type]); var html = name + "<br/>" + "<a href=\"http://www.site/voyages/ popme.php?pdf="+ id_pdf + "\" target=\"_blank\">" + address + "</ a>" ; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html, {maxWidth:300, maxHeight: 300,autoScroll:true}); }); return marker; } //]]> </script> </head> <body onLoad="load()" onUnload="GUnload()"> <div id="map" style="width: 500px; height: 495px"></div> </body> and the php file <?php require("config_base.php"); function parseToXML($htmlStr) { $xmlStr=str_replace('<','<',$htmlStr); $xmlStr=str_replace('>','>',$xmlStr); $xmlStr=str_replace('"','"',$xmlStr); $xmlStr=str_replace("'",''',$xmlStr); $xmlStr=str_replace("&",'&',$xmlStr); return $xmlStr; } //////////////////////////// /** * Encodes an ISO-8859-1 mixed variable to UTF-8 (PHP 4, PHP 5 compat) * @param mixed $input An array, associative or simple * @param boolean $encode_keys optional * @return mixed ( utf-8 encoded $input) */ function utf8_encode_mix($input, $encode_keys=false) { if(is_array($input)) { $result = array(); foreach($input as $k => $v) { $key = ($encode_keys)? utf8_encode($k) : $k; $result[$key] = utf8_encode_mix( $v, $encode_keys); } } else { $result = utf8_encode($input); } return $result; } ////////////////////////////// // Opens a connection to a MySQL server $connection=mysql_connect (ms1, $username, $password); if (!$connection) { die('Not connected : ' . mysql_error()); } // Set the active MySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); } // Select all the rows in the markers table $query = "SELECT * FROM markers WHERE 1"; $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } header("Content-type: text/xml"); // Start XML file, echo parent node echo '<markers>'; // Iterate through the rows, printing XML nodes for each while ($row = @mysql_fetch_assoc($result)){ // ADD TO XML DOCUMENT NODE echo '<marker '; echo 'name="' . parseToXML($row['name']) . '" '; echo 'address="' . parseToXML($row['address']) . '" '; echo 'lat="' . $row['lat'] . '" '; echo 'lng="' . $row['lng'] . '" '; echo 'type="' . $row['type'] . '" '; echo 'id_pdf="' . parseToXML($row['id_pdf']) . '" '; echo '/>'; } // End XML file echo '</markers>'; ?> thank you for helping --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
