> I'm not sure a.) I understand fully what you mean b.) If my setup
> would allow for this
You have
$.getJSON('http://labs.unxposed.net/.... ', function(data) {
$.each(data.incident, function(i, incident) {
incidents.push([incident.Lat, ... ]);
});
});
which will build you an array of arrays of incident info ; but you
don't do anything with it.
The data will come asynchronously, so if you are going to do anything
with it you must do it within the JSON callback function.
To minimise any code changes you could call your setMarkers() function
at the end of the callback, passing the JSON you have extracted.
The problem is that all your functions are defined locally inside your
initialize() function, so they won't be available when the callback is
run some time after initialize() has completed. Define your
functions at the global level.
--
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.