Skip to content

Instantly share code, notes, and snippets.

@deanmarano
Created February 12, 2015 22:09
Show Gist options
  • Save deanmarano/6210a98e2e015f7fa126 to your computer and use it in GitHub Desktop.
Save deanmarano/6210a98e2e015f7fa126 to your computer and use it in GitHub Desktop.
After Ember setter
locations: function(key, value, oldValue) {
if(value) {
this.removeOldMarkers(oldValue);
this.addMarkers(value);
}
return value;
}.property(),
removeOldMarkers: function(markers) {
markers.forEach(function(marker) {
// remove markers from Google map
});
}
addMarkers: function(markers) {
markers.forEach(function(marker) {
// add markers to Google map
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment