From 365074972c29d7b9e224fa2b7f25f70e3f9b4278 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 23 Jan 2019 17:51:34 +0100 Subject: Map: geojson response - first display of items on map --- ishtar_common/static/js/ishtar.js | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'ishtar_common/static/js/ishtar.js') diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index f450fef49..96f1a4cc9 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -1241,46 +1241,11 @@ var render_map = function(data_table, table_name, nb_select, map_id){ //var html = render_paginate_select(table_name, 'map', nb_select); var html = ""; html += "
"; - var table_cols = data_table["table-cols"]; - - var points = []; - var missings = []; - $.each(data_table["rows"], function(idx, data){ - var name = ''; - if ("cached_label" in data){ - name = data["cached_label"]; - } - if ("name" in data){ - name = data["name"]; - } - - var point = ""; - for (key in data){ - if (key.endsWith('point_2d') && data[key] != "") { - point = data[key]; - } - } - - if (point){ - points.push({ - "id": data["id"], - "point": point, - "name": name - }); - } else { - missings.push({ - "id": data["id"], - "name": name - }); - } - }); - return {"points": points, "html": html}; + return {"points": data_table, "html": html}; }; var register_map = function(map_id, points){ - console.log(points); display_map(map_id, points); - // pass }; var main_submit_search = function(){ -- cgit v1.2.3