Hi!
Javascript, Ajax and GMaps all all new things for me.
I call the function showAddress from a Win-Form with a WebBrowser
inside, to get the coordinates of an address. But I can't have the
return-value of the function (I don't know why). Can you (please) give
me a little code-example?

This is my function:

function showAddress(address) {
    var map = new GMap2(document.getElementById("map_canvas"));
    var geocoder = new GClientGeocoder();
    var risultato = "iniziale";

    geocoder.getLatLng(address,
        function(point) {
            if (!point) {
                risultato = "not found";
            } else {
                map.setCenter(point, 13);
                var marker = new GMarker(point);
                map.addOverlay(marker);
                marker.openInfoWindowHtml(address);
                risultato = "evvai";
                // return "#" + point.lat() + "#" + point.lng();
            }
        }
    );
    return risultato;
}

It returns always "iniziale" (the initial value)
Thank you!
Pileggi

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.


Reply via email to