Bonjour,
que faut-il ajouter ou modifier pour charger une trace gpx avec l'API V3 ?
Merci d'avance si vous avez des idées.

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
69
70
71
72
73
74
75
<html>
<head>
 <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 <title>[Google Maps API v3] 20. Construction d'une carte pour desktops et smartphones</title>
 <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
 <script type="text/javascript">
  var map;
  var myOptions;
 
  function initialize() {
    var myLatlng = new google.maps.LatLng(44.1738,5.2836);
    myOptions =	{
      zoom: 14,
      center: myLatlng,
      disableDefaultUI: true,
      backgroundColor: '#efedbe',
      mapTypeControl: true,
      mapTypeControlOptions: {
        style: google.maps.MapTypeControlStyle.DEFAULT
      },
      navigationControl: true,
      navigationControlOptions: {
        style: google.maps.NavigationControlStyle.DEFAULT
      },
      scaleControl: true,
      scaleControlOptions: {
        position: google.maps.ControlPosition.BOTTOM_LEFT
      },
      mapTypeId: google.maps.MapTypeId.SATELLITE
    };
 
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
 
 
    });
    var infowindow = new google.maps.InfoWindow({
      content: 'Infobulle'
    });
    google.maps.event.addListener(marker, 'click', function() {
      infowindow.open(map, marker);
    });
 
  }
 
  function detectBrowser() {
    var useragent = navigator.userAgent;
    var mapdiv = document.getElementById("map_canvas");
 
    if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1) {				
      mapdiv.style.width = '100%';
      mapdiv.style.height = '100%';
      myOptions = {
        navigationControlOptions: {
          style: google.maps.NavigationControlStyle.ANDROID
        },
        mapTypeControlOptions: {
          style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
        },
        disableDoubleClickZoom: true,
        scaleControl: false
      };
      map.setOptions(myOptions);
    } else {
      mapdiv.style.width = '800px';
      mapdiv.style.height = '600px';
    }
  }
 
  </script>
</head>
<body style="margin:0px; padding:0px;" onload="initialize(); detectBrowser();">
  <div id="map_canvas"></div>
</body>
</html>