Permalink
Browse files

spots shouldn't add themselves to a layer, each layer should add thei…

…r own spots instead
  • Loading branch information...
1 parent c0e0aee commit 7866af16c47d192b4b059780840097c1beab8eeb @mlouro mlouro committed Jan 17, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 geotagging/static/js/app/Spot.js
@@ -54,8 +54,6 @@ $$.SpotView = Backbone.View.extend({
this.marker = new OpenLayers.Marker(
this.model.getLatLng(),
this.getIcon().clone());
-
- this.model.layer.toOpenLayers().addMarker(this.marker);
return this;
}
@@ -126,7 +124,7 @@ $$.LayerView = Backbone.View.extend({
spot.view = new $$.SpotView({
model: spot
});
- spot.view.render();
+ this.layer.addMarker(spot.view.render().marker);
},
render: function () {

0 comments on commit 7866af1

Please sign in to comment.