Bonjour,

J'ai une fonction javascript :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function FindRoute(route) {
    var address = route;  
 
    // script uses our 'geocoder' in order to find location by address name
    geocoder.geocode({ 'address': address }, function (results, status) {
        if (status == google.maps.GeocoderStatus.OK) { // and, if everything is ok
 
            // we will center map
            var addrLocation = results[0].geometry.location;
            map.setCenter(addrLocation);
 
            // store current coordinates into hidden variables
            document.getElementById('lat').value = results[0].geometry.location.$a;
            document.getElementById('lng').value = results[0].geometry.location.ab;
 
            // and then - add new custom marker and Infowindow
            var addrMarker = new google.maps.Marker({
 
                position: addrLocation,
                map: map,
                title: results[0].formatted_address
                //animation: google.maps.Animation.BOUNCE
            });
            /* +
            
            */
            var infowindow = new google.maps.InfoWindow({
 
                content: '<DIV STYLE="line-height:1.35;overflow:hidden;white-space:nowrap;"><DIV STYLE=overflow:auto; width:250px; height:150px><img src="" /><br /><font style="color:#000;"><b>Nom : </b>' + nom +
            '<br /><b>Latitude/longitude : </b>' + document.getElementById('lat').value + '/' + document.getElementById('lng').value + '<br /></font></div></div>'
 
            });
 
            infowindow.open(map, addrMarker);
 
            markers.push(addrMarker);
 
            infos.push(infowindow);
        } else {
            alert('Geocode was not successful for the following reason: ' + address);
 
        }
    });
}
Cette fonction marche sous firefox mais sous chrome non et mon infowindow ne s'affiche pas. Avez-vous une idée ?