Skip to content

Commit

Permalink
#115 hidden field record sysmbol
Browse files Browse the repository at this point in the history
  • Loading branch information
webgisdeveloper committed Nov 16, 2021
1 parent b6ab07b commit b67ed57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions simccs_maptool/static/js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ function createLegend(datasetid,fieldname,symbol,limits,colorlist)
labels.push(
symbolsvg.replace('#3388ff',fillc) + ' ' + from.toFixed(2) + (to ? ' – ' + to.toFixed(2) : '+'));
}

div.innerHTML = fieldname + "<br>";
var symbol_id = div.id + "_symbol";
div.innerHTML = `<input type="hidden" id=${symbol_id} value=${symbol}></input>`;
div.innerHTML += fieldname + "<br>";
div.innerHTML += labels.join('<br>');
return div;
}
Expand Down Expand Up @@ -240,6 +241,9 @@ function update_style(stylelayerid) {
var fillcolor = getcolor(layer.feature.properties[color_field],newlimits,newcolorlist);
layer.setStyle({'fillColor':fillcolor});
});

//regenerate color legend
//createLegend(stylelayerid,color_field,symbol,newlimits,newcolorlist)
}

// cancel style
Expand Down

0 comments on commit b67ed57

Please sign in to comment.