We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbc0595 commit 6e341daCopy full SHA for 6e341da
views/fine.js
@@ -9,7 +9,6 @@ module.exports = Backbone.View.extend({
9
this.proxyView = options.proxyView;
10
this.layer = L.markerClusterGroup().addTo(this.proxyView.mapView.map);
11
this.subviews = {};
12
- this.listenTo(this.collection, 'sync', this.render);
13
this.listenTo(this.collection, 'add', this.addModel);
14
this.listenTo(this.collection, 'remove', this.removeModel);
15
this.render();
views/fineMarker.js
@@ -17,7 +17,10 @@ module.exports = Backbone.View.extend({
17
.addTo(this.layer);
18
},
19
remove: function() {
20
- this.layer.removeLayer(this.marker);
+ if (this.marker) {
21
+ this.layer.removeLayer(this.marker);
22
+ this.marker = undefined;
23
+ }
24
}
25
});
26
0 commit comments