On Feb 16, 5:26 am, Gooler <[email protected]> wrote:
> I have coded a function showAddress1(...)
>
> In this function, except the 2D array delivery[][] is global
> variable, others are local variable.
>
> I have a problem here.
>
> Since the content of delivery[][] is updated in this function, I
> cannot retrieve the updated content outside this function.

Sure you can.  You just need to wait until it is available. But why?
The usual advice is to _use_ the data inside the callback function.

>
> For example, when I call alert(delivery[0][1]), undefined value is
> returned.

Did you wait until after the callback function ran?

>
> I have attempted to return the delivery[][] in the function, it
> seems not to work.

Geocoding is asynchronous, you can't do that from a callback function.


>
> So, I want to ask, what is the correct approach to return the array
> content delivery[][] I want.
>
> Could anyone mind giving me some guideline to do so?

Did you read this "guideline"?
READ THIS FIRST: Posting Guidelines
http://groups.google.com/group/google-maps-js-api-v3/t/2b3f101fd509919e

  -- Larry

>
> Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to