Bonjour,

Mon application m'a brusquement envoyé deux messages d'erreur lorsque je tente d'afficher une trace avec plusieurs points sur une carte.
Je n'ai pas changé le script qui fonctionnait il y a encore 1 semaine.
Le voici:
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
76
77
78
79
80
81
82
'<html> '+
'<head> '+
'<meta name="viewport" content="initial-scale=1.0, user-scalable=yes"/> '+
'<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true&v=3.22"></script> '+   //24/08/2016 (...&V=3.22 au lieu de V=3...)
'<script type="text/javascript"> '+
'  var map;'+
'  var polyline = [];'+
'  var markersArray = [];'+
'  var Circle = { '+
'  path: google.maps.SymbolPath.CIRCLE ,'+
'  fillColor: "Red",'+
'  fillOpacity: 1.0,'+
'  scale: 3,'+
'  strokeColor:"Black",'+
'  strokeWeight: 1 '+
'};'+
''+
''+
'  function initialize() {'+
'  var myLatLng = new google.maps.LatLng(48.0,2.0);'+
'  var mapOptions = {'+
'    zoom: 5,'+
'    center: myLatLng,'+
'    mapTypeId: google.maps.MapTypeId.TERRAIN'+
'  };'+
'  map = new google.maps.Map(document.getElementById("map_canvas"),'+
'      mapOptions);'+
'}'+
''+
' function DrawTrack(FromLat,FromLng,ToLat,ToLng){'+
' var geo_path = new Array();'+
'     var geo_path = [new google.maps.LatLng(FromLat,FromLng),new google.maps.LatLng(ToLat,ToLng)];'+
' var Track = new google.maps.Polyline({'+
'     path: geo_path,'+
'     strokeColor: "#FF0000",'+
'     strokeOpacity: 1.0,'+
'     strokeWeight: 2'+
' });'+
' polyline.push(Track);'+
' Track.setMap (map);'+
'}'+
''+
''+
' function RemoveTrack(){' +
'  if (polyline){' +
'    for(i in polyline){' +
'      polyline[i].setMap(null);' +
'    }' +
'     polyline.length =0;' +
'   }' +
'}' +
''+
'function ClearMarkers() {  '+
'  if (markersArray) {        '+
'    for (i in markersArray) {  '+
'      markersArray[i].setMap(null); '+
'    } '+
'  } '+
' Bounds = new google.maps.LatLngBounds();'+
'}  '+
''+
'var Bounds = new google.maps.LatLngBounds(); '+
'  function PutMarker(Lat, Lang, Msg) { '+
'   var latlng = new google.maps.LatLng(Lat,Lang);'+
'   var marker = new google.maps.Marker({'+
'      position: latlng,'+
'      icon: Circle,'+
'      map: map,'+
'      title: Msg'+
'  });'+
' markersArray.push(marker); '+
' Bounds.extend(latlng);'+
' map.fitBounds(Bounds);'+
'}'+
''+
''+
''+'</script> '+
'</head> '+
'<body onload="initialize()"> '+
'  <div id="map_canvas" style="width:100%; height:100%"></div> '+
'</body> '+
'</html> ';
Et voici le code delphi qui doit envoyer les données à la carte:
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
if ind = 0 then
          begin
            dOldLat                 := dLatitude;
            dOldLon                 := dLongitude;
            HTMLWindow2.execScript(Format('PutMarker(%s, %s, %s)',
            [FloatToStr(dLatitude),FloatToStr(dLongitude),QuotedStr(sCaption)]),
            'JavaScript');
          end
          else
          begin
            HTMLWindow2.execScript(Format('DrawTrack (%s,%s,%s,%s)',
            [FloatToStr(dOldLat),FloatToStr(dOldLon),FloatToStr(dLatitude),
            FloatToStr(dLongitude)]), 'JavaScript');
            HTMLWindow2.execScript(Format('PutMarker(%s, %s, %s)',
            [FloatToStr(dLatitude),FloatToStr(dLongitude),QuotedStr(sCaption)]),
            'JavaScript');
            dOldLat                 := dLatitude;
            dOldLon                 := dLongitude;
          end;
Les messages d'errurs sont:

Nom : maps.PNG
Affichages : 290
Taille : 11,3 KoNom : Maps-2.PNG
Affichages : 234
Taille : 17,3 Ko

Y a-t-il eu une modification dans l'url ou autre?

Merci de l'aide que vous voudrez bien m'apporter.

Cordialement
Pierre