Skip to content

Commit

Permalink
added transparency option
Browse files Browse the repository at this point in the history
  • Loading branch information
timmysiauw committed Dec 13, 2016
1 parent eb847b6 commit 094d2c6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions modemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ var modemap = function() {
return map
},

ghs: function(map_id, center, default_zoom, query_name, gh_col, val_col, color_fun) {
ghs: function(map_id, center, default_zoom, query_name, gh_col, val_col, color_fun, opacity) {

var content = mode.get_query_content(query_name)

Expand All @@ -246,7 +246,7 @@ var modemap = function() {
{
weight: 0,
color: "#000000",
fillOpacity: 0.5,
fillOpacity: opacity || 0.5,
fillColor: color_fun ? color_fun(content, i) : "#FF0000"
}
).addTo(map)
Expand Down Expand Up @@ -288,11 +288,7 @@ var modemap = function() {
layer.gh_val = content[i][val_col]

layer.on("mouseover", function(e) {
//console.log("this happened")
//console.log(this.gh_val)

$("#" + map_id + "-val-display").text(this.gh_val)

})

layer.addTo(map)
Expand Down Expand Up @@ -331,7 +327,6 @@ var modemap = function() {

}).trigger("change")


}

}
Expand Down

0 comments on commit 094d2c6

Please sign in to comment.