From 791efdd640e06bb47c2e2b988951aff29eba83f9 Mon Sep 17 00:00:00 2001 From: fritzvd Date: Thu, 17 Dec 2015 16:38:02 +0100 Subject: [PATCH] Annotations collected with page_size=0 fixes nens/lizard-nxt#1396 --- app/scripts/lizard/views/Annotations.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/scripts/lizard/views/Annotations.js b/app/scripts/lizard/views/Annotations.js index 8a32295..92f1ae2 100644 --- a/app/scripts/lizard/views/Annotations.js +++ b/app/scripts/lizard/views/Annotations.js @@ -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) { @@ -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.');