Skip to content

Instantly share code, notes, and snippets.

@seb-thomas
Forked from tomviner/gist:4285213
Created December 14, 2012 12:43
Show Gist options
  • Save seb-thomas/4285219 to your computer and use it in GitHub Desktop.
Save seb-thomas/4285219 to your computer and use it in GitHub Desktop.
$.getJSON('media/js/markers.json', function(data){
$.each(data.markers, function(i, marker){
if (marker.tag = "foo") {
map.addMarker({
id: i,
tags: marker.tag,
lat: marker.latitude,
lng: marker.longitude,
infoWindow: {
content: '<h2>' + marker.name + '</h2><p>' + marker.address + '</p>'
}
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment