bonjour,
je veux affecter à chaque catégorie un symbole spécifique au lieu du marqueur ordinaire et en conclure avec une checkedbox voici mon code:
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var lat = 46.606111; // latitude par défaut
var lng = 1.875278; // longitude par défaut
var homeLatlng = new google.maps.LatLng(lat, lng); // coordonnée par défaut
var infowindow;
var marker;
var map;
function initialize(a, b) {
    if ((document.forms.form1.GroupeChoix[0].checked == true)) {
        var a = 33.245292
        var b = -8.508839
    }
    if ((document.forms.form1.GroupeChoix[1].checked == true)) {
        var a = 33.2878134
        var b = -8.342278
    }
    var myOptions = {
        center: new google.maps.LatLng(a, b),
        // centre de la carte
        zoom: 13,
        //zoom level à 6
        mapTypeId: google.maps.MapTypeId.ROADMAP //type de map
    };
    map = new google.maps.Map(document.getElementById('map-canvas'), myOptions); // initialisation de la map
    downloadUrl("xml/point.xml", function (data) {
        var markers = data.documentElement.getElementsByTagName("marker");
        for (var i = 0; i < markers.length; i++) {
            if (markers[i].getAttribute("categorie") == 'clinique') {
                var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng")));
                marker = createclinique(markers[i].getAttribute("description"), latlng);
            }
            if (markers[i].getAttribute("categorie") == 'hopital') {
                var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng")));
                marker = createMarker(markers[i].getAttribute("description"), latlng);
            }
        }
    });
}
function createMarker(description, latlng) {
    var marker = new google.maps.Marker({
        position: latlng,
        icon: 'images/emergencyphone.png',
        map: map
    });
    google.maps.event.addListener(marker, "click", function () {
        if (infowindow) infowindow.close();
        infowindow = new google.maps.InfoWindow({
            content: description
        });
        infowindow.open(map, marker);
    });
    return marker;
}
function createclinique(description, latlng) {
    var marker = new google.maps.Marker({
        position: latlng,
        icon: 'images/sevilla.png',
        map: map
    });
    google.maps.event.addListener(marker, "click", function () {
        if (infowindow) infowindow.close();
        infowindow = new google.maps.InfoWindow({
            content: description
        });
        infowindow.open(map, marker);
    });
    return marker;
}
google.maps.event.addDomListener(window, 'load', initialize);
et ça ne marche toujours pas , je tiens à votre aide NO SMOKing