I can't have the return-value from my showAddress
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 google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home