Skip to content

Commit

Permalink
add generic plotting function
Browse files Browse the repository at this point in the history
  • Loading branch information
timmysiauw committed Dec 20, 2019
1 parent c50b37b commit 8bff61f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,19 @@ var modemap = function() {

var plot = {

any: function(map_id, center, default_zoom, query_name, row_fun) {

var content = mode.get_query_content(query_name)

var map = mapping.init(map_id, center, default_zoom)

for (var i=0; i<content.length; i++) {
row_fun(map, content, idx)
}

return map
},

pts: function(map_id, center, default_zoom, query_name, lat_col, lng_col, radius_fun, color_fun) {

var content = mode.get_query_content(query_name)
Expand Down

0 comments on commit 8bff61f

Please sign in to comment.