Salve a tutti,

ho questo codice per google maps:

Codice PHP:
<script type="text/javascript">
var 
geocoder = new GClientGeocoder();
var 
address 'indirizzo per ricavare le cordinate';
geocoder.getLatLngaddress,
    function(
point) {
        if (!
point) {
            
alert(address ' non trovato');
        } else {
            
document.getElementById('risultato').innerHTML = + point.lat() + ',' point.lng() ;
            
        }
    }
);


    
//<![CDATA[
    
var dati document.getElementById("risultato")
    var 
map null;
    var 
minimap null;
    var 
map_moving false;
    var 
minimap_moving false;
    var 
pixel null;
    var 
encLatLong null;
    var 
geocoder;
    
    
    
    
    if (
GBrowserIsCompatible()) {
        function 
Init(){
          
map = new GMap2(document.getElementById("map"));
          
map.addControl(new GSmallMapControl());
          
map.addControl(new GMapTypeControl());
          
map.setCenter(new GLatLng(****DEVO PASSARE QUI IL VALORE), 16);
          
map.openInfoWindow(map.getCenter(),
                 
document.createTextNode(address)); 

Cosi stampo i valori a video

Codice PHP:
 document.getElementById('risultato').innerHTML = + point.lat() + ',' point.lng() ; 

adesso dovrei passare il valori nel blocco di codice sopra...ovvero:


Codice PHP:
map.setCenter(new GLatLng(****DEVO PASSARE QUI IL VALORE), 16); 


come posso fare? tengo a precisare che non sono molto pratico di javascript e vi ringrazio per l'eventuale aiuto. :quote:


Saluti
Gianluca