Skip to content
Snippets Groups Projects
Commit 1a7f1776 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Load only positive observations on frontpage map

parent db1184c4
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,8 @@ var allObservations;
var filteredObservations;
/**
* Downloads all the observations that the user has authorization to view
* Downloads all the observations that the user has authorization to view,
* except the ones where isPositive=false
* @returns
*/
function cacheObservations(callback)
......@@ -75,11 +76,8 @@ function cacheObservations(callback)
systemTime.add(1,'days');
var to = systemTime.format("YYYY-MM-DD");
var uuidParam = settings.userUuid != null ? "&userUUID=" + settings.userUuid : "";
//$.getJSON(settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/observation/broadcast/list/" + settings.vipsOrganizationId, function( json ) {
$.getJSON( "/vipslogicproxy/rest/observation/list/filter/" + settings.vipsOrganizationId + "?from=" + from + "&to=" + to + uuidParam , function( json ) {
//$.getJSON("/vipslogicproxy/rest/observation/broadcast/list/" + settings.vipsOrganizationId + "?season=" + getCurrentYear(), function( json ) {
$.getJSON( "/vipslogicproxy/rest/observation/list/filter/" + settings.vipsOrganizationId + "?isPositive=true&from=" + from + "&to=" + to + uuidParam , function( json ) {
allObservations = json;
//console.log(allObservations);
filterObservations();
renderObservationFeatures();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment