C'est ce que j'utilisé pour afficher un fichier KML dans Google Maps:KML fichier chargé, mais la carte de fond non visible
HTML
<div id="map_canvas" style="width: 600px; height: 400px"></div>
Javascript
function map_initialize() {
var myLatlng = new google.maps.LatLng(52.200874,6.009521);
var myOptions = {
zoom: 7,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var map = new google.maps.Map(
document.getElementById("map_canvas"),
myOptions);
var nyLayer = new google.maps.KmlLayer(
'http://maps.google.com/maps/ms?msa=0&msid=114680467578999980893.00049426282c85822d40e&output=kml');
nyLayer.setMap(map);
}
jQuery(function(){map_initialize()});
Ici vous pouvez voir le résultat: http://www.taizefriesland.nl/?page_id=7
Le fichier KML est chargé mais la carte d'arrière-plan n'est pas visible. Comment puis-je montrer la carte de fond hibryd?
il n'a pas à faire avec votre code de carte actuel, fonctionne très bien pour moi. – Galen