Bonjour à tous,
Je travaille actuellement sur l'intégration de Google Map, avec intéraction à la BD et tout et tout. Ca marche relativement bien, mais comme vous l'avez déjà deviné j'ai un petit problème...
Il me renvoie une erreur, interne à Google Map (sans doute un paramètre est-il faux). Voici la partie de mon code incriminée (il y a un peu de PHP, pour la BD, mais bon rien de méchant)

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
    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GScaleControl());
 
		<?php
                  if (isset($_POST['latitude']) && isset($_POST['longitude']) && !empty($_POST['latitude']) && !empty($_POST['longitude'])){
                        echo "var pointInit=new GLatLng('".$_POST['latitude']."', '".$_POST['longitude']."');\n";
                        echo "var markerInit=new GMarker(pointInit);\n";
                        echo "alert(markerInit);";
                        echo "map.addOverlay(markerInit);\n";
                        echo "map.setCenter(pointInit, 13);\n";
                }
                else{
                        echo "map.setCenter(new GLatLng(47, 10), 3);";
                }
                ?>
		geocoder = new GClientGeocoder();
      }
    }
A noter : la variable "pointInit" a une bonne valeur, de même pour la variable MarkerInit...
Et, j'allais oublier, l'erreur retournée par Firebug:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
this.g has no properties
Ha((47.23731, -0.070305) li=47.23731 mi=-0.070305 x=-0.070305 y=47.23731)maps2.73.api.js (line 510)
n((47.23731, -0.070305) li=47.23731 mi=-0.070305 x=-0.070305 y=47.23731, undefined)maps2.73.api.js (line 507)
n((47.23731, -0.070305) li=47.23731 mi=-0.070305 x=-0.070305 y=47.23731, undefined)maps2.73.api.js (line 453)
xg()maps2.73.api.js (line 636)
initialize(Object D=Object windo=window b=div#map U=[3] fa=(500, 500))maps2.73.api.js (line 633)
wb(Object B=(47.23731, -0.070305) v=0 ga=false Tc=Object L=true)maps2.73.api.js (line 398)
load()carte_interactive... (line 51)
onload(load )carte_interactive... (line 1)
[Break on this error] K.prototype.Ha=function(a){return this.g.getProjection().fromLatLngToPixel(a,thi...