Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions app/scripts/lizard/views/Annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ Lizard.Views.AnnotationsView = Backbone.Marionette.ItemView.extend({
buildQueryUrlParams: function () {
var bbox = this.mapCanvas ? this.mapCanvas.getBounds().toBBoxString() : null;
return {
in_bbox: bbox
in_bbox: bbox,
page_size: 0
};
},
updateAnnotations: function (e) {
Expand Down Expand Up @@ -155,12 +156,12 @@ Lizard.Views.AnnotationsView = Backbone.Marionette.ItemView.extend({
})
.done(function (response, textStatus, jqXHR) {
self.model.set({
annotationsCount: response.count,
annotations: response.results.length !== 0 ? response.results : null
annotationsCount: response.length,
annotations: response.length !== 0 ? response : null
});
// hack: update the toggler as well
$('.annotation .badge').text(response.count !== 0 ? response.count : '–');
self.updateAnnotationsLayer(response.results);
$('.annotation .badge').text(response.length !== 0 ? response.length : '–');
self.updateAnnotationsLayer(response);
})
.fail(function (jqXHR, textStatus, errorThrown) {
console.error('Error while retrieving annotations.');
Expand Down