Hi,
Link: http://labs.unxposed.net/democraticvoiceburma/elections/ !
I'm trying to pass markers from a json file so instead of:
var incidents = [
[19.766704, 96.097412, "Something happened", "violence",
"<p>html
goes here</p>", "Location", "Datetime", "Name", 1],
[19.766704, 95.097412, "Something else", "violence", "<p>html
goes
here</p>", "Location", "Datetime", "Name", 2],
[19.766704, 94.097412, "Revered white elephant caught in Burma",
"violence", "<p>Only the third white elephant,....</p>", "Sandway,
Arakan State", "10/10/10", "Name", 3]
];
I want something like:
var incidents = new Array();
$.getJSON('../json/incidents.json', function(data) {
$.each(data.incident, function(i, incident){
incidents.push([incident.Lat, incident.Lng,
incident.Title,
incident.Type, incident.Content, incident.Location, incident.Datetime,
incident.Author, incident.Zindex]);
});
});
But this isn't working.
Thanks
--
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.