Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Passaggio valori

  1. #1

    Passaggio valori

    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

  2. #2
    up please :master:

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.