sto utilizzando questa funzione per creare dei marker su una mappa google:
Codice PHP:
function createMarker(pointData,id) {
//alert(lati2+'-'+long2);
var latlng = new GLatLng(pointData.latitude, pointData.longitude);
var marker = new GMarker(latlng);
GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(pointData.html); });
map.addOverlay(marker);
gmarkers[id] = marker;
htmls[id] = pointData.html;
return marker;
}
vorrei in alternativa cercare un indirizzo con questa funzione
Codice PHP:
var geocoder = new GClientGeocoder();
geocoder.getLatLng(pointData.address, function(point){
if(!point){
} else {
}
}
);
il problema è che non funziona, sul sito google dice che getLatLng restituisce un'oggetto GLatLng quindi provo ad assegnarlo in alternativa alla variabile latlng sulla prima funzione ... ma non va