Skip to content

Commit

Permalink
#126 popup for sink/soruce
Browse files Browse the repository at this point in the history
  • Loading branch information
webgisdeveloper committed Jul 26, 2021
1 parent d191dfb commit 39b9239
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions simccs_maptool/templates/simccs_maptool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1767,19 +1767,25 @@ <h5 class="modal-title">Generate MPS file</h5>
//$.getJSON( "/static/Data/experiment01.json", function( data ) {
var result_sinkLayer = new L.geoJSON(data["Sinks"], {
pointToLayer: function (feature, latlng) {
//var mypopup = L.popup().setContent(content_str);
var mymarker = L.circleMarker(latlng,{radius: 8,fillColor: "green",
color: "#000",weight: 1,opacity: 1,fillOpacity: 0.7});
//mymarker.bindPopup(mypopup);
var content_str = "";
content_str += "CO2 stored: " + feature.properties.CO2Strd;
content_str += "Max annual storage:" + feature.properties.MxStrg;
var mypopup = L.popup().setContent(content_str);
mymarker.bindPopup(mypopup);
return mymarker;
}
});
var result_sourceLayer = new L.geoJSON(data["Sources"], {
pointToLayer: function (feature, latlng) {
//var mypopup = L.popup().setContent(content_str);
var mymarker = L.circleMarker(latlng,{radius: 8,fillColor: "red",
color: "#000",weight: 1,opacity: 1,fillOpacity: 0.7});
//mymarker.bindPopup(mypopup);
var content_str = "";
content_str += "CO2 captured: " + feature.properties.CO2Cptrd;
content_str += "Max Supply: " + feature.properties.MxSpply;
var mypopup = L.popup().setContent(content_str);
mymarker.bindPopup(mypopup);
return mymarker;
}
});
Expand Down

0 comments on commit 39b9239

Please sign in to comment.